From 5ccd0af2d86a8b476c5f429474b858c86edab692 Mon Sep 17 00:00:00 2001 From: nyne Date: Sun, 6 Oct 2024 15:31:53 +0800 Subject: [PATCH] comments --- lib/components/button.dart | 92 ++-- lib/foundation/comic_source/comic_source.dart | 187 +------ lib/foundation/comic_source/models.dart | 149 ++++++ lib/foundation/comic_source/parser.dart | 87 ++-- lib/pages/comic_page.dart | 13 +- lib/pages/comments_page.dart | 470 ++++++++++++++++++ 6 files changed, 763 insertions(+), 235 deletions(-) create mode 100644 lib/foundation/comic_source/models.dart create mode 100644 lib/pages/comments_page.dart diff --git a/lib/components/button.dart b/lib/components/button.dart index 066680d..cb8396f 100644 --- a/lib/components/button.dart +++ b/lib/components/button.dart @@ -99,11 +99,13 @@ class Button extends StatefulWidget { static Widget icon( {Key? key, - required Widget icon, - required VoidCallback onPressed, - double? size, - Color? color, - String? tooltip}) { + required Widget icon, + required VoidCallback onPressed, + double? size, + Color? color, + String? tooltip, + bool isLoading = false, + HitTestBehavior behavior = HitTestBehavior.deferToChild}) { return _IconButton( key: key, icon: icon, @@ -111,6 +113,8 @@ class Button extends StatefulWidget { size: size, color: color, tooltip: tooltip, + behavior: behavior, + isLoading: isLoading, ); } @@ -262,13 +266,16 @@ class _ButtonState extends State