From 8f61d8085aaf2aee45d80de8bab0d280561b4dff Mon Sep 17 00:00:00 2001 From: Pranil Date: Fri, 29 Sep 2023 02:06:56 +0530 Subject: [PATCH] upgraded versions --- .gitignore | 1 + android/build.gradle | 2 +- lib/main.dart | 27 +++++---- .../widgets/department_screen_app_bar.dart | 2 +- lib/screens/main_screen/main_screen.dart | 41 +++++++------ .../widgets/profile_screen_appbar.dart | 2 +- .../widgets/profile_text_field.dart | 1 + lib/utils/themes.dart | 2 +- lib/widgets/custom_app_bar.dart | 4 +- lib/widgets/custom_scaffold.dart | 4 +- pubspec.lock | 60 +++++++++++-------- pubspec.yaml | 5 +- 12 files changed, 84 insertions(+), 67 deletions(-) diff --git a/.gitignore b/.gitignore index ba3b5689..e8ed45bd 100644 --- a/.gitignore +++ b/.gitignore @@ -57,3 +57,4 @@ lib/firebase_options.dart ios/Runner/GoogleService-Info.plist ios/firebase_app_id_file.json Session.vim +TsecAppKey.jks diff --git a/android/build.gradle b/android/build.gradle index d214febd..13ce65a5 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -27,6 +27,6 @@ subprojects { project.evaluationDependsOn(':app') } -task clean(type: Delete) { +tasks.register("clean", Delete) { delete rootProject.buildDir } diff --git a/lib/main.dart b/lib/main.dart index 68eeaa18..7567471f 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -84,7 +84,7 @@ class _TSECAppState extends ConsumerState { super.didChangeDependencies(); _routes = GoRouter( - urlPathStrategy: UrlPathStrategy.path, + // urlPathStrategy: UrlPathStrategy.path, routes: [ GoRoute( path: "/", @@ -124,14 +124,14 @@ class _TSECAppState extends ConsumerState { path: "/details_page", builder: (context, state) { EventModel eventModel = EventModel( - state.queryParams["Event Name"]!, - state.queryParams["Event Time"]!, - state.queryParams["Event Date"]!, - state.queryParams["Event decription"]!, - state.queryParams["Event registration url"]!, - state.queryParams["Event Image Url"]!, - state.queryParams["Event Location"]!, - state.queryParams["Committee Name"]!); + state.uri.queryParameters["Event Name"]!, + state.uri.queryParameters["Event Time"]!, + state.uri.queryParameters["Event Date"]!, + state.uri.queryParameters["Event decription"]!, + state.uri.queryParameters["Event registration url"]!, + state.uri.queryParameters["Event Image Url"]!, + state.uri.queryParameters["Event Location"]!, + state.uri.queryParameters["Committee Name"]!); return EventDetail( eventModel: eventModel, @@ -141,8 +141,8 @@ class _TSECAppState extends ConsumerState { GoRoute( path: "/department", builder: (context, state) { - final department = DepartmentEnum - .values[int.parse(state.queryParams["department"] as String)]; + final department = DepartmentEnum.values[ + int.parse(state.uri.queryParameters["department"] as String)]; return DepartmentScreen(department: department); }, ), @@ -153,8 +153,8 @@ class _TSECAppState extends ConsumerState { GoRoute( path: '/profile-page', builder: (context, state) { - String justLoggedInSt = - state.queryParams['justLoggedIn'] ?? "false"; // may be null + String justLoggedInSt = state.uri.queryParameters['justLoggedIn'] ?? + "false"; // may be null bool justLoggedIn = justLoggedInSt == "true"; return ProfilePage(justLoggedIn: justLoggedIn); }, @@ -207,6 +207,7 @@ class _TSECAppState extends ConsumerState { return MaterialApp.router( builder: (context, child) => MediaQuery(data: getTextScale(context), child: child!), + routeInformationProvider: _routes.routeInformationProvider, routeInformationParser: _routes.routeInformationParser, routerDelegate: _routes.routerDelegate, title: 'TSEC App', diff --git a/lib/screens/department_screen/widgets/department_screen_app_bar.dart b/lib/screens/department_screen/widgets/department_screen_app_bar.dart index 5ccd00d2..674e5788 100644 --- a/lib/screens/department_screen/widgets/department_screen_app_bar.dart +++ b/lib/screens/department_screen/widgets/department_screen_app_bar.dart @@ -6,7 +6,7 @@ import 'package:tsec_app/provider/auth_provider.dart'; import '../../../utils/themes.dart'; class DepartmentScreenAppBar extends ConsumerStatefulWidget - with PreferredSizeWidget { + implements PreferredSizeWidget { final String title; const DepartmentScreenAppBar({Key? key, required this.title}) : super(key: key); diff --git a/lib/screens/main_screen/main_screen.dart b/lib/screens/main_screen/main_screen.dart index 41c7a783..3c9cb84a 100644 --- a/lib/screens/main_screen/main_screen.dart +++ b/lib/screens/main_screen/main_screen.dart @@ -271,25 +271,28 @@ class _MainScreenAppBarState extends ConsumerState { ), ), onTap: () { - GoRouter.of(context) - .pushNamed("details_page", queryParams: { - "Event Name": - eventList[_currentIndex].eventName, - "Event Time": - eventList[_currentIndex].eventTime, - "Event Date": - eventList[_currentIndex].eventDate, - "Event decription": eventList[_currentIndex] - .eventDescription, - "Event registration url": - eventList[_currentIndex] - .eventRegistrationUrl, - "Event Image Url": item, - "Event Location": - eventList[_currentIndex].eventLocation, - "Committee Name": - eventList[_currentIndex].committeeName - }); + GoRouter.of(context).pushNamed("details_page", + queryParameters: { + "Event Name": + eventList[_currentIndex].eventName, + "Event Time": + eventList[_currentIndex].eventTime, + "Event Date": + eventList[_currentIndex].eventDate, + "Event decription": + eventList[_currentIndex] + .eventDescription, + "Event registration url": + eventList[_currentIndex] + .eventRegistrationUrl, + "Event Image Url": item, + "Event Location": + eventList[_currentIndex] + .eventLocation, + "Committee Name": + eventList[_currentIndex] + .committeeName + }); }), ) .toList(), diff --git a/lib/screens/profile_screen/widgets/profile_screen_appbar.dart b/lib/screens/profile_screen/widgets/profile_screen_appbar.dart index 70d9d341..d3bf80ee 100644 --- a/lib/screens/profile_screen/widgets/profile_screen_appbar.dart +++ b/lib/screens/profile_screen/widgets/profile_screen_appbar.dart @@ -7,7 +7,7 @@ import 'package:tsec_app/screens/profile_screen/profile_screen.dart'; import '../../../utils/themes.dart'; class ProfilePageAppBar extends ConsumerStatefulWidget - with PreferredSizeWidget { + implements PreferredSizeWidget { final String title; const ProfilePageAppBar({Key? key, required this.title}) : super(key: key); diff --git a/lib/screens/profile_screen/widgets/profile_text_field.dart b/lib/screens/profile_screen/widgets/profile_text_field.dart index 9b9b6561..f0a5f498 100644 --- a/lib/screens/profile_screen/widgets/profile_text_field.dart +++ b/lib/screens/profile_screen/widgets/profile_text_field.dart @@ -65,6 +65,7 @@ class _ProfileTextFieldState extends State { ), labelText: widget.label, ), + style: TextStyle(color: Theme.of(context).colorScheme.onSecondaryContainer), onTap: widget.onTap ?? () {}, onChanged: widget.onSaved ?? (val) {}, validator: widget.validator, diff --git a/lib/utils/themes.dart b/lib/utils/themes.dart index 1a467986..890d0c78 100644 --- a/lib/utils/themes.dart +++ b/lib/utils/themes.dart @@ -76,7 +76,7 @@ late final theme = ThemeData( fontFamily: "SF Pro Text", colorScheme: ColorScheme.fromSwatch().copyWith( secondary: Colors.white, - onPrimary: Color.fromARGB(255, 78, 73, 73), + // onPrimary: Color.fromARGB(255, 78, 73, 73), inversePrimary: Color.fromARGB(255, 241, 241, 241), primaryContainer: Colors.white, secondaryContainer: Color(0xff00C62C), diff --git a/lib/widgets/custom_app_bar.dart b/lib/widgets/custom_app_bar.dart index 1256b187..c70685ad 100644 --- a/lib/widgets/custom_app_bar.dart +++ b/lib/widgets/custom_app_bar.dart @@ -2,8 +2,8 @@ import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import '../utils/themes.dart'; -class CustomAppBar extends ConsumerWidget with PreferredSizeWidget { - const CustomAppBar({ +class CustomAppBar extends ConsumerWidget implements PreferredSizeWidget { + CustomAppBar({ Key? key, required this.title, required this.image, diff --git a/lib/widgets/custom_scaffold.dart b/lib/widgets/custom_scaffold.dart index 12ed24cf..ae066dc3 100644 --- a/lib/widgets/custom_scaffold.dart +++ b/lib/widgets/custom_scaffold.dart @@ -316,8 +316,10 @@ class _CustomScaffoldState extends ConsumerState Future _navigate(String path) async { await _controller.reverse(); + final router = GoRouter.of(context); - if (router.location != path) router.push(path); + if (GoRouterState.of(context).uri.toString() != path) router.push(path); + // router.push(path); } } diff --git a/pubspec.lock b/pubspec.lock index e27312a0..8b93b68c 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -45,10 +45,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" boolean_selector: dependency: transitive description: @@ -157,10 +157,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: @@ -221,10 +221,10 @@ packages: dependency: transitive description: name: collection - sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0 + sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687 url: "https://pub.dev" source: hosted - version: "1.17.0" + version: "1.17.2" convert: dependency: transitive description: @@ -269,10 +269,10 @@ packages: dependency: "direct main" description: name: date_picker_timeline - sha256: d92956ddd6eb3070f5637b1514201342e739b6ed1ad830c365d64f9349f4f682 + sha256: dc754de3a99ad654c5633072cb9edac27e0b2875c81c7286e8c6cf419082a110 url: "https://pub.dev" source: hosted - version: "1.2.3" + version: "1.2.5" desktop_webview_auth: dependency: transitive description: @@ -649,10 +649,10 @@ packages: dependency: "direct main" description: name: go_router - sha256: "25ae21384b758eb80daff113fe8bfb785c2dd17b69fe4885008fe764b26fd1ca" + sha256: a07c781bf55bf11ae85133338e4850f0b4e33e261c44a66c750fc707d65d8393 url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "11.1.2" google_sign_in: dependency: transitive description: @@ -801,10 +801,10 @@ packages: dependency: "direct main" description: name: intl - sha256: "910f85bce16fb5c6f614e117efa303e85a1731bb0081edf3604a2ae6e9a3cc91" + sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d" url: "https://pub.dev" source: hosted - version: "0.17.0" + version: "0.18.1" io: dependency: transitive description: @@ -865,26 +865,26 @@ packages: dependency: transitive description: name: matcher - sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72" + sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" url: "https://pub.dev" source: hosted - version: "0.12.13" + version: "0.12.16" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 + sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" url: "https://pub.dev" source: hosted - version: "0.2.0" + version: "0.5.0" meta: dependency: transitive description: name: meta - sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42" + sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" url: "https://pub.dev" source: hosted - version: "1.8.0" + version: "1.9.1" mime: dependency: transitive description: @@ -921,10 +921,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_drawing: dependency: transitive description: @@ -1230,10 +1230,10 @@ packages: dependency: transitive description: name: source_span - sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "1.10.0" sqflite: dependency: transitive description: @@ -1310,10 +1310,10 @@ packages: dependency: transitive description: name: test_api - sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206 + sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8" url: "https://pub.dev" source: hosted - version: "0.4.16" + version: "0.6.0" timing: dependency: transitive description: @@ -1434,6 +1434,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.2" + web: + dependency: transitive + description: + name: web + sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10 + url: "https://pub.dev" + source: hosted + version: "0.1.4-beta" web_socket_channel: dependency: transitive description: @@ -1475,5 +1483,5 @@ packages: source: hosted version: "3.1.1" sdks: - dart: ">=2.18.0 <3.0.0" - flutter: ">=3.3.0" + dart: ">=3.1.0-185.0.dev <4.0.0" + flutter: ">=3.7.0" diff --git a/pubspec.yaml b/pubspec.yaml index e85d1f60..b3af5be7 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -41,9 +41,10 @@ dependencies: flutter_riverpod: ^1.0.4 flutterfire_ui: ^0.4.3+20 get_it: ^7.2.0 - go_router: ^3.1.1 + # go_router: ^3.1.1 + go_router: ^11.1.2 image_picker: ^1.0.0 - intl: ^0.17.0 + intl: ^0.18.1 json_annotation: ^4.6.0 open_file: ^3.2.1 path_provider: ^2.0.12