From 34a276bb12342355b7b8d213dd4750c61663d0f4 Mon Sep 17 00:00:00 2001 From: Jaap Aarts Date: Wed, 7 Jun 2023 21:57:59 +0200 Subject: [PATCH] Fix LOAD MORE in calendar (#442) --- lib/ui/screens/calendar_screen.dart | 23 +++++++++++-- pubspec.lock | 50 +++++++++++++++++------------ 2 files changed, 50 insertions(+), 23 deletions(-) diff --git a/lib/ui/screens/calendar_screen.dart b/lib/ui/screens/calendar_screen.dart index 68386dd13..66d008b91 100644 --- a/lib/ui/screens/calendar_screen.dart +++ b/lib/ui/screens/calendar_screen.dart @@ -272,6 +272,9 @@ class CalendarScrollView extends StatelessWidget { : _monthGroupedEventsUp; final downEvents = moveMonth ? [_monthGroupedEventsUp.first] : _monthGroupedEventsDown; + + final ThemeData theme = Theme.of(context); + ScrollPhysics scrollPhysics = const AlwaysScrollableScrollPhysics(); return Column( children: [ @@ -292,8 +295,24 @@ class CalendarScrollView extends StatelessWidget { slivers: [ if (_enableLoadMore) SliverToBoxAdapter( - child: Text( - _enableLoadMore ? 'LOADING MORE' : 'SCROLL TO LOAD MORE', + child: Center( + child: Padding( + padding: const EdgeInsets.only(top: 10), + child: calendarState.isLoadingMoreUp + ? Icon( + Icons.more_horiz, + size: 50, + color: theme.colorScheme.secondary, + ) + : Text( + 'SCROLL TO LOAD MORE', + style: theme.textTheme.bodyLarge!.copyWith( + color: theme.colorScheme.secondary, + fontSize: 20, + fontWeight: FontWeight.bold, + ), + ), + ), ), ), SliverPadding( diff --git a/pubspec.lock b/pubspec.lock index 94732ae62..45a4c6e6f 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -61,10 +61,10 @@ packages: dependency: transitive description: name: async - sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0 + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" url: "https://pub.dev" source: hosted - version: "2.10.0" + version: "2.11.0" bloc: dependency: transitive description: @@ -181,10 +181,10 @@ packages: dependency: transitive description: name: characters - sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.3.0" checked_yaml: dependency: transitive description: @@ -213,10 +213,10 @@ packages: dependency: "direct main" description: name: collection - sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0 + sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c" url: "https://pub.dev" source: hosted - version: "1.17.0" + version: "1.17.1" convert: dependency: transitive description: @@ -675,10 +675,10 @@ packages: dependency: transitive description: name: js - sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7" + sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 url: "https://pub.dev" source: hosted - version: "0.6.5" + version: "0.6.7" json_annotation: dependency: "direct main" description: @@ -715,10 +715,10 @@ packages: dependency: transitive description: name: matcher - sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72" + sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb" url: "https://pub.dev" source: hosted - version: "0.12.13" + version: "0.12.15" material_color_utilities: dependency: transitive description: @@ -731,10 +731,10 @@ packages: dependency: "direct main" description: name: meta - sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42" + sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" url: "https://pub.dev" source: hosted - version: "1.8.0" + version: "1.9.1" mime: dependency: "direct main" description: @@ -775,6 +775,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.2" + open_file_plus: + dependency: "direct main" + description: + name: open_file_plus + sha256: f087e32722ffe4bac71925e7a1a9848a1008fd789e47c6628da3ed7845922227 + url: "https://pub.dev" + source: hosted + version: "3.4.1" overlay_support: dependency: "direct main" description: @@ -811,10 +819,10 @@ packages: dependency: transitive description: name: path - sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b + sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" url: "https://pub.dev" source: hosted - version: "1.8.2" + version: "1.8.3" path_provider: dependency: "direct main" description: @@ -1185,10 +1193,10 @@ packages: dependency: transitive description: name: test_api - sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206 + sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb url: "https://pub.dev" source: hosted - version: "0.4.16" + version: "0.5.1" timing: dependency: transitive description: @@ -1297,10 +1305,10 @@ packages: dependency: transitive description: name: vm_service - sha256: e7fb6c2282f7631712b69c19d1bff82f3767eea33a2321c14fa59ad67ea391c7 + sha256: f6deed8ed625c52864792459709183da231ebf66ff0cf09e69b573227c377efe url: "https://pub.dev" source: hosted - version: "9.4.0" + version: "11.3.0" watcher: dependency: transitive description: @@ -1321,10 +1329,10 @@ packages: dependency: transitive description: name: webdriver - sha256: ef67178f0cc7e32c1494645b11639dd1335f1d18814aa8435113a92e9ef9d841 + sha256: "3c923e918918feeb90c4c9fdf1fe39220fa4c0e8e2c0fffaded174498ef86c49" url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.0.2" win32: dependency: transitive description: @@ -1366,5 +1374,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=2.19.0 <3.0.0" + dart: ">=3.0.0-0 <4.0.0" flutter: ">=3.7.0-0"