Skip to content

Commit

Permalink
upgraded versions
Browse files Browse the repository at this point in the history
  • Loading branch information
devout-coder committed Sep 28, 2023
1 parent f3bff77 commit 8f61d80
Show file tree
Hide file tree
Showing 12 changed files with 84 additions and 67 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,4 @@ lib/firebase_options.dart
ios/Runner/GoogleService-Info.plist
ios/firebase_app_id_file.json
Session.vim
TsecAppKey.jks
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ subprojects {
project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
27 changes: 14 additions & 13 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class _TSECAppState extends ConsumerState<TSECApp> {
super.didChangeDependencies();

_routes = GoRouter(
urlPathStrategy: UrlPathStrategy.path,
// urlPathStrategy: UrlPathStrategy.path,
routes: [
GoRoute(
path: "/",
Expand Down Expand Up @@ -124,14 +124,14 @@ class _TSECAppState extends ConsumerState<TSECApp> {
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,
Expand All @@ -141,8 +141,8 @@ class _TSECAppState extends ConsumerState<TSECApp> {
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);
},
),
Expand All @@ -153,8 +153,8 @@ class _TSECAppState extends ConsumerState<TSECApp> {
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);
},
Expand Down Expand Up @@ -207,6 +207,7 @@ class _TSECAppState extends ConsumerState<TSECApp> {
return MaterialApp.router(
builder: (context, child) =>
MediaQuery(data: getTextScale(context), child: child!),
routeInformationProvider: _routes.routeInformationProvider,
routeInformationParser: _routes.routeInformationParser,
routerDelegate: _routes.routerDelegate,
title: 'TSEC App',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
41 changes: 22 additions & 19 deletions lib/screens/main_screen/main_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -271,25 +271,28 @@ class _MainScreenAppBarState extends ConsumerState<MainScreenAppBar> {
),
),
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(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
1 change: 1 addition & 0 deletions lib/screens/profile_screen/widgets/profile_text_field.dart
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ class _ProfileTextFieldState extends State<ProfileTextField> {
),
labelText: widget.label,
),
style: TextStyle(color: Theme.of(context).colorScheme.onSecondaryContainer),
onTap: widget.onTap ?? () {},
onChanged: widget.onSaved ?? (val) {},
validator: widget.validator,
Expand Down
2 changes: 1 addition & 1 deletion lib/utils/themes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
4 changes: 2 additions & 2 deletions lib/widgets/custom_app_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 3 additions & 1 deletion lib/widgets/custom_scaffold.dart
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,10 @@ class _CustomScaffoldState extends ConsumerState<CustomScaffold>
Future<void> _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);
}
}

Expand Down
60 changes: 34 additions & 26 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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"
5 changes: 3 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8f61d80

Please sign in to comment.