File tree Expand file tree Collapse file tree 5 files changed +23
-20
lines changed
Expand file tree Collapse file tree 5 files changed +23
-20
lines changed Original file line number Diff line number Diff line change @@ -354,6 +354,7 @@ class _CartPageState extends State<CartPage> {
354354 // Handle checkout action
355355 await Injector .cartRepository.checkout (
356356 context,
357+ Navigator .of (context),
357358 coupon: coupon,
358359 onLoading: (p0) {
359360 isLoading.value = p0;
Original file line number Diff line number Diff line change @@ -156,7 +156,8 @@ class CartRepository {
156156 }
157157
158158 Future <void > checkout (
159- BuildContext context, {
159+ BuildContext context,
160+ NavigatorState navigator, {
160161 Coupon ? coupon,
161162 required Function (bool ) onLoading,
162163 }) async {
@@ -290,22 +291,21 @@ class CartRepository {
290291 );
291292 }).then ((semester) {
292293 SharedPreferences .getInstance ().then ((sharedPreferences) {
293- Navigator .of (context).pop ();
294- if (context.mounted) {
295- Navigator .of (context).pushReplacement (
296- MaterialPageRoute (
297- builder:
298- (context) => MyHomePage (
299- name:
300- userCredential.user? .displayName? .split (
301- " " ,
302- )[0 ] ??
303- "User" ,
304- semester: semester,
305- ),
306- ),
307- );
308- }
294+ navigator.pop ();
295+
296+ navigator.pushReplacement (
297+ MaterialPageRoute (
298+ builder:
299+ (context) => MyHomePage (
300+ name:
301+ userCredential.user? .displayName? .split (
302+ " " ,
303+ )[0 ] ??
304+ "User" ,
305+ semester: semester,
306+ ),
307+ ),
308+ );
309309 });
310310 });
311311 } on Exception catch (e) {
Original file line number Diff line number Diff line change @@ -64,6 +64,8 @@ Future<void> main() async {
6464 criticalAlert: true ,
6565 );
6666 }
67+ // for handling the recieved notifications on windows, we are manualloy showing the notification using flutter local notifications
68+
6769 print (
6870 'Firebase Messaging Token: ${await FirebaseMessaging .instance .getToken ()}' ,
6971 );
Original file line number Diff line number Diff line change @@ -725,8 +725,8 @@ class UnitListTile extends StatelessWidget {
725725 (units[index]
726726 .roadmap
727727 ? .roadmapItems
728- .last
729- .isUnlocked ??
728+ .lastOrNull
729+ ? .isUnlocked ??
730730 false )
731731 ? Icons .chevron_right_outlined
732732 : Icons .lock_outline,
Original file line number Diff line number Diff line change 11name : chitti
22description : " Your last minute exam preparation buddy"
33publish_to : ' none'
4- version : 2.0.3+19
4+ version : 2.0.4+20
55
66environment :
77 sdk : ^3.7.0-267.0.dev
You can’t perform that action at this time.
0 commit comments