From 506fb82dd08cd772516ca2f98384da6378662485 Mon Sep 17 00:00:00 2001 From: Kima Date: Thu, 20 Jun 2024 13:53:10 +0200 Subject: [PATCH] changed lots of thing bc pub upgrade --- refilc/lib/api/client.dart | 2 +- refilc/lib/api/providers/status_provider.dart | 6 ++-- refilc/pubspec.yaml | 6 ++-- .../lib/screens/login/login_screen.dart | 4 +-- refilc_desktop_ui/pubspec.yaml | 6 ++-- refilc_kreta_api/pubspec.yaml | 4 +-- refilc_mobile_ui/lib/common/filter_bar.dart | 8 +++-- refilc_mobile_ui/lib/pages/grades/graph.dart | 29 +++++++++---------- refilc_mobile_ui/pubspec.yaml | 14 ++++----- refilc_plus | 2 +- 10 files changed, 41 insertions(+), 40 deletions(-) diff --git a/refilc/lib/api/client.dart b/refilc/lib/api/client.dart index 83fe55a..0387e84 100644 --- a/refilc/lib/api/client.dart +++ b/refilc/lib/api/client.dart @@ -55,7 +55,7 @@ class FilcAPI { static const stripeSheet = "$payment/stripe-sheet"; static Future checkConnectivity() async => - (await Connectivity().checkConnectivity()) != ConnectivityResult.none; + (await Connectivity().checkConnectivity())[0] != ConnectivityResult.none; static Future?> getSchools() async { try { diff --git a/refilc/lib/api/providers/status_provider.dart b/refilc/lib/api/providers/status_provider.dart index 9004cb2..458c145 100644 --- a/refilc/lib/api/providers/status_provider.dart +++ b/refilc/lib/api/providers/status_provider.dart @@ -15,7 +15,7 @@ class StatusProvider extends ChangeNotifier { StatusProvider() { _handleNetworkChanges(); _handleDNSFailure(); - Connectivity().checkConnectivity().then((value) => _networkType = value); + Connectivity().checkConnectivity().then((value) => _networkType = value[0]); } Status? getStatus() => _stack.isNotEmpty ? _stack[0] : null; @@ -24,8 +24,8 @@ class StatusProvider extends ChangeNotifier { void _handleNetworkChanges() { Connectivity().onConnectivityChanged.listen((event) { - _networkType = event; - if (event == ConnectivityResult.none) { + _networkType = event[0]; + if (event[0] == ConnectivityResult.none) { if (!_stack.contains(Status.network)) { _stack.remove(Status.apiError); _stack.insert(0, Status.network); diff --git a/refilc/pubspec.yaml b/refilc/pubspec.yaml index 58803ae..81005fc 100644 --- a/refilc/pubspec.yaml +++ b/refilc/pubspec.yaml @@ -40,17 +40,17 @@ dependencies: path_provider: ^2.0.2 permission_handler: ^11.0.1 share_plus: ^9.0.0 - connectivity_plus: ^5.0.2 + connectivity_plus: ^6.0.3 flutter_displaymode: ^0.6.0 quick_actions: ^1.0.1 animated_list_plus: ^0.5.0 dynamic_color: ^1.2.2 material_color_utilities: ^0.8.0 crypto: ^3.0.2 - elegant_notification: ^1.6.1 + elegant_notification: ^2.2.0 flutter_feather_icons: ^2.0.0+1 live_activities: ^1.7.4 - animated_flip_counter: ^0.2.5 + animated_flip_counter: ^0.3.4 lottie: ^3.1.0 rive: ^0.12.4 animated_background: ^2.0.0 diff --git a/refilc_desktop_ui/lib/screens/login/login_screen.dart b/refilc_desktop_ui/lib/screens/login/login_screen.dart index 3541be3..892db46 100644 --- a/refilc_desktop_ui/lib/screens/login/login_screen.dart +++ b/refilc_desktop_ui/lib/screens/login/login_screen.dart @@ -68,7 +68,7 @@ class LoginScreenState extends State { overflow: TextOverflow.ellipsis, style: const TextStyle(color: Colors.red), ), - onActionPressed: () {}, + // onActionPressed: () {}, onCloseButtonPressed: () {}, onDismiss: () {}, onProgressFinished: () {}, @@ -340,7 +340,7 @@ class LoginScreenState extends State { overflow: TextOverflow.ellipsis, style: const TextStyle(color: Colors.black), ), - onActionPressed: () {}, + // onActionPressed: () {}, onCloseButtonPressed: () {}, onDismiss: () {}, onProgressFinished: () {}, diff --git a/refilc_desktop_ui/pubspec.yaml b/refilc_desktop_ui/pubspec.yaml index 5c166a4..06d3bc0 100644 --- a/refilc_desktop_ui/pubspec.yaml +++ b/refilc_desktop_ui/pubspec.yaml @@ -26,12 +26,12 @@ dependencies: provider: ^6.1.1 url_launcher: ^6.2.5 flutter_linkify: ^6.0.0 - flutter_markdown: ^0.6.20+1 + flutter_markdown: ^0.7.2+1 animations: ^2.0.11 confetti: ^0.7.0 auto_size_text: ^3.0.0 flutter_acrylic: ^1.1.3 - elegant_notification: ^1.13.0 + elegant_notification: ^2.2.0 flutter_staggered_grid_view: ^0.7.0 i18n_extension: ^12.0.1 flutter_expandable_fab: ^2.0.0 @@ -41,7 +41,7 @@ dependencies: flutter_custom_tabs: ^2.0.0+1 dev_dependencies: - flutter_lints: ^3.0.1 + flutter_lints: ^4.0.0 flutter: uses-material-design: true diff --git a/refilc_kreta_api/pubspec.yaml b/refilc_kreta_api/pubspec.yaml index d413df2..fd935aa 100644 --- a/refilc_kreta_api/pubspec.yaml +++ b/refilc_kreta_api/pubspec.yaml @@ -11,10 +11,10 @@ dependencies: path: ../refilc/ http: ^1.1.2 provider: ^6.1.1 - file_picker: ^6.1.1 + file_picker: ^8.0.5 intl: ^0.19.0 i18n_extension: ^12.0.1 uuid: ^4.3.3 dev_dependencies: - flutter_lints: ^3.0.1 + flutter_lints: ^4.0.0 diff --git a/refilc_mobile_ui/lib/common/filter_bar.dart b/refilc_mobile_ui/lib/common/filter_bar.dart index cac9294..e4e1f04 100644 --- a/refilc_mobile_ui/lib/common/filter_bar.dart +++ b/refilc_mobile_ui/lib/common/filter_bar.dart @@ -49,7 +49,7 @@ class _FilterBarState extends State { controller: widget.controller, isScrollable: widget.scrollable, physics: const BouncingScrollPhysics(), - // Label + // label labelStyle: Theme.of(context).textTheme.titleMedium!.copyWith( fontWeight: FontWeight.w600, fontSize: 15.0, @@ -57,7 +57,7 @@ class _FilterBarState extends State { labelPadding: const EdgeInsets.symmetric(horizontal: 12, vertical: 3), labelColor: Theme.of(context).colorScheme.secondary, unselectedLabelColor: AppColors.of(context).text.withOpacity(0.65), - // Indicator + // indicator indicatorSize: TabBarIndicatorSize.tab, indicatorPadding: const EdgeInsets.symmetric(vertical: 8.0), indicator: BoxDecoration( @@ -65,7 +65,9 @@ class _FilterBarState extends State { borderRadius: BorderRadius.circular(45.0), ), overlayColor: WidgetStateProperty.all(const Color(0x00000000)), - // Tabs + // underline (bottom border) + dividerColor: Colors.transparent, + // tabs padding: EdgeInsets.zero, tabs: widget.censored ? censoredItemsWidth diff --git a/refilc_mobile_ui/lib/pages/grades/graph.dart b/refilc_mobile_ui/lib/pages/grades/graph.dart index 15d8a4d..c8c382b 100644 --- a/refilc_mobile_ui/lib/pages/grades/graph.dart +++ b/refilc_mobile_ui/lib/pages/grades/graph.dart @@ -217,7 +217,7 @@ class GradeGraphState extends State { height: 158, child: subjectSpots.length > 1 ? Padding( - padding: const EdgeInsets.only(top: 8.0, right: 8.0), + padding: const EdgeInsets.only(top: 6.0, right: 0.0), child: LineChart( LineChartData( extraLinesData: ExtraLinesData( @@ -347,7 +347,7 @@ class GradeGraphState extends State { bottomTitles: AxisTitles( sideTitles: SideTitles( showTitles: true, - reservedSize: 24, + reservedSize: 25, getTitlesWidget: (value, meta) { if (value == meta.max || value == meta.min) { return Container(); @@ -362,17 +362,14 @@ class GradeGraphState extends State { title = title.substring(0, min(title.length, 4)); - return Padding( - padding: const EdgeInsets.all(12.0), - child: Text( - title.toUpperCase(), - style: TextStyle( - color: AppColors.of(context) - .text - .withOpacity(.75), - fontWeight: FontWeight.bold, - fontSize: 14.0, - ), + return Text( + title.toUpperCase(), + style: TextStyle( + color: AppColors.of(context) + .text + .withOpacity(.75), + fontWeight: FontWeight.bold, + fontSize: 14.0, ), ); }, @@ -425,14 +422,16 @@ class GradeGraphState extends State { sideTitles: SideTitles( showTitles: true, interval: 1.0, + reservedSize: 26.0, getTitlesWidget: (value, meta) => Padding( - padding: const EdgeInsets.all(16.0), + padding: const EdgeInsets.only( + left: 6.0, right: 10.0), child: Text( value.toInt().toString(), style: TextStyle( color: AppColors.of(context).text, fontWeight: FontWeight.bold, - fontSize: 18.0, + fontSize: 16.0, ), ), ), diff --git a/refilc_mobile_ui/pubspec.yaml b/refilc_mobile_ui/pubspec.yaml index 36a4fba..3988e9f 100644 --- a/refilc_mobile_ui/pubspec.yaml +++ b/refilc_mobile_ui/pubspec.yaml @@ -24,15 +24,15 @@ dependencies: fl_chart: ^0.68.0 url_launcher: ^6.2.5 flutter_material_color_picker: ^1.1.0+2 - photo_view: ^0.14.0 + photo_view: ^0.15.0 flutter_linkify: ^6.0.0 flutter_custom_tabs: ^2.0.0+1 - flutter_markdown: ^0.6.23 + flutter_markdown: ^0.7.2+1 animations: ^2.0.11 animated_list_plus: ^0.5.0 confetti: ^0.7.0 live_activities: ^1.9.1+1 - animated_flip_counter: ^0.2.5 + animated_flip_counter: ^0.3.4 lottie: ^3.1.0 rive: ^0.12.4 animated_background: ^2.0.0 @@ -48,12 +48,12 @@ dependencies: rounded_expansion_tile: git: url: https://github.com/kimaah/rounded_expansion_tile.git - go_router: ^13.2.0 + go_router: ^14.2.0 flutter_expandable_fab: ^2.0.0 intl: ^0.19.0 i18n_extension: ^12.0.1 auto_size_text: ^3.0.0 - connectivity_plus: ^5.0.2 + connectivity_plus: ^6.0.3 collection: ^1.18.0 share_plus: ^9.0.0 image_picker: ^1.0.7 @@ -72,10 +72,10 @@ dependencies: carousel_slider: ^4.2.1 flutter_portal: ^1.1.4 webview_flutter: ^4.8.0 - file_picker: ^6.2.1 + file_picker: ^8.0.5 dev_dependencies: - flutter_lints: ^3.0.1 + flutter_lints: ^4.0.0 flutter: uses-material-design: true diff --git a/refilc_plus b/refilc_plus index 8af545b..515ad02 160000 --- a/refilc_plus +++ b/refilc_plus @@ -1 +1 @@ -Subproject commit 8af545b5a39bfbfc25c5f2a383dcdfada018cd75 +Subproject commit 515ad02f5ac9d9e35983b1652506238fd2839c4c