diff --git a/ios/Podfile b/ios/Podfile index c28d466..3e44f9c 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -1,5 +1,5 @@ # Uncomment this line to define a global platform for your project -platform :ios, '10.0' +platform :ios, '13.0' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 3ff7697..befe960 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -645,6 +645,9 @@ PODS: - firebase_core - Flutter - nanopb (< 2.30910.0, >= 2.30908.0) + - connectivity_plus (0.0.1): + - Flutter + - ReachabilitySwift - Firebase/Auth (10.16.0): - Firebase/CoreOnly - FirebaseAuth (~> 10.16.0) @@ -794,6 +797,7 @@ PODS: - permission_handler_apple (9.1.1): - Flutter - PromisesObjC (2.3.1) + - ReachabilitySwift (5.0.0) - RecaptchaInterop (100.0.0) - share_plus (0.0.1): - Flutter @@ -804,6 +808,7 @@ PODS: DEPENDENCIES: - cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`) + - connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`) - firebase_auth (from `.symlinks/plugins/firebase_auth/ios`) - firebase_core (from `.symlinks/plugins/firebase_core/ios`) - Flutter (from `Flutter`) @@ -836,12 +841,15 @@ SPEC REPOS: - leveldb-library - nanopb - PromisesObjC + - ReachabilitySwift - RecaptchaInterop - Toast EXTERNAL SOURCES: cloud_firestore: :path: ".symlinks/plugins/cloud_firestore/ios" + connectivity_plus: + :path: ".symlinks/plugins/connectivity_plus/ios" firebase_auth: :path: ".symlinks/plugins/firebase_auth/ios" firebase_core: @@ -870,6 +878,7 @@ SPEC CHECKSUMS: AppAuth: 3bb1d1cd9340bd09f5ed189fb00b1cc28e1e8570 BoringSSL-GRPC: 3175b25143e648463a56daeaaa499c6cb86dad33 cloud_firestore: 8adb36c2bc754352c717984153ecd7e6c6898047 + connectivity_plus: bf0076dd84a130856aa636df1c71ccaff908fa1d Firebase: 25899099b77d255a636e3579c3d9dce10ec150d5 firebase_auth: ff474dcf17bee5762106162e0791433024890ada firebase_core: 68027ba03585e3efe1608e35d3ab2777a64eabe9 @@ -894,11 +903,12 @@ SPEC CHECKSUMS: path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943 permission_handler_apple: e76247795d700c14ea09e3a2d8855d41ee80a2e6 PromisesObjC: c50d2056b5253dadbd6c2bea79b0674bd5a52fa4 + ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825 RecaptchaInterop: 7d1a4a01a6b2cb1610a47ef3f85f0c411434cb21 share_plus: c3fef564749587fc939ef86ffb283ceac0baf9f5 shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126 Toast: 91b396c56ee72a5790816f40d3a94dd357abc196 -PODFILE CHECKSUM: 07c8de5daf3dba39cc68c5cf5a73c3a909d10c9a +PODFILE CHECKSUM: a57f30d18f102dd3ce366b1d62a55ecbef2158e5 COCOAPODS: 1.14.0 diff --git a/lib/main.dart b/lib/main.dart index 2c1aa1e..cc9c700 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -81,38 +81,38 @@ class splash_screen extends StatefulWidget { } class splash_screenState extends State { - AskPermission() async { - final prefs = await SharedPreferences.getInstance(); - final hasNotificationPermission = - prefs.getBool('notificationPermissionGranted'); - - if (hasNotificationPermission == null || - hasNotificationPermission == false) { - showDialog( - context: context, - builder: (context) => AlertDialog( - title: Text('Please grant notification permission'), - content: Text( - 'In order to receive notifications, please grant the app permission to access your notifications.'), - actions: [ - TextButton( - child: Text('Cancel'), - onPressed: () => Navigator.of(context).pop(), - ), - TextButton( - child: Text('Grant Permission'), - onPressed: () async { - await requestNotificationPermission(); - Navigator.of(context).pop(); - }, - ), - ], - ), - ); - } else { - stateChage(); - } - } + // AskPermission() async { + // final prefs = await SharedPreferences.getInstance(); + // final hasNotificationPermission = + // prefs.getBool('notificationPermissionGranted'); + + // if (hasNotificationPermission == null || + // hasNotificationPermission == false) { + // showDialog( + // context: context, + // builder: (context) => AlertDialog( + // title: Text('Please grant notification permission'), + // content: Text( + // 'In order to receive notifications, please grant the app permission to access your notifications.'), + // actions: [ + // TextButton( + // child: Text('Cancel'), + // onPressed: () => Navigator.of(context).pop(), + // ), + // TextButton( + // child: Text('Grant Permission'), + // onPressed: () async { + // await requestNotificationPermission(); + // Navigator.of(context).pop(); + // }, + // ), + // ], + // ), + // ); + // } else { + // stateChage(); + // } + // } Future requestExactAlarmsPermission() async { if (TargetPlatform.android == defaultTargetPlatform) { @@ -168,20 +168,20 @@ class splash_screenState extends State { Timer(Duration(seconds: 3), () { if (isLoggedIn != null) { if (isLoggedIn) { - Navigator.push( + Navigator.pushReplacement( context, MaterialPageRoute( builder: (context) => home_screen(), )); } else { - Navigator.push( + Navigator.pushReplacement( context, MaterialPageRoute( builder: (context) => signin_screen(), )); } } else { - Navigator.push( + Navigator.pushReplacement( context, MaterialPageRoute( builder: (context) => signin_screen(), @@ -193,8 +193,8 @@ class splash_screenState extends State { Future _init() async { await requestNotificationPermission(); await requestExactAlarmsPermission(); - // stateChage(); - AskPermission(); + stateChage(); + // AskPermission(); } @override diff --git a/lib/screens/bottomsheet_profile.dart b/lib/screens/bottomsheet_profile.dart index 550b6ff..01974b3 100644 --- a/lib/screens/bottomsheet_profile.dart +++ b/lib/screens/bottomsheet_profile.dart @@ -341,7 +341,7 @@ showOptions(BuildContext context, String name , String email){ fontWeight: FontWeight.w400), ), onPressed: () { - sign_out; + sign_out(context); }, ), ], diff --git a/lib/screens/home_screen.dart b/lib/screens/home_screen.dart index dcfa58d..c30357a 100644 --- a/lib/screens/home_screen.dart +++ b/lib/screens/home_screen.dart @@ -260,14 +260,14 @@ class _home_screenState extends State { children: [ GestureDetector( onTap: () async { - // try { - // NotificationService().showNotification( - // body: "this is body", - // title: "this is title", - // ); - // } catch (e) { - // print('e'); - // } + try { + NotificationService().showNotification( + body: "this is body", + title: "this is title", + ); + } catch (e) { + print('e'); + } showOptions( context, name.toString(), email.toString()); @@ -584,11 +584,9 @@ class _home_screenState extends State { child: SingleChildScrollView( scrollDirection: - Axis.vertical, + Axis.horizontal, child: Text( - currentTask - .title ?? - "", + "Title : ${currentTask.title ?? ""}", style: const TextStyle( letterSpacing: 2, @@ -622,9 +620,7 @@ class _home_screenState extends State { Axis.vertical, child: Text( // "Note 1", - currentTask - .note ?? - "", + "Body : ${currentTask.note ?? ""}", style: const TextStyle( fontSize: 18, @@ -880,13 +876,13 @@ class _home_screenState extends State { scrollDirection: Axis.horizontal, child: Text( - // "Title " + index.toString(), + // "Note 1", currentTask.title ?? "", style: const TextStyle( - fontSize: 17, + fontSize: 18, color: Colors.white, fontWeight: - FontWeight.bold), + FontWeight.w300), ), ), ), @@ -1108,67 +1104,78 @@ class _home_screenState extends State { MainAxisAlignment .spaceBetween, children: [ + Row( + mainAxisAlignment: + MainAxisAlignment + .start, + children: [ + Text( + "Task Completed at : ", + style: TextStyle( + fontSize: + 15, + fontWeight: + FontWeight + .bold, + color: Colors + .white), + ), + SizedBox( + width: 5, + ), + Text( + // " 02:04 PM - 02:19 PM", + currentdoneTask + .completedTime ?? + '', + + style: + const TextStyle( + color: Colors + .white, + ), + ), + ], + ), FittedBox( child: Container( - constraints: BoxConstraints( - maxWidth: - MediaQuery.of(context).size.width - - 100, - maxHeight: - MediaQuery.of(context).size.height / - 8), - child: Column( - children: [ - Row( - mainAxisAlignment: - MainAxisAlignment.start, - children: [ - Text( - "Task Completed at : ", - style: TextStyle( - fontSize: 15, - fontWeight: FontWeight.bold, - color: Colors.white), - ), - SizedBox( - width: - 5, - ), - Text( - // " 02:04 PM - 02:19 PM", - currentdoneTask.completedTime ?? - '', - - style: - const TextStyle( - color: Colors.white, - ), - ), - ], - ), - SizedBox( - height: - 10, - ), + color: Colors + .red, + constraints: + BoxConstraints( + maxWidth: MediaQuery.of(context) + .size + .width - + 100, + maxHeight: MediaQuery.of(context) + .size + .height / + 10, + ), + child: SingleChildScrollView( - scrollDirection: - Axis.vertical, - child: - Row( - children: [ - Text( - "Title : ", - style: TextStyle(fontSize: 15, fontWeight: FontWeight.bold, color: Colors.white), - ), - Text( - currentdoneTask.title ?? "", - style: const TextStyle(fontSize: 17, color: Colors.white, fontWeight: FontWeight.bold), - ), - ], + scrollDirection: + Axis.horizontal, + child: Row( + children: [ + Text( + "Title : ", + style: TextStyle( + fontSize: 15, + fontWeight: FontWeight.bold, + color: Colors.white), ), - ), - ], + Text( + currentdoneTask.title ?? + "", + style: const TextStyle( + fontSize: 17, + color: Colors.white, + fontWeight: FontWeight.bold), + ), + ], + ), ), ), ), diff --git a/lib/widgets/custom_widgets.dart b/lib/widgets/custom_widgets.dart index c0237b3..9864555 100644 --- a/lib/widgets/custom_widgets.dart +++ b/lib/widgets/custom_widgets.dart @@ -86,7 +86,7 @@ class _CustomElevatedButtonState extends State { child: loading ? SpinKitWave( color: Colors.white, - size: 25, + size: 25.0, ) : FittedBox( child: Text(