diff --git a/.vscode/settings.json b/.vscode/settings.json index c5f3f6b..0e14d8e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,3 @@ { - "java.configuration.updateBuildConfiguration": "interactive" + "java.configuration.updateBuildConfiguration": "disabled" } \ No newline at end of file diff --git a/android/app/build.gradle b/android/app/build.gradle index 2805916..b4ebaae 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -67,4 +67,7 @@ flutter { dependencies { implementation 'androidx.multidex:multidex:2.0.1' -} + classpath 'com.android.tools.build:gradle:4.1.0' + classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.21' + classpath 'com.google.gms:google-services:4.3.10' +} \ No newline at end of file diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 86eb6ed..a0b04c0 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,9 +1,13 @@ + + - + - + diff --git a/android/app/src/main/res/drawable/launch_background.xml b/android/app/src/main/res/drawable/launch_background.xml deleted file mode 100644 index 304732f..0000000 --- a/android/app/src/main/res/drawable/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/android/build.gradle b/android/build.gradle index 0391438..415c5a8 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -31,4 +31,4 @@ subprojects { tasks.register("clean", Delete) { delete rootProject.buildDir -} +} \ No newline at end of file diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index 3c472b9..98e7ab4 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,6 @@ +#Mon Nov 06 23:48:39 IST 2023 distributionBase=GRADLE_USER_HOME +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip +zipStoreBase=GRADLE_USER_HOME diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 91ae0ca..e97ce36 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -640,7 +640,7 @@ PODS: - BoringSSL-GRPC/Implementation (0.0.24): - BoringSSL-GRPC/Interface (= 0.0.24) - BoringSSL-GRPC/Interface (0.0.24) - - cloud_firestore (4.12.1): + - cloud_firestore (4.12.2): - Firebase/Firestore (= 10.16.0) - firebase_core - Flutter @@ -653,11 +653,11 @@ PODS: - Firebase/Firestore (10.16.0): - Firebase/CoreOnly - FirebaseFirestore (~> 10.16.0) - - firebase_auth (4.12.0): + - firebase_auth (4.12.1): - Firebase/Auth (= 10.16.0) - firebase_core - Flutter - - firebase_core (2.20.0): + - firebase_core (2.21.0): - Firebase/CoreOnly (= 10.16.0) - Flutter - FirebaseAppCheckInterop (10.17.0) @@ -690,6 +690,8 @@ PODS: - Flutter (1.0.0) - flutter_local_notifications (0.0.1): - Flutter + - flutter_share (0.0.1): + - Flutter - fluttertoast (0.0.2): - Flutter - Toast @@ -786,8 +788,13 @@ PODS: - nanopb/encode (= 2.30909.0) - nanopb/decode (2.30909.0) - nanopb/encode (2.30909.0) + - path_provider_foundation (0.0.1): + - Flutter + - FlutterMacOS - PromisesObjC (2.3.1) - RecaptchaInterop (100.0.0) + - share_plus (0.0.1): + - Flutter - shared_preferences_foundation (0.0.1): - Flutter - FlutterMacOS @@ -799,8 +806,11 @@ DEPENDENCIES: - firebase_core (from `.symlinks/plugins/firebase_core/ios`) - Flutter (from `Flutter`) - flutter_local_notifications (from `.symlinks/plugins/flutter_local_notifications/ios`) + - flutter_share (from `.symlinks/plugins/flutter_share/ios`) - fluttertoast (from `.symlinks/plugins/fluttertoast/ios`) - google_sign_in_ios (from `.symlinks/plugins/google_sign_in_ios/ios`) + - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) + - share_plus (from `.symlinks/plugins/share_plus/ios`) - shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`) SPEC REPOS: @@ -837,10 +847,16 @@ EXTERNAL SOURCES: :path: Flutter flutter_local_notifications: :path: ".symlinks/plugins/flutter_local_notifications/ios" + flutter_share: + :path: ".symlinks/plugins/flutter_share/ios" fluttertoast: :path: ".symlinks/plugins/fluttertoast/ios" google_sign_in_ios: :path: ".symlinks/plugins/google_sign_in_ios/ios" + path_provider_foundation: + :path: ".symlinks/plugins/path_provider_foundation/darwin" + share_plus: + :path: ".symlinks/plugins/share_plus/ios" shared_preferences_foundation: :path: ".symlinks/plugins/shared_preferences_foundation/darwin" @@ -848,10 +864,10 @@ SPEC CHECKSUMS: abseil: 926fb7a82dc6d2b8e1f2ed7f3a718bce691d1e46 AppAuth: 3bb1d1cd9340bd09f5ed189fb00b1cc28e1e8570 BoringSSL-GRPC: 3175b25143e648463a56daeaaa499c6cb86dad33 - cloud_firestore: abc819b936be92e6167aec1a8983d1e48ded2674 + cloud_firestore: 8adb36c2bc754352c717984153ecd7e6c6898047 Firebase: 25899099b77d255a636e3579c3d9dce10ec150d5 - firebase_auth: 015dab4ffe9e4d97f7d84a3373ad4c8a7712c5c7 - firebase_core: 2e0e89436a00b664a23bebb08859e5fede7215e9 + firebase_auth: ff474dcf17bee5762106162e0791433024890ada + firebase_core: 68027ba03585e3efe1608e35d3ab2777a64eabe9 FirebaseAppCheckInterop: 534d033d8d0436b4ab066a8205013d271e18a2b9 FirebaseAuth: 3862d87d4d58deff08f705d471896a2f66e8bbf0 FirebaseCore: 65a801af84cca84361ef9eac3fd868656968a53b @@ -859,6 +875,7 @@ SPEC CHECKSUMS: FirebaseFirestore: 17bd5c8a0ea4be0fcae5a6f95f817983623adb4a Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 flutter_local_notifications: 0c0b1ae97e741e1521e4c1629a459d04b9aec743 + flutter_share: 4be0208963c60b537e6255ed2ce1faae61cd9ac2 fluttertoast: 31b00dabfa7fb7bacd9e7dbee580d7a2ff4bf265 google_sign_in_ios: 1256ff9d941db546373826966720b0c24804bcdd GoogleSignIn: 5651ce3a61e56ca864160e79b484cd9ed3f49b7a @@ -869,8 +886,10 @@ SPEC CHECKSUMS: GTMSessionFetcher: 3a63d75eecd6aa32c2fc79f578064e1214dfdec2 leveldb-library: f03246171cce0484482ec291f88b6d563699ee06 nanopb: b552cce312b6c8484180ef47159bc0f65a1f0431 + path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943 PromisesObjC: c50d2056b5253dadbd6c2bea79b0674bd5a52fa4 RecaptchaInterop: 7d1a4a01a6b2cb1610a47ef3f85f0c411434cb21 + share_plus: c3fef564749587fc939ef86ffb283ceac0baf9f5 shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126 Toast: 91b396c56ee72a5790816f40d3a94dd357abc196 diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift index 70693e4..59e7ab9 100644 --- a/ios/Runner/AppDelegate.swift +++ b/ios/Runner/AppDelegate.swift @@ -1,5 +1,6 @@ import UIKit import Flutter +import flutter_local_notifications @UIApplicationMain @objc class AppDelegate: FlutterAppDelegate { @@ -7,7 +8,17 @@ import Flutter _ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? ) -> Bool { + FlutterLocalNotificationsPlugin.setPluginRegistrantCallback { (registry) in + GeneratedPluginRegistrant.register(with: registry) + } + if #available(iOS 10.0, *) { + UNUserNotificationCenter.current().delegate = self as? UNUserNotificationCenterDelegate + } + GeneratedPluginRegistrant.register(with: self) + if #available(iOS 10.0, *) { + UNUserNotificationCenter.current().delegate = self as? UNUserNotificationCenterDelegate +} return super.application(application, didFinishLaunchingWithOptions: launchOptions) } } diff --git a/lib/main.dart b/lib/main.dart index b685884..499cfb7 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -11,13 +11,16 @@ import 'package:todo/providers/time_provider.dart'; import 'package:todo/screens/home_screen.dart'; import 'package:todo/screens/signin_screen.dart'; import 'package:firebase_core/firebase_core.dart'; +import 'package:todo/utilities/notification_service.dart'; import 'firebase_options.dart'; void main() async { WidgetsFlutterBinding.ensureInitialized(); + NotificationService().initNotification(); await Firebase.initializeApp( options: DefaultFirebaseOptions.currentPlatform, ); + runApp( MultiProvider( providers: [ @@ -27,12 +30,13 @@ void main() async { ChangeNotifierProvider( create: (context) => DatesProvider(), ), - ChangeNotifierProvider( + ChangeNotifierProvider( create: (context) => SelectedBoxProvider(), ), - ChangeNotifierProvider( + ChangeNotifierProvider( create: (context) => TimeProvider(), - ),ChangeNotifierProvider( + ), + ChangeNotifierProvider( create: (context) => TaskProvider(), ), ], diff --git a/lib/screens/bottomsheet_updatetask.dart b/lib/screens/bottomsheet_updatetask.dart index e6277b7..a46637d 100644 --- a/lib/screens/bottomsheet_updatetask.dart +++ b/lib/screens/bottomsheet_updatetask.dart @@ -22,7 +22,7 @@ TextEditingController reminder = TextEditingController(); AdditionslFeature feature = AdditionslFeature(); -final _formkey1 = GlobalKey(); +final _formkey3 = GlobalKey(); List options = [ '5 Minutes early', @@ -33,7 +33,7 @@ List options = [ Future Updatetask(String docId, BuildContext context) async { print("running program"); - if (_formkey1.currentState != null && _formkey1.currentState!.validate()) { + if (_formkey3.currentState != null && _formkey3.currentState!.validate()) { NoteModel n = NoteModel( id: docId, title: title.text, @@ -178,7 +178,7 @@ void updatesheet(BuildContext context, String docId, String uid) async { Padding( padding: const EdgeInsets.all(10.0), child: Form( - key: _formkey1, + key: _formkey3, child: Column( children: [ CustomTextFormField( @@ -362,8 +362,8 @@ void updatesheet(BuildContext context, String docId, String uid) async { CustomElevatedButton( message: "Update Task", function: () async { - if (_formkey1.currentState != null && - _formkey1.currentState!.validate()) { + if (_formkey3.currentState != null && + _formkey3.currentState!.validate()) { await Updatetask(docId, context); } }), diff --git a/lib/screens/home_screen.dart b/lib/screens/home_screen.dart index 10e19d7..4b7582c 100644 --- a/lib/screens/home_screen.dart +++ b/lib/screens/home_screen.dart @@ -7,18 +7,17 @@ import 'package:intl/intl.dart'; import 'package:provider/provider.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:todo/main.dart'; -import 'package:fluttertoast/fluttertoast.dart'; import 'package:todo/models/model.dart'; import 'package:todo/providers/dateTime_provider.dart'; import 'package:todo/providers/selectedbox_provider.dart'; import 'package:todo/providers/task_provider.dart'; import 'package:todo/providers/theme_provider.dart'; import 'package:todo/screens/bottomsheet_addtask.dart'; -import 'package:todo/screens/bottomsheet_addtask.dart'; import 'package:todo/screens/bottomsheet_updatetask.dart'; import 'package:todo/screens/signin_screen.dart'; import 'package:todo/utilities/firebase_database.dart'; -import 'bottomsheet_addtask.dart'; +import 'package:todo/utilities/notification_service.dart'; +import 'package:share_plus/share_plus.dart'; class home_screen extends StatefulWidget { const home_screen({super.key}); @@ -137,6 +136,13 @@ class _home_screenState extends State { tasks = await taskProvider.fetchTasks(formattedDate); } + // void todaydonedate() async { + // final taskProvider = Provider.of(context, listen: false); + // DateTime now = DateTime.now(); + // String formattedDate = DateFormat('d MMM y').format(now); + + // donetasks = await taskProvider.fetchdoneTasks(formattedDate); + // } @override Widget build(BuildContext context) { @@ -158,7 +164,8 @@ class _home_screenState extends State { showtask() async { tasks = await taskProvider.fetchTasks(formatDate(selectedbox.selectedBox)); - + donetasks = await taskProvider + .fetchdoneTasks(formatDate(selectedbox.selectedBox)); } showdonetask() async { @@ -167,980 +174,1446 @@ class _home_screenState extends State { print(donetasks); } - Future getcurrentmonth() async { - if (today['month'] == "Jan") { - return "January"; - } else if (today['month'] == "Feb") { - return "February"; - } else if (today['month'] == "Mar") { - return "March"; - } else if (today['month'] == "Apr") { - return "April"; - } else if (today['month'] == "May") { - return "May"; - } else if (today['month'] == "Jun") { - return "June"; - } else if (today['month'] == "Jul") { - return "July"; - } else if (today['month'] == "Aug") { - return "August"; - } else if (today['month'] == "Sep") { - return "September"; - } else if (today['month'] == "Oct") { - return "October"; - } else if (today['month'] == "Nov") { - return "November"; - } else if (today['month'] == "Dec") { - return "December"; - } else { - return "Something Went Wrong"; - } - } - final screenwidth = MediaQuery.of(context).size.width; final screenhight = MediaQuery.of(context).size.height; final themeprovider = Provider.of(context); return Scaffold( body: SafeArea( - child: Column(children: [ - Container( - height: MediaQuery.of(context).size.height / 12, - width: double.infinity, - child: Padding( - padding: - const EdgeInsets.only(right: 10, left: 10, top: 5, bottom: 5), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Row( - children: [ - GestureDetector( - onTap: () { - showCupertinoModalPopup( - context: context, - builder: (context) { - return CupertinoActionSheet( - actions: [ - Container( - width: MediaQuery.of(context).size.width, - height: screenhight / 1.9, - child: Column( - children: [ - const SizedBox( - height: 20, - ), - Padding( - padding: const EdgeInsets.all(8.0), - child: Row( - crossAxisAlignment: - CrossAxisAlignment.start, - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - const CircleAvatar( - minRadius: 50, - maxRadius: 50, - backgroundColor: Colors.blue, - child: Icon( - Icons.person_sharp, - size: 40, - color: Colors.white, - ), - ), - Container( - height: 100, - width: 200, - child: Column( - mainAxisAlignment: - MainAxisAlignment.center, - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - FittedBox( - child: Text( - "$name", - style: const TextStyle( - fontSize: 20, - fontWeight: - FontWeight.w700, - color: Colors.white, - decoration: - TextDecoration - .none), - )), - const SizedBox( - height: 10, - ), - FittedBox( - child: Text('$email ', - style: const TextStyle( - fontSize: 20, - fontWeight: - FontWeight - .w700, - color: Colors - .white, - decoration: - TextDecoration - .none))) - ], - ), - ) - ], + child: SingleChildScrollView( + child: Column(children: [ + Container( + height: MediaQuery.of(context).size.height / 12, + width: double.infinity, + child: Padding( + padding: + const EdgeInsets.only(right: 10, left: 10, top: 5, bottom: 5), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Row( + children: [ + GestureDetector( + onTap: () { + NotificationService().shownotification( + body: "this is body", + title: "this is title", + ); + showCupertinoModalPopup( + context: context, + builder: (context) { + return CupertinoActionSheet( + actions: [ + Container( + width: MediaQuery.of(context).size.width, + height: screenhight / 1.9, + child: Column( + children: [ + const SizedBox( + height: 20, ), - ), - const SizedBox( - height: 20, - ), - CupertinoActionSheetAction( - child: Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - const Text( - 'Change Theme', - style: TextStyle( - fontSize: 20, + Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + crossAxisAlignment: + CrossAxisAlignment.start, + mainAxisAlignment: + MainAxisAlignment + .spaceBetween, + children: [ + const CircleAvatar( + minRadius: 50, + maxRadius: 50, + backgroundColor: Colors.blue, + child: Icon( + Icons.person_sharp, + size: 40, color: Colors.white, - fontWeight: - FontWeight.w400), - ), - Icon( - themeprovider.getThemeIcon(), - size: 25, - color: Colors.white, - ) - ], + ), + ), + Container( + height: 100, + width: 200, + child: Column( + mainAxisAlignment: + MainAxisAlignment + .center, + crossAxisAlignment: + CrossAxisAlignment + .start, + children: [ + FittedBox( + child: Text( + "$name", + style: const TextStyle( + fontSize: 20, + fontWeight: + FontWeight.w700, + color: Colors.white, + decoration: + TextDecoration + .none), + )), + const SizedBox( + height: 10, + ), + FittedBox( + child: Text('$email ', + style: const TextStyle( + fontSize: 20, + fontWeight: + FontWeight + .w700, + color: Colors + .white, + decoration: + TextDecoration + .none))) + ], + ), + ) + ], + ), ), - onPressed: () { - themeprovider.toggleTheme(); - }, - ), - CupertinoActionSheetAction( - child: const Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Text( - 'Reminder', - style: TextStyle( - fontSize: 20, - color: Colors.white, - fontWeight: - FontWeight.w400), - ), - Icon( - Icons - .notifications_active_outlined, - color: Colors.white, - ) - ], + const SizedBox( + height: 20, ), - onPressed: () {}, - ), - CupertinoActionSheetAction( - child: Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - const Text( - 'Email Verification', - style: TextStyle( - fontSize: 20, - color: Colors.white, - fontWeight: - FontWeight.w400), - ), - Icon( - checkmail() - ? Icons - .mark_email_read_outlined - : Icons.email_outlined, - color: Colors.white, - ) - ], + CupertinoActionSheetAction( + child: Row( + mainAxisAlignment: + MainAxisAlignment + .spaceBetween, + children: [ + const Text( + 'Change Theme', + style: TextStyle( + fontSize: 20, + color: Colors.white, + fontWeight: + FontWeight.w400), + ), + Icon( + themeprovider.getThemeIcon(), + size: 25, + color: Colors.white, + ) + ], + ), + onPressed: () { + themeprovider.toggleTheme(); + }, ), - onPressed: () { - Navigator.of(context).pop(); - if (checkmail() == true) { - final scaffoldContext = - ScaffoldMessenger.of(context); - scaffoldContext.showSnackBar( - const SnackBar( - content: Text( - "Your Mail is already Verified !", - style: TextStyle( - fontSize: 15, + CupertinoActionSheetAction( + child: const Row( + mainAxisAlignment: + MainAxisAlignment + .spaceBetween, + children: [ + Text( + 'Reminder', + style: TextStyle( + fontSize: 20, + color: Colors.white, + fontWeight: + FontWeight.w400), + ), + Icon( + Icons + .notifications_active_outlined, + color: Colors.white, + ), + ], + ), + onPressed: () {}, + ), + CupertinoActionSheetAction( + child: Row( + mainAxisAlignment: + MainAxisAlignment + .spaceBetween, + children: [ + const Text( + 'Email Verification', + style: TextStyle( + fontSize: 20, color: Colors.white, fontWeight: - FontWeight.bold, + FontWeight.w400), + ), + Icon( + checkmail() + ? Icons + .mark_email_read_outlined + : Icons.email_outlined, + color: Colors.white, + ) + ], + ), + onPressed: () { + Navigator.of(context).pop(); + if (checkmail() == true) { + final scaffoldContext = + ScaffoldMessenger.of( + context); + scaffoldContext.showSnackBar( + const SnackBar( + content: Text( + "Your Mail is already Verified !", + style: TextStyle( + fontSize: 15, + color: Colors.white, + fontWeight: + FontWeight.bold, + ), ), + backgroundColor: + Colors.black, ), - backgroundColor: Colors.black, - ), - ); - } else { - final scaffoldContext = - ScaffoldMessenger.of(context); - if (scaffoldContext != null) { - FirebaseStore - .SendMailVerification() - .then((value) { - scaffoldContext.showSnackBar( - const SnackBar( - content: Text( - "Mail Sent ! Please Check Your mail !", - style: TextStyle( - fontSize: 15, - color: Colors.white, - fontWeight: - FontWeight.bold, + ); + } else { + final scaffoldContext = + ScaffoldMessenger.of( + context); + if (scaffoldContext != null) { + FirebaseStore + .SendMailVerification() + .then((value) { + scaffoldContext + .showSnackBar( + const SnackBar( + content: Text( + "Mail Sent ! Please Check Your mail !", + style: TextStyle( + fontSize: 15, + color: Colors.white, + fontWeight: + FontWeight.bold, + ), ), + backgroundColor: + Colors.black, ), - backgroundColor: - Colors.black, - ), - ); - }); + ); + }); + } } - } - }, - ), - CupertinoActionSheetAction( - child: const Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Text( - 'Share App', - style: TextStyle( - fontSize: 20, - color: Colors.white, - fontWeight: - FontWeight.w400), - ), - Icon( - Icons.ios_share_outlined, - color: Colors.white, - ) - ], + }, ), - onPressed: () {}, - ), - ], + CupertinoActionSheetAction( + child: const Row( + mainAxisAlignment: + MainAxisAlignment + .spaceBetween, + children: [ + Text( + 'Share App', + style: TextStyle( + fontSize: 20, + color: Colors.white, + fontWeight: + FontWeight.w400), + ), + Icon( + Icons.ios_share_outlined, + color: Colors.white, + ) + ], + ), + onPressed: () async { + try { + await Share.share( + 'https://github.com/Aditya-Thakur-369/Todo-App', + subject: + 'Github Link for This App'); + } catch (e) { + print(e); + } + }, + ), + ], + ), ), - ), - CupertinoActionSheetAction( - child: const Text( - 'Sign Out', - style: TextStyle( - fontSize: 20, - color: Colors.white, - fontWeight: FontWeight.w400), + CupertinoActionSheetAction( + child: const Text( + 'Sign Out', + style: TextStyle( + fontSize: 20, + color: Colors.white, + fontWeight: FontWeight.w400), + ), + onPressed: () { + sign_out(); + }, ), - onPressed: () { - sign_out(); - }, - ), - ], - cancelButton: CupertinoActionSheetAction( - onPressed: () { - Navigator.of(context).pop(); - }, - child: const Text( - "Cancel", - style: TextStyle(color: Colors.red), - )), - ); - }, - ); - }, - child: const CircleAvatar( - minRadius: 25, - maxRadius: 25, - backgroundColor: Colors.blue, - child: Icon( - Icons.person_sharp, - size: 25, - color: Colors.white, + ], + cancelButton: CupertinoActionSheetAction( + onPressed: () { + Navigator.of(context).pop(); + }, + child: const Text( + "Cancel", + style: TextStyle(color: Colors.red), + )), + ); + }, + ); + }, + child: const CircleAvatar( + minRadius: 25, + maxRadius: 25, + backgroundColor: Colors.blue, + child: Icon( + Icons.person_sharp, + size: 25, + color: Colors.white, + ), ), ), - ), - // IconButton( - // onPressed: () { - // sign_out(); - // }, - // icon: const Icon( - // Icons.logout_outlined, - // )) - ], - ), - FittedBox( - child: Container( - constraints: BoxConstraints( - maxWidth: MediaQuery.of(context).size.width - 130), - child: SingleChildScrollView( - scrollDirection: Axis.horizontal, - child: RichText( - text: TextSpan( - children: [ - TextSpan( - text: "Hi, ", - style: TextStyle( - color: themeprovider.isDarkMode - ? Colors.black - : Colors.white, - fontSize: 18, - letterSpacing: 2, + // IconButton( + // onPressed: () { + // sign_out(); + // }, + // icon: const Icon( + // Icons.logout_outlined, + // )) + ], + ), + FittedBox( + child: Container( + constraints: BoxConstraints( + maxWidth: MediaQuery.of(context).size.width - 130), + child: SingleChildScrollView( + scrollDirection: Axis.horizontal, + child: RichText( + text: TextSpan( + children: [ + TextSpan( + text: "Hi, ", + style: TextStyle( + color: themeprovider.isDarkMode + ? Colors.black + : Colors.white, + fontSize: 18, + letterSpacing: 2, + ), ), - ), - TextSpan( - text: "$name", - style: TextStyle( - color: themeprovider.isDarkMode - ? Colors.black - : Colors.white, - fontSize: 25, - fontWeight: FontWeight.w200, + TextSpan( + text: "$name", + style: TextStyle( + color: themeprovider.isDarkMode + ? Colors.black + : Colors.white, + fontSize: 25, + fontWeight: FontWeight.w200, + ), ), - ), - ], + ], + ), + overflow: TextOverflow + .ellipsis, // Add this line to handle text overflow ), - overflow: TextOverflow - .ellipsis, // Add this line to handle text overflow ), ), ), - ), - Align( - alignment: Alignment.topRight, - child: IconButton( - onPressed: () { - themeprovider.toggleTheme(); - }, - icon: Icon( - themeprovider.getThemeIcon(), - size: 25, - )), - ) - ]), - ), - ), - Container( - child: Padding( - padding: const EdgeInsets.all(10.0), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - GestureDetector( - onTap: () { - // get task bottom model sheet appear heer - gettask(context); - }, - child: Container( - height: MediaQuery.of(context).size.height / 16, - width: MediaQuery.of(context).size.width / 3, - clipBehavior: Clip.none, - decoration: BoxDecoration( - color: Colors.deepPurple, - borderRadius: BorderRadius.circular(10)), - child: const Padding( - padding: EdgeInsets.only(right: 10, left: 8), - child: FittedBox( - child: Row(children: [ - Text( - "Add Task", - style: TextStyle(color: Colors.white, fontSize: 20), - ), - Icon( - Icons.add, + Align( + alignment: Alignment.topRight, + child: IconButton( + onPressed: () { + themeprovider.toggleTheme(); + }, + icon: Icon( + themeprovider.getThemeIcon(), size: 25, - color: Colors.white, - ), - ]), - ), - ), - ), - ), - Text( - // gettoday, - selectedbox.getFormattedDate(), - // getcurrentmonth() + - // ' ' + - // today['date'].toString() + - // ' , ' + - // today['year'].toString() + - // '\n' + - // "Today", - style: TextStyle( - fontSize: 20, - color: Colors.grey[650], - fontWeight: FontWeight.bold), - ), - ], + )), + ) + ]), ), ), - ), - - // Code Starts From here ------------------------ - - Padding( - padding: const EdgeInsets.all(10.0), - child: SizedBox( - width: MediaQuery.of(context).size.width, - height: 110, - child: ListView.builder( - scrollDirection: Axis.horizontal, - itemCount: dateList.length, - itemBuilder: (context, index) { - final item = dateList[index]; - final color = boxcolors[index % boxcolors.length]; - final selectedBoxValue = selectedbox.selectedBox; - - return Padding( - padding: const EdgeInsets.only(right: 5, left: 3), - child: GestureDetector( - onTap: () async { - selectedbox.updateSelectedBox(item); - showtask(); + Container( + child: Padding( + padding: const EdgeInsets.all(10.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GestureDetector( + onTap: () { + // get task bottom model sheet appear heer + selectedbox.getFormattedDate(); + gettask(context); }, child: Container( - height: 100, - width: 100, + height: MediaQuery.of(context).size.height / 16, + width: MediaQuery.of(context).size.width / 3, + clipBehavior: Clip.none, decoration: BoxDecoration( - border: - Border.all(color: Colors.deepPurple.withOpacity(1)), - boxShadow: [ - BoxShadow( - color: Colors.grey.withOpacity(0.2), // Shadow color - spreadRadius: 2, // Spread radius - blurRadius: 2, // Blur radius - offset: const Offset(0, 3), // Offset - ), - ], - borderRadius: BorderRadius.circular(10), - // color: Colors.deepPurple - // color: color - color: selectedBoxValue != null && - selectedBoxValue['year'] == item['year'] && - selectedBoxValue['month'] == item['month'] && - selectedBoxValue['date'] == item['date'] && - selectedBoxValue['dayOfWeek'] == - item['dayOfWeek'] - ? Colors.deepPurple - : Colors.deepPurple.withOpacity(0.4), - ), - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - FittedBox( - child: Text( - item['month'] != null ? item['month'] : '', - style: TextStyle( - fontSize: 20, - color: themeprovider.isDarkMode - ? Colors.white - : Colors.white, - // selectedbox == index - // ? Colors.white - // : Colors.white - ), - ), - ), + color: Colors.deepPurple, + borderRadius: BorderRadius.circular(10)), + child: const Padding( + padding: EdgeInsets.only(right: 10, left: 8), + child: FittedBox( + child: Row(children: [ Text( - item['date'] != null - ? item['date'].toString() - : '', - style: const TextStyle( - fontSize: 20, - color: Colors.white, - - // selectedbox == index - // ? Colors.white - // : Colors.white - ), + "Add Task", + style: + TextStyle(color: Colors.white, fontSize: 20), ), - FittedBox( - child: Text( - item['dayOfWeek'] != null - ? item['dayOfWeek'] - : '', - style: const TextStyle( - fontSize: 20, - color: Colors.white, - // selectedbox == index - // ? Colors.white - // : Colors.white - ), - ), + Icon( + Icons.add, + size: 25, + color: Colors.white, ), - ], + ]), ), ), ), ), - ); - }, + Text( + selectedbox.getFormattedDate(), + style: TextStyle( + fontSize: 20, + color: Colors.grey[650], + fontWeight: FontWeight.bold), + ), + ], + ), ), ), - ), - // Second Container Starts + // Code Starts From here ------------------------ - Padding( - padding: const EdgeInsets.only(right: 10, left: 10), + Padding( + padding: const EdgeInsets.all(10.0), child: SizedBox( width: MediaQuery.of(context).size.width, - height: screenhight / 1.9, - child: tasks.isNotEmpty && tasks != 0 - ? ListView.builder( - itemCount: tasks.length, - itemBuilder: (context, index) { - final currentTask = tasks[index]; - // print(currentTask); - final color = boxcolors[index % boxcolors.length]; + height: 110, + child: ListView.builder( + scrollDirection: Axis.horizontal, + itemCount: dateList.length, + itemBuilder: (context, index) { + final item = dateList[index]; + final color = boxcolors[index % boxcolors.length]; + final selectedBoxValue = selectedbox.selectedBox; - return Padding( - padding: const EdgeInsets.only(top: 5, bottom: 5), - child: GestureDetector( - onTap: () { - // print(currentTask); - // print(currentTask) - }, - onLongPress: () { - showCupertinoModalPopup( - context: context, - builder: (context) { - return CupertinoActionSheet( - actions: [ - Material( - child: Container( - height: MediaQuery.of(context) - .size - .height / - 3, - width: 300, - decoration: BoxDecoration( - borderRadius: - BorderRadius.circular(10), - color: color), - child: Row( - crossAxisAlignment: - CrossAxisAlignment.start, - mainAxisAlignment: - MainAxisAlignment - .spaceBetween, - children: [ - Padding( - padding: - const EdgeInsets.all(8.0), - child: Column( - crossAxisAlignment: - CrossAxisAlignment - .start, - mainAxisAlignment: - MainAxisAlignment - .spaceBetween, - children: [ - FittedBox( - child: Container( - constraints: BoxConstraints( - maxWidth: MediaQuery.of( - context) - .size - .width - - 100, - maxHeight: MediaQuery.of( - context) - .size - .height / - 8), - child: - SingleChildScrollView( - scrollDirection: - Axis.vertical, - child: Text( - // "Title " + index.toString(), - currentTask - .title ?? - "", - style: const TextStyle( - fontSize: 17, - color: Colors - .white, - fontWeight: - FontWeight - .bold), - ), - ), - ), - ), - Row( + return Padding( + padding: const EdgeInsets.only(right: 5, left: 3), + child: GestureDetector( + onTap: () async { + selectedbox.updateSelectedBox(item); + showtask(); + showdonetask(); + }, + child: Container( + height: 100, + width: 100, + decoration: BoxDecoration( + border: Border.all( + color: Colors.deepPurple.withOpacity(1)), + boxShadow: [ + BoxShadow( + color: + Colors.grey.withOpacity(0.2), // Shadow color + spreadRadius: 2, // Spread radius + blurRadius: 2, // Blur radius + offset: const Offset(0, 3), // Offset + ), + ], + borderRadius: BorderRadius.circular(10), + // color: Colors.deepPurple + // color: color + color: selectedBoxValue != null && + selectedBoxValue['year'] == item['year'] && + selectedBoxValue['month'] == item['month'] && + selectedBoxValue['date'] == item['date'] && + selectedBoxValue['dayOfWeek'] == + item['dayOfWeek'] + ? Colors.deepPurple + : Colors.deepPurple.withOpacity(0.4), + ), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + FittedBox( + child: Text( + item['month'] != null ? item['month'] : '', + style: TextStyle( + fontSize: 20, + color: themeprovider.isDarkMode + ? Colors.white + : Colors.white, + // selectedbox == index + // ? Colors.white + // : Colors.white + ), + ), + ), + Text( + item['date'] != null + ? item['date'].toString() + : '', + style: const TextStyle( + fontSize: 20, + color: Colors.white, + + // selectedbox == index + // ? Colors.white + // : Colors.white + ), + ), + FittedBox( + child: Text( + item['dayOfWeek'] != null + ? item['dayOfWeek'] + : '', + style: const TextStyle( + fontSize: 20, + color: Colors.white, + // selectedbox == index + // ? Colors.white + // : Colors.white + ), + ), + ), + ], + ), + ), + ), + ), + ); + }, + ), + ), + ), + + // Second Container Starts + + Padding( + padding: const EdgeInsets.only(right: 10, left: 10), + child: Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(20), + gradient: LinearGradient(colors: [ + Colors.purple[200]!.withOpacity(1), + Colors.deepPurple.withOpacity(0.5) + ], begin: Alignment.topLeft, end: Alignment.bottomRight), + ), + width: MediaQuery.of(context).size.width, + height: screenhight / 1.9, + child: tasks.isNotEmpty && tasks != 0 + ? Padding( + padding: const EdgeInsets.only(top: 3, bottom: 5), + child: ListView.builder( + itemCount: tasks.length, + itemBuilder: (context, index) { + final currentTask = tasks[index]; + + final color = boxcolors[index % boxcolors.length]; + + return Padding( + padding: const EdgeInsets.only( + top: 5, bottom: 5, left: 5, right: 5), + child: GestureDetector( + onTap: () {}, + onLongPress: () { + showCupertinoModalPopup( + context: context, + builder: (context) { + return CupertinoActionSheet( + actions: [ + Material( + child: Container( + height: MediaQuery.of(context) + .size + .height / + 3, + width: 300, + decoration: BoxDecoration( + borderRadius: + BorderRadius.circular( + 10), + color: color), + child: Row( + crossAxisAlignment: + CrossAxisAlignment.start, + mainAxisAlignment: + MainAxisAlignment + .spaceBetween, + children: [ + Padding( + padding: + const EdgeInsets.all( + 8.0), + child: Column( + crossAxisAlignment: + CrossAxisAlignment + .start, mainAxisAlignment: MainAxisAlignment - .start, + .spaceBetween, children: [ - const Icon( - Icons.lock_clock, - size: 28, - color: Colors.white, + FittedBox( + child: Container( + constraints: BoxConstraints( + maxWidth: MediaQuery.of( + context) + .size + .width - + 100, + maxHeight: MediaQuery.of( + context) + .size + .height / + 8), + child: + SingleChildScrollView( + scrollDirection: + Axis.vertical, + child: Text( + // "Title " + index.toString(), + currentTask + .title ?? + "", + style: const TextStyle( + fontSize: + 17, + color: Colors + .white, + fontWeight: + FontWeight + .bold), + ), + ), + ), ), - Text( - // " 02:04 PM - 02:19 PM", - " ${currentTask.starttime} - ${currentTask.endtime}", + Row( + mainAxisAlignment: + MainAxisAlignment + .start, + children: [ + const Icon( + Icons + .lock_clock, + size: 28, + color: Colors + .white, + ), + Text( + // " 02:04 PM - 02:19 PM", + " ${currentTask.starttime} - ${currentTask.endtime}", - style: - const TextStyle( - color: - Colors.white, - ), + style: + const TextStyle( + color: Colors + .white, + ), + ), + ], ), + FittedBox( + child: Container( + constraints: BoxConstraints( + maxWidth: MediaQuery.of( + context) + .size + .width - + 100, + maxHeight: MediaQuery.of( + context) + .size + .height / + 10), + child: + SingleChildScrollView( + scrollDirection: + Axis.vertical, + child: Text( + // "Note 1", + currentTask + .note ?? + "", + style: const TextStyle( + fontSize: + 18, + color: Colors + .white, + fontWeight: + FontWeight + .w300), + ), + ), + ), + ) ], ), - FittedBox( - child: Container( - constraints: BoxConstraints( - maxWidth: MediaQuery.of( - context) - .size - .width - - 100, - maxHeight: MediaQuery.of( - context) - .size - .height / - 10), - child: - SingleChildScrollView( - scrollDirection: - Axis.vertical, - child: Text( - // "Note 1", - currentTask - .note ?? - "", - style: const TextStyle( - fontSize: 18, + ), + Padding( + padding: + const EdgeInsets.all( + 10.0), + child: Container( + child: Row( + children: [ + Container( + height: 1000, + width: 1, + color: + Colors.white, + ), + const SizedBox( + width: 8, + ), + const RotatedBox( + quarterTurns: + 3, // Set the number of clockwise quarter turns + child: Text( + 'TODO', + style: + TextStyle( + fontSize: 13, color: Colors .white, - fontWeight: - FontWeight - .w300), - ), - ), + ), // Define the text style + ), + ) + ], ), - ) - ], - ), - ), - Padding( - padding: const EdgeInsets.all( - 10.0), - child: Container( - child: Row( - children: [ - Container( - height: 1000, - width: 1, - color: Colors.white, - ), - const SizedBox( - width: 8, - ), - const RotatedBox( - quarterTurns: - 3, // Set the number of clockwise quarter turns - child: Text( - 'TODO', - style: TextStyle( - fontSize: 13, - color: - Colors.white, - ), // Define the text style - ), - ) - ], + ), + ) + ], + )), + ), + const SizedBox( + height: 30, + ), + CupertinoActionSheetAction( + child: Text( + "Mark as Done 🙂", + style: TextStyle( + color: Colors.grey.shade600), + ), + onPressed: () async { + DateTime now = DateTime.now(); + + // Format the time using DateFormat + String formattedTime = + DateFormat('hh:mm a') + .format(now); + bool rs = await FirebaseStore + .MarkasRead( + currentTask.id.toString(), + FirebaseAuth.instance + .currentUser!.uid, + formattedTime); + if (rs = true) { + Navigator.pushReplacement( + context, + MaterialPageRoute( + builder: (context) => + const home_screen(), + )); + final scaffoldContext = + ScaffoldMessenger.of( + context); + scaffoldContext.showSnackBar( + const SnackBar( + content: Text( + "Task Done 👍🏻", + style: TextStyle( + fontSize: 15, + color: Colors.white, + fontWeight: + FontWeight.bold, + ), ), + backgroundColor: + Colors.black, ), - ) - ], - )), - ), - const SizedBox( - height: 30, - ), - CupertinoActionSheetAction( - child: Text( - "Mark as Done 🙂", - style: TextStyle( - color: Colors.grey.shade600), - ), - onPressed: () async { - DateTime now = DateTime.now(); - - // Format the time using DateFormat - String formattedTime = - DateFormat('hh:mm a').format(now); - bool rs = - await FirebaseStore.MarkasRead( + ); + } else { + print( + "Something is wrong while deleting the Task"); + } + }, + ), + CupertinoActionSheetAction( + child: Text( + "Edit", + style: TextStyle( + color: Colors.grey.shade600), + ), + onPressed: () { + updatesheet( + context, currentTask.id.toString(), FirebaseAuth.instance - .currentUser!.uid, - formattedTime); - if (rs = true) { - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => - const home_screen(), - )); - final scaffoldContext = - ScaffoldMessenger.of(context); - scaffoldContext.showSnackBar( - const SnackBar( - content: Text( - "Task Done 👍🏻", - style: TextStyle( - fontSize: 15, - color: Colors.white, - fontWeight: FontWeight.bold, + .currentUser!.uid); + }, + ), + CupertinoActionSheetAction( + child: Text( + "Delete", + style: TextStyle( + color: Colors.grey.shade600), + ), + onPressed: () async { + bool rs = await FirebaseStore + .DeleteTask( + currentTask.id.toString(), + FirebaseAuth.instance + .currentUser!.uid); + if (rs = true) { + Navigator.pushReplacement( + context, + MaterialPageRoute( + builder: (context) => + const home_screen(), + )); + final scaffoldContext = + ScaffoldMessenger.of( + context); + scaffoldContext.showSnackBar( + const SnackBar( + content: Text( + "Task Deleted Successfully ! ", + style: TextStyle( + fontSize: 15, + color: Colors.white, + fontWeight: + FontWeight.bold, + ), + ), + backgroundColor: + Colors.black, ), - ), - backgroundColor: Colors.black, - ), - ); - } else { - print( - "Something is wrong while deleting the Task"); - } - }, - ), - CupertinoActionSheetAction( - child: Text( - "Edit", - style: TextStyle( - color: Colors.grey.shade600), - ), - onPressed: () { - updatesheet( - context, - currentTask.id.toString(), - FirebaseAuth - .instance.currentUser!.uid); - }, - ), - CupertinoActionSheetAction( - child: Text( - "Delete", - style: TextStyle( - color: Colors.grey.shade600), + ); + } else { + print( + "Something is wrong while deleting the Task"); + } + }, + ), + ], + cancelButton: + CupertinoActionSheetAction( + isDefaultAction: true, + onPressed: () { + Navigator.of(context).pop(); + }, + child: const Text( + "Cancel", + style: TextStyle(color: Colors.red), + ), ), - onPressed: () async { - bool rs = - await FirebaseStore.DeleteTask( - currentTask.id.toString(), - FirebaseAuth.instance - .currentUser!.uid); - if (rs = true) { - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => - const home_screen(), - )); - final scaffoldContext = - ScaffoldMessenger.of(context); - scaffoldContext.showSnackBar( - const SnackBar( - content: Text( - "Task Deleted Successfully ! ", - style: TextStyle( - fontSize: 15, - color: Colors.white, - fontWeight: FontWeight.bold, + ); + }, + ); + }, + child: Container( + height: 110, + width: 300, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(20), + color: color), + child: Row( + crossAxisAlignment: + CrossAxisAlignment.start, + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + FittedBox( + child: Container( + constraints: BoxConstraints( + maxWidth: + MediaQuery.of(context) + .size + .width - + 100), + child: SingleChildScrollView( + scrollDirection: + Axis.horizontal, + child: Text( + // "Title " + index.toString(), + currentTask.title ?? "", + style: const TextStyle( + fontSize: 17, + color: Colors.white, + fontWeight: + FontWeight.bold), + ), ), ), - backgroundColor: Colors.black, ), - ); - } else { - print( - "Something is wrong while deleting the Task"); - } - }, - ), - ], - cancelButton: CupertinoActionSheetAction( - isDefaultAction: true, - onPressed: () { - Navigator.of(context).pop(); - }, - child: const Text( - "Cancel", - style: TextStyle(color: Colors.red), - ), - ), - ); - }, - ); - }, - child: Material( - child: Container( - height: 110, - width: 300, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(10), - color: color), - child: Row( - crossAxisAlignment: - CrossAxisAlignment.start, - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - FittedBox( - child: Container( - constraints: BoxConstraints( - maxWidth: - MediaQuery.of(context) - .size - .width - - 100), - child: SingleChildScrollView( - scrollDirection: - Axis.horizontal, - child: Text( - // "Title " + index.toString(), - currentTask.title ?? "", + Row( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + const Icon( + Icons.lock_clock, + size: 28, + color: Colors.white, + ), + Text( + // " 02:04 PM - 02:19 PM", + " ${currentTask.starttime} - ${currentTask.endtime}", + style: const TextStyle( - fontSize: 17, - color: Colors.white, - fontWeight: - FontWeight.bold), + color: Colors.white, + ), ), - ), + ], ), - ), - Row( - mainAxisAlignment: - MainAxisAlignment.start, + FittedBox( + child: Container( + constraints: BoxConstraints( + maxWidth: + MediaQuery.of(context) + .size + .width - + 100), + child: SingleChildScrollView( + scrollDirection: + Axis.horizontal, + child: Text( + // "Note 1", + currentTask.note ?? "", + style: const TextStyle( + fontSize: 18, + color: Colors.white, + fontWeight: + FontWeight.w300), + ), + ), + ), + ) + ], + ), + ), + Padding( + padding: const EdgeInsets.all(10.0), + child: Container( + child: Row( children: [ - const Icon( - Icons.lock_clock, - size: 28, + Container( + height: 100, + width: 1, color: Colors.white, ), - Text( - // " 02:04 PM - 02:19 PM", - " ${currentTask.starttime} - ${currentTask.endtime}", - - style: const TextStyle( - color: Colors.white, - ), + const SizedBox( + width: 8, ), + const RotatedBox( + quarterTurns: + 3, // Set the number of clockwise quarter turns + child: Text( + 'TODO', + style: TextStyle( + fontSize: 13, + color: Colors.white, + ), // Define the text style + ), + ) ], ), - FittedBox( - child: Container( - constraints: BoxConstraints( - maxWidth: + ), + ) + ], + )), + ), + ); + }, + ), + ) + : Container( + width: MediaQuery.of(context).size.width, + height: screenhight / 1.9, + child: Center( + child: FittedBox( + child: GestureDetector( + onTap: () { + gettask(context); + }, + child: Column( + children: [ + SvgPicture.asset( + 'assets/images/empty_todo.svg', + height: 200, + ), + const SizedBox( + height: 5, + ), + const Text( + "Add Some Task To Increase Your Productivity !!", + style: TextStyle(fontSize: 13), + ), + ], + ), + ), + ))), + + // second Container strts from here + )), + + // i want to show another list in sizedbox with same features and funtions only list is changes from task to donetask and all other things are same how can i do that , one more feature if donetask list is empty then it will srink but show the container + + const SizedBox( + height: 10, + ), + donetasks.isNotEmpty && donetasks != 0 + ? Container( + height: 30, + width: 200, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(50), + color: Colors.green.withOpacity(0.2), + boxShadow: [ + BoxShadow( + color: Colors.black.withOpacity(0.1), + spreadRadius: 1, + blurRadius: 1, + ) + ]), + child: const Center( + child: Text( + "Task Completed", + style: TextStyle( + fontSize: 15, + color: Colors.green, + ), + ), + ), + ) + : SizedBox(), + const SizedBox( + height: 20, + ), + donetasks.isNotEmpty && donetasks != 0 + ? Padding( + padding: const EdgeInsets.only(right: 10, left: 10), + child: Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(20), + gradient: LinearGradient(colors: [ + Colors.purple[200]!.withOpacity(1), + Colors.deepPurple.withOpacity(0.5) + ], begin: Alignment.topLeft, end: Alignment.bottomRight), + ), + width: MediaQuery.of(context).size.width, + height: screenhight / 1.9, + child: donetasks.isNotEmpty && donetasks != 0 + ? Padding( + padding: const EdgeInsets.only( + top: 3, bottom: 3, right: 3, left: 3), + child: ListView.builder( + itemCount: donetasks.length, + itemBuilder: (context, index) { + final currentdoneTask = donetasks[index]; + final color = + boxcolors[index % boxcolors.length]; + + return Padding( + padding: const EdgeInsets.only( + top: 5, bottom: 5, left: 5, right: 5), + child: GestureDetector( + onTap: () { + print(currentdoneTask); + }, + onLongPress: () { + showCupertinoModalPopup( + context: context, + builder: (context) { + return CupertinoActionSheet( + actions: [ + Material( + child: Container( + height: MediaQuery.of(context) .size - .width - - 100), - child: SingleChildScrollView( - scrollDirection: - Axis.horizontal, - child: Text( - // "Note 1", - currentTask.note ?? "", - style: const TextStyle( - fontSize: 18, - color: Colors.white, - fontWeight: - FontWeight.w300), - ), - ), - ), - ) - ], - ), - ), - Padding( - padding: const EdgeInsets.all(10.0), - child: Container( - child: Row( - children: [ - Container( - height: 100, - width: 1, - color: Colors.white, + .height / + 3, + width: 300, + decoration: BoxDecoration( + borderRadius: + BorderRadius + .circular(10), + color: color), + child: Row( + crossAxisAlignment: + CrossAxisAlignment + .start, + mainAxisAlignment: + MainAxisAlignment + .spaceBetween, + children: [ + Padding( + padding: + const EdgeInsets + .all(8.0), + child: Column( + crossAxisAlignment: + CrossAxisAlignment + .start, + mainAxisAlignment: + MainAxisAlignment + .spaceBetween, + children: [ + 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: [ + const Icon( + Icons.lock_clock, + size: + 28, + color: + Colors.white, + ), + SizedBox( + width: 5, + ), + Text( + // " 02:04 PM - 02:19 PM", + currentdoneTask.completedTime ?? + '', + + style: + const TextStyle( + color: Colors.white, + ), + ), + ], + ), + SizedBox( + height: 10, + ), + SingleChildScrollView( + scrollDirection: + Axis.vertical, + child: + Row( + children: [ + Text("Title : "), + Text( + currentdoneTask.title ?? + "", + style: const TextStyle( + fontSize: 17, + color: Colors.white, + fontWeight: FontWeight.bold), + ), + ], + ), + ), + ], + ), + ), + ), + FittedBox( + child: + Container( + constraints: BoxConstraints( + maxWidth: + MediaQuery.of(context).size.width - + 100, + maxHeight: + MediaQuery.of(context).size.height / + 10), + child: + SingleChildScrollView( + scrollDirection: + Axis.vertical, + child: Text( + // "Note 1", + currentdoneTask + .note ?? + "", + style: const TextStyle( + fontSize: + 18, + color: Colors + .white, + fontWeight: + FontWeight.w300), + ), + ), + ), + ) + ], + ), + ), + Padding( + padding: + const EdgeInsets + .all(10.0), + child: Container( + child: Row( + children: [ + Container( + height: 1000, + width: 1, + color: Colors + .white, + ), + const SizedBox( + width: 8, + ), + const RotatedBox( + quarterTurns: + 3, // Set the number of clockwise quarter turns + child: Text( + 'TODO', + style: + TextStyle( + fontSize: + 13, + color: Colors + .white, + ), // Define the text style + ), + ) + ], + ), + ), + ) + ], + )), ), const SizedBox( - width: 8, + height: 30, ), - const RotatedBox( - quarterTurns: - 3, // Set the number of clockwise quarter turns + CupertinoActionSheetAction( child: Text( - 'TODO', + "Delete", style: TextStyle( - fontSize: 13, - color: Colors.white, - ), // Define the text style + color: + Colors.grey.shade600), ), - ) + onPressed: () async { + bool rs = await FirebaseStore + .DeleteTask( + currentdoneTask.id + .toString(), + FirebaseAuth + .instance + .currentUser! + .uid); + if (rs = true) { + Navigator.pushReplacement( + context, + MaterialPageRoute( + builder: (context) => + const home_screen(), + )); + final scaffoldContext = + ScaffoldMessenger.of( + context); + scaffoldContext + .showSnackBar( + const SnackBar( + content: Text( + "Task Deleted Successfully ! ", + style: TextStyle( + fontSize: 15, + color: Colors.white, + fontWeight: + FontWeight.bold, + ), + ), + backgroundColor: + Colors.black, + ), + ); + } else { + print( + "Something is wrong while deleting the Task"); + } + }, + ), ], - ), - ), - ) - ], - )), + cancelButton: + CupertinoActionSheetAction( + isDefaultAction: true, + onPressed: () { + Navigator.of(context).pop(); + }, + child: const Text( + "Cancel", + style: TextStyle( + color: Colors.red), + ), + ), + ); + }, + ); + }, + child: Container( + height: 110, + width: 300, + decoration: BoxDecoration( + borderRadius: + BorderRadius.circular(20), + color: color), + child: Row( + crossAxisAlignment: + CrossAxisAlignment.start, + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Padding( + padding: + const EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + mainAxisAlignment: + MainAxisAlignment + .spaceBetween, + children: [ + FittedBox( + child: Container( + constraints: BoxConstraints( + maxWidth: MediaQuery.of( + context) + .size + .width - + 100), + child: + SingleChildScrollView( + scrollDirection: + Axis.horizontal, + child: Text( + // "Title " + index.toString(), + currentdoneTask + .title ?? + "", + style: const TextStyle( + fontSize: 17, + color: + Colors.white, + fontWeight: + FontWeight + .bold), + ), + ), + ), + ), + Row( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + Text( + "Task Completed at : ", + style: TextStyle( + fontSize: 15, + fontWeight: + FontWeight + .bold), + ), + 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), + child: + SingleChildScrollView( + scrollDirection: + Axis.horizontal, + child: Text( + // "Note 1", + currentdoneTask + .note ?? + "", + style: const TextStyle( + fontSize: 18, + color: + Colors.white, + fontWeight: + FontWeight + .w300), + ), + ), + ), + ) + ], + ), + ), + Padding( + padding: + const EdgeInsets.all(10.0), + child: Container( + child: Row( + children: [ + Container( + height: 100, + width: 1, + color: Colors.white, + ), + const SizedBox( + width: 8, + ), + const RotatedBox( + quarterTurns: + 3, // Set the number of clockwise quarter turns + child: Text( + 'TODO', + style: TextStyle( + fontSize: 13, + color: Colors.white, + ), // Define the text style + ), + ) + ], + ), + ), + ) + ], + )), + ), + ); + }, ), - ), - ); - }, - ) - : Container( - width: MediaQuery.of(context).size.width, - height: screenhight / 1.9, - child: Center( - child: FittedBox( - child: GestureDetector( - onTap: () { - gettask(context); - }, - child: Column( - children: [ - SvgPicture.asset( - 'assets/images/empty_todo.svg', - height: 200, - ), - const SizedBox( - height: 5, - ), - const Text( - "Add Some Task To Increase Your Productivity !!", - style: TextStyle(fontSize: 13), - ), - ], - ), - ), - ))), + ) + : const SizedBox(), - // second Container strts from here - ) - ), - ])), + // second Container strts from here + )) + : SizedBox(), + ]), + )), ); } } diff --git a/lib/screens/reset_password.dart b/lib/screens/reset_password.dart index e3a8488..e3fdad4 100644 --- a/lib/screens/reset_password.dart +++ b/lib/screens/reset_password.dart @@ -41,14 +41,14 @@ class _reset_password_screenState extends State { size: 25, ))), SvgPicture.asset('assets/images/sign_in.svg'), - SizedBox( + const SizedBox( height: 20, ), Text( "Check Your mail !!", style: TextStyle(fontSize: 20, color: Colors.grey[500]), ), - SizedBox( + const SizedBox( height: 20, ), CustomElevatedButton( diff --git a/lib/screens/signin_screen.dart b/lib/screens/signin_screen.dart index 5ee0868..3622d8f 100644 --- a/lib/screens/signin_screen.dart +++ b/lib/screens/signin_screen.dart @@ -22,10 +22,10 @@ class signin_screen extends StatefulWidget { class _signin_screenState extends State { TextEditingController email = TextEditingController(); TextEditingController pass = TextEditingController(); - final _formkey = GlobalKey(); + final _formkey0 = GlobalKey(); Future movetosignin() async { - if (_formkey.currentState != null && _formkey.currentState!.validate()) { + if (_formkey0.currentState != null && _formkey0.currentState!.validate()) { var result = await FirebaseStore.signinuser(email.text.trim(), pass.text.trim()); if (result == true) { @@ -128,7 +128,7 @@ class _signin_screenState extends State { Container( padding: const EdgeInsets.only(left: 10, right: 10), child: Form( - key: _formkey, + key: _formkey0, child: Column( children: [ const SizedBox( diff --git a/lib/screens/signup_screen.dart b/lib/screens/signup_screen.dart index 5dd09a1..d9644ca 100644 --- a/lib/screens/signup_screen.dart +++ b/lib/screens/signup_screen.dart @@ -19,7 +19,7 @@ class signup_screen extends StatefulWidget { } class _signup_screenState extends State { - final _formkey = GlobalKey(); + final _formkey1 = GlobalKey(); TextEditingController name = TextEditingController(); TextEditingController email = TextEditingController(); TextEditingController pass = TextEditingController(); @@ -27,65 +27,36 @@ class _signup_screenState extends State { Future movetosignup() async { print("Success"); - if (_formkey.currentState != null && _formkey.currentState!.validate()) { - // showDialog( - // barrierDismissible: false, - // context: context, - // builder: (context) { - // return const AlertDialog( - // content: SizedBox( - // height: 42, - // width: 42, - // child: Row( - // children: [ - // SizedBox( - // width: 20, - // ), - // Text("Loading ... "), - // SizedBox( - // width: 40, - // ), - // CircularProgressIndicator( - // color: Colors.black, - // ), - // ], - // ), - // ), - // ); - // }, - // ); - // try { + if (_formkey1.currentState != null && _formkey1.currentState!.validate()) { var result = await FirebaseStore.createuser(email.text, pass.text.trim()); if (result == true) { var SharedPref = await SharedPreferences.getInstance(); SharedPref.setBool(splash_screenState.KEYLOGIN, true); await UserData.userdata( FirebaseAuth.instance.currentUser!.uid, email.text, name.text); - Navigator.push( - context, - PageRouteBuilder( - pageBuilder: (context, animation, - secondaryAnimation) => - const signin_screen(), - transitionsBuilder: (context, animation, - secondaryAnimation, child) { - const begin = Offset(0.0, 1.0); - const end = Offset.zero; - const curve = Curves.easeInBack; + Navigator.push( + context, + PageRouteBuilder( + pageBuilder: (context, animation, secondaryAnimation) => + const home_screen(), + transitionsBuilder: + (context, animation, secondaryAnimation, child) { + const begin = Offset(0.0, 1.0); + const end = Offset.zero; + const curve = Curves.ease; + + var tween = + Tween(begin: begin, end: end).chain(CurveTween(curve: curve)); + var offsetAnimation = animation.drive(tween); + + return SlideTransition( + position: offsetAnimation, + child: child, + ); + }, + ), + ); - final tween = - Tween(begin: begin, end: end) - .chain(CurveTween(curve: curve)); - final curvedAnimation = CurvedAnimation( - parent: animation, - curve: curve, - ); - return SlideTransition( - position: - tween.animate(curvedAnimation), - child: child, - ); - })); print("Succes"); } else if (result is String) { String errorCode = result; @@ -126,7 +97,7 @@ class _signup_screenState extends State { return Scaffold( body: SafeArea( child: Form( - key: _formkey, + key: _formkey1, child: SingleChildScrollView( child: Column( children: [ @@ -142,13 +113,12 @@ class _signup_screenState extends State { alignment: Alignment.topRight, child: IconButton( onPressed: () { - themeprovider.toggleTheme(); + themeprovider.toggleTheme(); }, - icon: - Icon( - themeprovider.getThemeIcon(), - size: 25, - ))) + icon: Icon( + themeprovider.getThemeIcon(), + size: 25, + ))) ], ), ), @@ -165,7 +135,10 @@ class _signup_screenState extends State { labelText: "Name", hintText: "Aditya Chauhan", controller: name, - sur: Icon(Icons.abc_outlined,size: 35,), + sur: Icon( + Icons.abc_outlined, + size: 35, + ), validator: (value) { if (value == null || value.isEmpty) { return "Name can not be empty"; @@ -181,7 +154,10 @@ class _signup_screenState extends State { labelText: "Email", hintText: "aditya123@gmail.com", controller: email, - sur: Icon(Icons.email_outlined,size: 30,), + sur: Icon( + Icons.email_outlined, + size: 30, + ), validator: (value) { if (value == null || value.isEmpty) { return "Email can not be empty"; @@ -200,11 +176,14 @@ class _signup_screenState extends State { hintText: "Aditya123@2266", controller: pass, obscureText: true, - sur: Icon(Icons.password_outlined,size: 30,), + sur: Icon( + Icons.password_outlined, + size: 30, + ), validator: (value) { if (value == null || value.isEmpty) { return "Password can not be empty"; - } else if (value.length > 6) { + } else if (value.length < 6) { return "Password Should Be Greater Then 6 Digits"; } else { return null; @@ -219,7 +198,10 @@ class _signup_screenState extends State { hintText: "Aditya123@2266", controller: cpass, obscureText: true, - sur: Icon(Icons.password_outlined,size: 30,), + sur: Icon( + Icons.password_outlined, + size: 30, + ), validator: (value) { if (value == null || value.isEmpty) { return "Password can not be empty"; diff --git a/lib/utilities/features.dart b/lib/utilities/features.dart index 2798ebf..f48914f 100644 --- a/lib/utilities/features.dart +++ b/lib/utilities/features.dart @@ -1,3 +1,4 @@ +import 'package:flutter_share/flutter_share.dart'; import 'package:todo/models/model.dart'; import 'package:todo/utilities/firebase_database.dart'; @@ -18,29 +19,7 @@ class AdditionslFeature { endtime: endTime, reminder: reminder, ); - - - print("Done "); - print(title); - print(note); - print(date); - print(startTime); - print(endTime); - print(reminder); - - // Uncomment this section when FirebaseStore.Savetask is available - // try { - // dynamic rs = await FirebaseStore.Savetask(n); - // if (rs is String) { - // print("Error occurred: $rs"); - // } else if (rs is bool) { - // print(rs); - // } - // } catch (e) { - // print("An error occurred: $e"); - // } - - // Add a return statement at the end - return null; // Replace 'null' with an appropriate value if needed + return null; } + } diff --git a/lib/utilities/handle_api.dart b/lib/utilities/handle_api.dart deleted file mode 100644 index e69de29..0000000 diff --git a/lib/utilities/notification_service.dart b/lib/utilities/notification_service.dart index 487da07..3c9e58c 100644 --- a/lib/utilities/notification_service.dart +++ b/lib/utilities/notification_service.dart @@ -1,12 +1,14 @@ +import 'dart:math'; + import 'package:flutter_local_notifications/flutter_local_notifications.dart'; -class NotificationSerice { +class NotificationService { final FlutterLocalNotificationsPlugin _flutterLocalNotificationsPlugin = FlutterLocalNotificationsPlugin(); - Future initNotification() async { + initNotification() async { AndroidInitializationSettings initializationSettingsAndroid = - AndroidInitializationSettings('launcher.png'); + AndroidInitializationSettings('launcher'); var initializationSettingsIOS = DarwinInitializationSettings( requestAlertPermission: true, @@ -17,7 +19,33 @@ class NotificationSerice { var initializationSettings = InitializationSettings( android: initializationSettingsAndroid, iOS: initializationSettingsIOS); - await _flutterLocalNotificationsPlugin.initialize(initializationSettings, onDidReceiveNotificationResponse: (NotificationResponse notificationResponse) async {}); + + await _flutterLocalNotificationsPlugin.initialize(initializationSettings, + onDidReceiveNotificationResponse: (details) async {}); + } + + notificationsDetails() { + return const NotificationDetails( + android: AndroidNotificationDetails('channelId', 'channelName', + playSound: true, + priority: Priority.high, + importance: Importance.max, + icon: 'launcher'), + iOS: DarwinNotificationDetails( + presentAlert: true, + presentBadge: true, + presentSound: true, + )); + } + + Future shownotification( + {id = 0, String? title, String? body, String? payload}) async { + try { + return _flutterLocalNotificationsPlugin.show( + id, title, body, await notificationsDetails()); + } catch (e) { + print(e); + } } diff --git a/linux/flutter/generated_plugin_registrant.cc b/linux/flutter/generated_plugin_registrant.cc index e71a16d..f6f23bf 100644 --- a/linux/flutter/generated_plugin_registrant.cc +++ b/linux/flutter/generated_plugin_registrant.cc @@ -6,6 +6,10 @@ #include "generated_plugin_registrant.h" +#include void fl_register_plugins(FlPluginRegistry* registry) { + g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin"); + url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar); } diff --git a/linux/flutter/generated_plugins.cmake b/linux/flutter/generated_plugins.cmake index 2e1de87..f16b4c3 100644 --- a/linux/flutter/generated_plugins.cmake +++ b/linux/flutter/generated_plugins.cmake @@ -3,6 +3,7 @@ # list(APPEND FLUTTER_PLUGIN_LIST + url_launcher_linux ) list(APPEND FLUTTER_FFI_PLUGIN_LIST diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index 8e4093b..4890abe 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -9,6 +9,8 @@ import cloud_firestore import firebase_auth import firebase_core import flutter_local_notifications +import path_provider_foundation +import share_plus import shared_preferences_foundation func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { @@ -16,5 +18,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { FLTFirebaseAuthPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseAuthPlugin")) FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin")) FlutterLocalNotificationsPlugin.register(with: registry.registrar(forPlugin: "FlutterLocalNotificationsPlugin")) + PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) + SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin")) SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) } diff --git a/pubspec.lock b/pubspec.lock index 1212f44..e4cde0a 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1,14 +1,6 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: - _discoveryapis_commons: - dependency: transitive - description: - name: _discoveryapis_commons - sha256: f8bb1fdbd77f3d5c1d62b5b0eca75fbf1e41bf4f6c62628f880582e2182ae45d - url: "https://pub.dev" - source: hosted - version: "1.0.6" _fe_analyzer_shared: dependency: transitive description: @@ -21,10 +13,10 @@ packages: dependency: transitive description: name: _flutterfire_internals - sha256: "7bcb5c5d62b3907fb4a269c0f0843df46760d38e12829a715f2ff1fb492f19ef" + sha256: "5dadadeecceac19d6a63c9d2e037bb8df58ddd4aedb94e8a056af2f39ee50f9d" url: "https://pub.dev" source: hosted - version: "1.3.10" + version: "1.3.11" analyzer: dependency: transitive description: @@ -77,26 +69,26 @@ packages: dependency: "direct main" description: name: cloud_firestore - sha256: "666ae6914f5d9dde04d7fb49c5983d3bf7b887021a79a3ac17de2e95386b8006" + sha256: "3ee12bfde22251a91e46bcb86e5ebe3f35006b8f6ed7fd5a5526cfa188ce68e9" url: "https://pub.dev" source: hosted - version: "4.12.1" + version: "4.12.2" cloud_firestore_platform_interface: dependency: transitive description: name: cloud_firestore_platform_interface - sha256: f1a9436bc0d7f49e60df33b5eb872772733646d4f211516220a1f6006c8177f5 + sha256: ed65b9d615d70c5b921e7f028ddab9b06c627d52a58d65fd84c3181f23cc9171 url: "https://pub.dev" source: hosted - version: "6.0.2" + version: "6.0.3" cloud_firestore_web: dependency: transitive description: name: cloud_firestore_web - sha256: "8df1e484d57f771242c2d8b3a534b921dfb0ba144a1cd441f23b1c7c4f33c3a1" + sha256: "17fbdc86611ed8ae414e65de7f45b19a7a2f70ce3cf9a9370ffed68844a73156" url: "https://pub.dev" source: hosted - version: "3.8.2" + version: "3.8.3" collection: dependency: transitive description: @@ -113,6 +105,14 @@ packages: url: "https://pub.dev" source: hosted version: "3.1.1" + cross_file: + dependency: transitive + description: + name: cross_file + sha256: "445db18de832dba8d851e287aff8ccf169bed30d2e94243cb54c7d2f1ed2142c" + url: "https://pub.dev" + source: hosted + version: "0.3.3+6" crypto: dependency: transitive description: @@ -165,34 +165,34 @@ packages: dependency: "direct main" description: name: firebase_auth - sha256: ee5e4f6e79483d1b39e2fe81cdef74f4c295c9865e150aefacd615eea96d3e7b + sha256: "738c4225bf8e766750423abcaeab1dc45f1bdb8975e2b32b69d561350b124685" url: "https://pub.dev" source: hosted - version: "4.12.0" + version: "4.12.1" firebase_auth_platform_interface: dependency: transitive description: name: firebase_auth_platform_interface - sha256: a664a8f1dbf73e6a56fd41364bcd0ad24f8d9d57428b365199dc795ee52b7d27 + sha256: "40f759021591e3ce5741e981ae7488903dd31cab59aa19a663a8255511d58f95" url: "https://pub.dev" source: hosted - version: "7.0.2" + version: "7.0.3" firebase_auth_web: dependency: transitive description: name: firebase_auth_web - sha256: "6a3c8c09c9ffcfea83ac4ce3d18d8b4c467c77d57713b2d786fd69ece5bb4a48" + sha256: e068327d62503c32e2b3fbcc27991f6d8a687e2fdb60e9ad865835208b2a29ed url: "https://pub.dev" source: hosted - version: "5.8.5" + version: "5.8.6" firebase_core: dependency: "direct main" description: name: firebase_core - sha256: "37299e4907391d7fac8c7ea059bb3292768cc07b72b6c6c777675cc58da2ef4d" + sha256: "7706f4ade6cc2698c70074083bc262586a185047f6bfdd53938dcc35d35cbb9e" url: "https://pub.dev" source: hosted - version: "2.20.0" + version: "2.21.0" firebase_core_platform_interface: dependency: transitive description: @@ -254,6 +254,14 @@ packages: url: "https://pub.dev" source: hosted version: "7.0.0+1" + flutter_share: + dependency: "direct main" + description: + name: flutter_share + sha256: ae12c1cea13b35926a109824ffac601531e40cb94ad53eeae58625eceb3eaaaa + url: "https://pub.dev" + source: hosted + version: "2.0.0" flutter_spinkit: dependency: "direct main" description: @@ -266,10 +274,10 @@ packages: dependency: "direct main" description: name: flutter_svg - sha256: bfc7cc3c75fe1282e8ce2e056d8fd1533f1a6848b65c379b4a5e7a9b623d3371 + sha256: d39e7f95621fc84376bc0f7d504f05c3a41488c562f4a8ad410569127507402c url: "https://pub.dev" source: hosted - version: "2.0.8" + version: "2.0.9" flutter_test: dependency: "direct dev" description: flutter @@ -340,26 +348,10 @@ packages: dependency: transitive description: name: google_sign_in_web - sha256: "939e9172a378ec4eaeb7f71eeddac9b55ebd0e8546d336daec476a68e5279766" - url: "https://pub.dev" - source: hosted - version: "0.12.0+5" - googleapis: - dependency: "direct main" - description: - name: googleapis - sha256: c2f311bcd1b3e4052234162edc6b626a9013a7e1385d6aad37e9e6a6c5f89908 + sha256: "6b08be471f82ff84058d528e1cb01f4f53084fa648b751310cdd1ac39b612d8e" url: "https://pub.dev" source: hosted - version: "11.4.0" - googleapis_auth: - dependency: "direct main" - description: - name: googleapis_auth - sha256: af7c3a3edf9d0de2e1e0a77e994fae0a581c525fa7012af4fa0d4a52ed9484da - url: "https://pub.dev" - source: hosted - version: "1.4.1" + version: "0.12.1" http: dependency: transitive description: @@ -424,6 +416,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.9.1" + mime: + dependency: transitive + description: + name: mime + sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e + url: "https://pub.dev" + source: hosted + version: "1.0.4" nested: dependency: transitive description: @@ -456,6 +456,30 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.1" + path_provider: + dependency: transitive + description: + name: path_provider + sha256: a1aa8aaa2542a6bc57e381f132af822420216c80d4781f7aa085ca3229208aaa + url: "https://pub.dev" + source: hosted + version: "2.1.1" + path_provider_android: + dependency: transitive + description: + name: path_provider_android + sha256: e595b98692943b4881b219f0a9e3945118d3c16bd7e2813f98ec6e532d905f72 + url: "https://pub.dev" + source: hosted + version: "2.2.1" + path_provider_foundation: + dependency: transitive + description: + name: path_provider_foundation + sha256: "19314d595120f82aca0ba62787d58dde2cc6b5df7d2f0daf72489e38d1b57f2d" + url: "https://pub.dev" + source: hosted + version: "2.3.1" path_provider_linux: dependency: transitive description: @@ -536,6 +560,22 @@ packages: url: "https://pub.dev" source: hosted version: "3.2.1" + share_plus: + dependency: "direct main" + description: + name: share_plus + sha256: f74fc3f1cbd99f39760182e176802f693fa0ec9625c045561cfad54681ea93dd + url: "https://pub.dev" + source: hosted + version: "7.2.1" + share_plus_platform_interface: + dependency: transitive + description: + name: share_plus_platform_interface + sha256: df08bc3a07d01f5ea47b45d03ffcba1fa9cd5370fb44b3f38c70e42cced0f956 + url: "https://pub.dev" + source: hosted + version: "3.3.1" shared_preferences: dependency: "direct main" description: @@ -605,6 +645,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.10.0" + sprintf: + dependency: transitive + description: + name: sprintf + sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" + url: "https://pub.dev" + source: hosted + version: "7.0.0" stack_trace: dependency: transitive description: @@ -661,6 +709,46 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.2" + url_launcher_linux: + dependency: transitive + description: + name: url_launcher_linux + sha256: "9f2d390e096fdbe1e6e6256f97851e51afc2d9c423d3432f1d6a02a8a9a8b9fd" + url: "https://pub.dev" + source: hosted + version: "3.1.0" + url_launcher_platform_interface: + dependency: transitive + description: + name: url_launcher_platform_interface + sha256: "980e8d9af422f477be6948bdfb68df8433be71f5743a188968b0c1b887807e50" + url: "https://pub.dev" + source: hosted + version: "2.2.0" + url_launcher_web: + dependency: transitive + description: + name: url_launcher_web + sha256: "7fd2f55fe86cea2897b963e864dc01a7eb0719ecc65fcef4c1cc3d686d718bb2" + url: "https://pub.dev" + source: hosted + version: "2.2.0" + url_launcher_windows: + dependency: transitive + description: + name: url_launcher_windows + sha256: "7754a1ad30ee896b265f8d14078b0513a4dba28d358eabb9d5f339886f4a1adc" + url: "https://pub.dev" + source: hosted + version: "3.1.0" + uuid: + dependency: transitive + description: + name: uuid + sha256: b715b8d3858b6fa9f68f87d20d98830283628014750c2b09b6f516c1da4af2a7 + url: "https://pub.dev" + source: hosted + version: "4.1.0" vector_graphics: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index deb5b65..a35c635 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -45,10 +45,10 @@ dependencies: flutter_datetime_picker_plus: ^2.1.0 intl: ^0.18.1 google_sign_in: ^6.1.5 - googleapis: ^11.4.0 - googleapis_auth: ^1.4.1 fluttertoast: ^8.2.2 flutter_local_notifications: ^16.1.0 + flutter_share: ^2.0.0 + share_plus: ^7.2.1 dev_dependencies: flutter_test: diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc index bf6d21a..9ab8234 100644 --- a/windows/flutter/generated_plugin_registrant.cc +++ b/windows/flutter/generated_plugin_registrant.cc @@ -9,6 +9,8 @@ #include #include #include +#include +#include void RegisterPlugins(flutter::PluginRegistry* registry) { CloudFirestorePluginCApiRegisterWithRegistrar( @@ -17,4 +19,8 @@ void RegisterPlugins(flutter::PluginRegistry* registry) { registry->GetRegistrarForPlugin("FirebaseAuthPluginCApi")); FirebaseCorePluginCApiRegisterWithRegistrar( registry->GetRegistrarForPlugin("FirebaseCorePluginCApi")); + SharePlusWindowsPluginCApiRegisterWithRegistrar( + registry->GetRegistrarForPlugin("SharePlusWindowsPluginCApi")); + UrlLauncherWindowsRegisterWithRegistrar( + registry->GetRegistrarForPlugin("UrlLauncherWindows")); } diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake index b83b40a..f0ea876 100644 --- a/windows/flutter/generated_plugins.cmake +++ b/windows/flutter/generated_plugins.cmake @@ -6,6 +6,8 @@ list(APPEND FLUTTER_PLUGIN_LIST cloud_firestore firebase_auth firebase_core + share_plus + url_launcher_windows ) list(APPEND FLUTTER_FFI_PLUGIN_LIST