diff --git a/IOSSKEY/AuthKey_5PS29BVP7D.p8 b/IOSSKEY/AuthKey_5PS29BVP7D.p8 new file mode 100644 index 0000000..c266335 --- /dev/null +++ b/IOSSKEY/AuthKey_5PS29BVP7D.p8 @@ -0,0 +1,6 @@ +-----BEGIN PRIVATE KEY----- +MIGTAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBHkwdwIBAQQgg/ZGtTj5/039UqzA +ue++alEsAiEMA2vLoEURmJHsjkegCgYIKoZIzj0DAQehRANCAARXKcRr5aZ/o8ZA +pQbq4ZM40sTfruafKY08hnD/wEerNbKnl1tX3PWtNnLfi3+pL+0mLr/rF62Trdzq +p5J9y2v8 +-----END PRIVATE KEY----- \ No newline at end of file diff --git a/android/app/build.gradle b/android/app/build.gradle index e55e78f..f4a7edc 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -22,6 +22,9 @@ if (flutterVersionName == null) { } apply plugin: 'com.android.application' +// START: FlutterFire Configuration +apply plugin: 'com.google.gms.google-services' +// END: FlutterFire Configuration apply plugin: 'kotlin-android' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" @@ -32,7 +35,7 @@ if (keystorePropertiesFile.exists()) { } android { - compileSdkVersion 31 + compileSdkVersion 33 compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 @@ -50,7 +53,7 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "com.elektronika.tm" - minSdkVersion 20 //TODO: Change to 16 in production + minSdkVersion 21 //TODO: Change to 16 in production targetSdkVersion 31 versionCode flutterVersionCode.toInteger() versionName flutterVersionName diff --git a/android/app/google-services.json b/android/app/google-services.json new file mode 100644 index 0000000..27fb2bf --- /dev/null +++ b/android/app/google-services.json @@ -0,0 +1,39 @@ +{ + "project_info": { + "project_number": "186538881179", + "project_id": "elektronika-app", + "storage_bucket": "elektronika-app.appspot.com" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:186538881179:android:96a2f9ce98f8bbf00f563e", + "android_client_info": { + "package_name": "com.elektronika.tm" + } + }, + "oauth_client": [ + { + "client_id": "186538881179-j5f608hapm9p4cmdo01fe6r8atca6ep8.apps.googleusercontent.com", + "client_type": 3 + } + ], + "api_key": [ + { + "current_key": "AIzaSyD9JBvYuGMFymroLwL9rYxkqB6u7EIaee0" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [ + { + "client_id": "186538881179-j5f608hapm9p4cmdo01fe6r8atca6ep8.apps.googleusercontent.com", + "client_type": 3 + } + ] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 0f91158..f198e04 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -4,6 +4,16 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/android/app/src/main/res/values/strings.xml b/android/app/src/main/res/values/strings.xml new file mode 100644 index 0000000..3132450 --- /dev/null +++ b/android/app/src/main/res/values/strings.xml @@ -0,0 +1,4 @@ + + + default_channel_id + \ No newline at end of file diff --git a/android/build.gradle b/android/build.gradle index ba6fe4a..4f69aab 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -7,6 +7,9 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:7.1.2' + // START: FlutterFire Configuration + classpath 'com.google.gms:google-services:4.3.10' + // END: FlutterFire Configuration classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } diff --git a/ios/Podfile b/ios/Podfile index 88359b2..313ea4a 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -1,5 +1,5 @@ # Uncomment this line to define a global platform for your project -# platform :ios, '11.0' +platform :ios, '11.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 bbc0366..f63d6e2 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -1,14 +1,77 @@ PODS: - device_info_plus (0.0.1): - Flutter + - Firebase/CoreOnly (10.6.0): + - FirebaseCore (= 10.6.0) + - Firebase/Messaging (10.6.0): + - Firebase/CoreOnly + - FirebaseMessaging (~> 10.6.0) + - firebase_core (2.8.0): + - Firebase/CoreOnly (= 10.6.0) + - Flutter + - firebase_messaging (14.3.0): + - Firebase/Messaging (= 10.6.0) + - firebase_core + - Flutter + - FirebaseCore (10.6.0): + - FirebaseCoreInternal (~> 10.0) + - GoogleUtilities/Environment (~> 7.8) + - GoogleUtilities/Logger (~> 7.8) + - FirebaseCoreInternal (10.7.0): + - "GoogleUtilities/NSData+zlib (~> 7.8)" + - FirebaseInstallations (10.7.0): + - FirebaseCore (~> 10.0) + - GoogleUtilities/Environment (~> 7.8) + - GoogleUtilities/UserDefaults (~> 7.8) + - PromisesObjC (~> 2.1) + - FirebaseMessaging (10.6.0): + - FirebaseCore (~> 10.0) + - FirebaseInstallations (~> 10.0) + - GoogleDataTransport (~> 9.2) + - GoogleUtilities/AppDelegateSwizzler (~> 7.8) + - GoogleUtilities/Environment (~> 7.8) + - GoogleUtilities/Reachability (~> 7.8) + - GoogleUtilities/UserDefaults (~> 7.8) + - nanopb (< 2.30910.0, >= 2.30908.0) - Flutter (1.0.0) + - flutter_local_notifications (0.0.1): + - Flutter - FMDB (2.7.5): - FMDB/standard (= 2.7.5) - FMDB/standard (2.7.5) - - path_provider_ios (0.0.1): + - GoogleDataTransport (9.2.1): + - GoogleUtilities/Environment (~> 7.7) + - nanopb (< 2.30910.0, >= 2.30908.0) + - PromisesObjC (< 3.0, >= 1.2) + - GoogleUtilities/AppDelegateSwizzler (7.11.0): + - GoogleUtilities/Environment + - GoogleUtilities/Logger + - GoogleUtilities/Network + - GoogleUtilities/Environment (7.11.0): + - PromisesObjC (< 3.0, >= 1.2) + - GoogleUtilities/Logger (7.11.0): + - GoogleUtilities/Environment + - GoogleUtilities/Network (7.11.0): + - GoogleUtilities/Logger + - "GoogleUtilities/NSData+zlib" + - GoogleUtilities/Reachability + - "GoogleUtilities/NSData+zlib (7.11.0)" + - GoogleUtilities/Reachability (7.11.0): + - GoogleUtilities/Logger + - GoogleUtilities/UserDefaults (7.11.0): + - GoogleUtilities/Logger + - nanopb (2.30909.0): + - nanopb/decode (= 2.30909.0) + - nanopb/encode (= 2.30909.0) + - nanopb/decode (2.30909.0) + - nanopb/encode (2.30909.0) + - path_provider_foundation (0.0.1): - Flutter - - shared_preferences_ios (0.0.1): + - FlutterMacOS + - PromisesObjC (2.2.0) + - shared_preferences_foundation (0.0.1): - Flutter + - FlutterMacOS - sqflite (0.0.2): - Flutter - FMDB (>= 2.7.5) @@ -23,9 +86,12 @@ PODS: DEPENDENCIES: - device_info_plus (from `.symlinks/plugins/device_info_plus/ios`) + - firebase_core (from `.symlinks/plugins/firebase_core/ios`) + - firebase_messaging (from `.symlinks/plugins/firebase_messaging/ios`) - Flutter (from `Flutter`) - - path_provider_ios (from `.symlinks/plugins/path_provider_ios/ios`) - - shared_preferences_ios (from `.symlinks/plugins/shared_preferences_ios/ios`) + - flutter_local_notifications (from `.symlinks/plugins/flutter_local_notifications/ios`) + - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/ios`) + - shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/ios`) - sqflite (from `.symlinks/plugins/sqflite/ios`) - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`) - video_player_avfoundation (from `.symlinks/plugins/video_player_avfoundation/ios`) @@ -34,17 +100,32 @@ DEPENDENCIES: SPEC REPOS: trunk: + - Firebase + - FirebaseCore + - FirebaseCoreInternal + - FirebaseInstallations + - FirebaseMessaging - FMDB + - GoogleDataTransport + - GoogleUtilities + - nanopb + - PromisesObjC EXTERNAL SOURCES: device_info_plus: :path: ".symlinks/plugins/device_info_plus/ios" + firebase_core: + :path: ".symlinks/plugins/firebase_core/ios" + firebase_messaging: + :path: ".symlinks/plugins/firebase_messaging/ios" Flutter: :path: Flutter - path_provider_ios: - :path: ".symlinks/plugins/path_provider_ios/ios" - shared_preferences_ios: - :path: ".symlinks/plugins/shared_preferences_ios/ios" + flutter_local_notifications: + :path: ".symlinks/plugins/flutter_local_notifications/ios" + path_provider_foundation: + :path: ".symlinks/plugins/path_provider_foundation/ios" + shared_preferences_foundation: + :path: ".symlinks/plugins/shared_preferences_foundation/ios" sqflite: :path: ".symlinks/plugins/sqflite/ios" url_launcher_ios: @@ -58,16 +139,28 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: device_info_plus: e5c5da33f982a436e103237c0c85f9031142abed + Firebase: f13680471b021937f2230ea8503c7809d8c29806 + firebase_core: 58542d7399889ebdbb034baa72d081e54c5c814d + firebase_messaging: 01a8db2962f81ea190d08db767aba2e7e805e647 + FirebaseCore: fa80ad16a62d52f67274b5b88304c3a318bbf9a4 + FirebaseCoreInternal: 8845798510aae74703467480f71ac613788d0696 + FirebaseInstallations: 59c0e4c7a816a0f76710d83f77e5369b3e45eb96 + FirebaseMessaging: fd93783258c53ae5cdb9b41bf0c51606a677f2d5 Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 + flutter_local_notifications: 0c0b1ae97e741e1521e4c1629a459d04b9aec743 FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a - path_provider_ios: 14f3d2fd28c4fdb42f44e0f751d12861c43cee02 - shared_preferences_ios: 548a61f8053b9b8a49ac19c1ffbc8b92c50d68ad + GoogleDataTransport: ea169759df570f4e37bdee1623ec32a7e64e67c4 + GoogleUtilities: c2bdc4cf2ce786c4d2e6b3bcfd599a25ca78f06f + nanopb: b552cce312b6c8484180ef47159bc0f65a1f0431 + path_provider_foundation: c68054786f1b4f3343858c1e1d0caaded73f0be9 + PromisesObjC: 09985d6d70fbe7878040aa746d78236e6946d2ef + shared_preferences_foundation: 986fc17f3d3251412d18b0265f9c64113a8c2472 sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904 - url_launcher_ios: 839c58cdb4279282219f5e248c3321761ff3c4de - video_player_avfoundation: e489aac24ef5cf7af82702979ed16f2a5ef84cff + url_launcher_ios: 08a3dfac5fb39e8759aeb0abbd5d9480f30fc8b4 + video_player_avfoundation: 81e49bb3d9fb63dccf9fa0f6d877dc3ddbeac126 wakelock: d0fc7c864128eac40eba1617cb5264d9c940b46f - webview_flutter_wkwebview: 005fbd90c888a42c5690919a1527ecc6649e1162 + webview_flutter_wkwebview: b7e70ef1ddded7e69c796c7390ee74180182971f -PODFILE CHECKSUM: ef19549a9bc3046e7bb7d2fab4d021637c0c58a3 +PODFILE CHECKSUM: 7368163408c647b7eb699d0d788ba6718e18fb8d COCOAPODS: 1.11.3 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 2ed31bd..6dca0f1 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -3,13 +3,14 @@ archiveVersion = 1; classes = { }; - objectVersion = 51; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 254BA050D82AF8FEF3809DD7 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 15A85E9D6A4DFD56FDD682FD /* Pods_Runner.framework */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 4AC4E22798DB4759A40D4DBB /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 51E96759B37E93004BE91A8C /* GoogleService-Info.plist */; }; 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; @@ -35,6 +36,7 @@ 15A85E9D6A4DFD56FDD682FD /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 3F18407BE8A79EE2307E2EB9 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; + 51E96759B37E93004BE91A8C /* GoogleService-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; name = "GoogleService-Info.plist"; path = "Runner/GoogleService-Info.plist"; sourceTree = ""; }; 52306709286D664D009453DF /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = ""; }; 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; @@ -99,6 +101,7 @@ 97C146EF1CF9000F007C117D /* Products */, 44FDD469DA3537A51D276323 /* Pods */, 4E26FCEF2DD2C69FEDF54D54 /* Frameworks */, + 51E96759B37E93004BE91A8C /* GoogleService-Info.plist */, ); sourceTree = ""; }; @@ -193,6 +196,7 @@ 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + 4AC4E22798DB4759A40D4DBB /* GoogleService-Info.plist in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -218,6 +222,7 @@ }; 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -254,6 +259,7 @@ }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -361,6 +367,7 @@ DEVELOPMENT_TEAM = QQPXL8D953; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; + INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.shopping"; IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -492,6 +499,7 @@ DEVELOPMENT_TEAM = QQPXL8D953; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; + INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.shopping"; IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -518,6 +526,7 @@ DEVELOPMENT_TEAM = QQPXL8D953; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; + INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.shopping"; IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", diff --git a/ios/Runner/GoogleService-Info.plist b/ios/Runner/GoogleService-Info.plist new file mode 100644 index 0000000..ed0222f --- /dev/null +++ b/ios/Runner/GoogleService-Info.plist @@ -0,0 +1,34 @@ + + + + + CLIENT_ID + 186538881179-d39r6qso5iv98m8m60vev91gtsh8fs9o.apps.googleusercontent.com + REVERSED_CLIENT_ID + com.googleusercontent.apps.186538881179-d39r6qso5iv98m8m60vev91gtsh8fs9o + API_KEY + AIzaSyCS07pxfuN62pBYCauLVRAWttTx0GSNDH0 + GCM_SENDER_ID + 186538881179 + PLIST_VERSION + 1 + BUNDLE_ID + com.elektronika.tm + PROJECT_ID + elektronika-app + STORAGE_BUCKET + elektronika-app.appspot.com + IS_ADS_ENABLED + + IS_ANALYTICS_ENABLED + + IS_APPINVITE_ENABLED + + IS_GCM_ENABLED + + IS_SIGNIN_ENABLED + + GOOGLE_APP_ID + 1:186538881179:ios:fb651acd4ce97d5d0f563e + + \ No newline at end of file diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index 09bd32e..76aaa7e 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -26,6 +26,13 @@ $(CURRENT_PROJECT_VERSION) LSRequiresIPhoneOS + UIApplicationSupportsIndirectInputEvents + + UIBackgroundModes + + fetch + remote-notification + UILaunchStoryboardName LaunchScreen UIMainStoryboardFile diff --git a/ios/firebase_app_id_file.json b/ios/firebase_app_id_file.json new file mode 100644 index 0000000..3bbfbfb --- /dev/null +++ b/ios/firebase_app_id_file.json @@ -0,0 +1,7 @@ +{ + "file_generated_by": "FlutterFire CLI", + "purpose": "FirebaseAppID & ProjectID for this Firebase app in this directory", + "GOOGLE_APP_ID": "1:186538881179:ios:fb651acd4ce97d5d0f563e", + "FIREBASE_PROJECT_ID": "elektronika-app", + "GCM_SENDER_ID": "186538881179" +} \ No newline at end of file diff --git a/lib/app/core/utils/download_file.dart b/lib/app/core/utils/download_file.dart new file mode 100644 index 0000000..9a02782 --- /dev/null +++ b/lib/app/core/utils/download_file.dart @@ -0,0 +1,26 @@ +import 'dart:io'; + +import 'package:dio/dio.dart'; +import 'package:path_provider/path_provider.dart'; + +Future downloadFile(String url, String filename) async { + var dio = Dio(); + final directory = await getApplicationDocumentsDirectory(); + final filePath = '${directory.path}/$filename'; + // final response = await + Response response = await dio.get(url, + options: Options( + responseType: ResponseType.bytes, + followRedirects: false, + receiveTimeout: 5000000, + )); + + final file = File(filePath); + + var raf = file.openSync(mode: FileMode.write); + // response.data is List type + raf.writeFromSync(response.data); + await raf.close(); + + return filePath; +} diff --git a/lib/app/core/utils/notification_service.dart b/lib/app/core/utils/notification_service.dart new file mode 100644 index 0000000..0906265 --- /dev/null +++ b/lib/app/core/utils/notification_service.dart @@ -0,0 +1,266 @@ +import 'dart:io'; + +import 'package:firebase_core/firebase_core.dart'; +import 'package:firebase_messaging/firebase_messaging.dart'; +import 'package:flutter/foundation.dart'; +import 'package:flutter_local_notifications/flutter_local_notifications.dart'; +import 'package:get/get.dart'; + +import '../../../firebase_options.dart'; +import '../../app.dart'; +import 'download_file.dart'; + +class FCMFunctions { + static final FCMFunctions _singleton = new FCMFunctions._internal(); + + FCMFunctions._internal(); + + factory FCMFunctions() { + return _singleton; + } + + late FirebaseMessaging messaging; + + late FlutterLocalNotificationsPlugin flip; + + late InitializationSettings initSettings; +//************************************************************************************************************ */ + /// Create a [AndroidNotificationChannel] for heads up notifications + late AndroidNotificationChannel channel; + + /// Initialize the [FlutterLocalNotificationsPlugin] package. + late FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin; + +//************************************************************************************************************ */ + + Future initApp() async { + debugPrint('init firebase'); + await Firebase.initializeApp( + options: DefaultFirebaseOptions.currentPlatform, + ); + + messaging = FirebaseMessaging.instance; + + if (!kIsWeb) { + channel = const AndroidNotificationChannel( + 'high_importance_channel', // id + 'High Importance Notifications', // title + importance: Importance.high, + ); + + flutterLocalNotificationsPlugin = FlutterLocalNotificationsPlugin(); + + /// Create an Android Notification Channel. + /// + /// We use this channel in the `AndroidManifest.xml` file to override the + /// default FCM channel to enable heads up notifications. + await flutterLocalNotificationsPlugin + .resolvePlatformSpecificImplementation() + ?.createNotificationChannel(channel); + + //for IOS Foreground Notification + await messaging.setForegroundNotificationPresentationOptions( + alert: true, + badge: true, + sound: true, + ); + + flip = FlutterLocalNotificationsPlugin(); + var initializationSettingsAndroid = const AndroidInitializationSettings('@drawable/ic_launcher'); + var initializationSettingsIOs = const DarwinInitializationSettings(); + initSettings = InitializationSettings(android: initializationSettingsAndroid, iOS: initializationSettingsIOs); + } + } + + Future subscribeToTopics(String topic) async { + await messaging.subscribeToTopic(topic); + } + + ///Expire : https://firebase.google.com/docs/cloud-messaging/manage-tokens + Future getFCMToken() async { + final fcmToken = await messaging.getToken(); + debugPrint('Get FCM Token ------->: $fcmToken'); + return fcmToken; + } + + void tokenListener() { + debugPrint('tokenListener'); + messaging.onTokenRefresh.listen((fcmToken) { + debugPrint('Listen FCM Token ------->: $fcmToken'); + // If necessary send token to application server. + }).onError((err) { + debugPrint('tokenListener err $err'); + }); + } + + /// IOS + Future iosWebPermission() async { + if (Platform.isIOS || kIsWeb) { + /* NotificationSettings settings = */ await messaging.requestPermission(); + } + } + + ///Foreground messages + /// + ///To handle messages while your application is in the foreground, listen to the onMessage stream. + void foreGroundMessageListener() { + FirebaseMessaging.onMessage.listen(_onMessageHandler); + FirebaseMessaging.onMessageOpenedApp.listen(_onMessageOpenedApp); + } + + // foreground + Future _onMessageHandler(RemoteMessage message) async { + debugPrint('onMessageHandler'); + _showNotificationViaFBConsole(message); + } + + // FLUTTER_NOTIFICATION_CLICK + + // background (app minimized) + Future _onMessageOpenedApp(RemoteMessage message) async => _performClickAction(message); + + Future _showNotification(RemoteMessage message) async { + final String imgUrl = message.data['imageUrl'] ?? ''; + debugPrint('imgUrl $imgUrl'); + final RemoteNotification? notification = message.notification; + + final largeIconPath = await downloadFile(imgUrl, 'largeIcon'); + final bigPicturePath = await downloadFile(imgUrl, 'bigPicture'); + + final BigPictureStyleInformation styleInformation = new BigPictureStyleInformation( + FilePathAndroidBitmap(bigPicturePath), + largeIcon: FilePathAndroidBitmap(largeIconPath), + ); + + var androidPlatformChannelSpecifics = AndroidNotificationDetails( + channel.id, + channel.name, + icon: '@drawable/ic_launcher', + channelDescription: channel.description, + // importance: Importance.max, + // priority: Priority.high, + color: ThemeColor.mainColor, + styleInformation: styleInformation, + ); + var iOSPlatformChannelSpecifics = DarwinNotificationDetails(); + + var platformChannelSpecifics = NotificationDetails( + android: androidPlatformChannelSpecifics, + iOS: iOSPlatformChannelSpecifics, + ); + + FlutterLocalNotificationsPlugin flip = FlutterLocalNotificationsPlugin(); + await flip.show(0, notification?.title, notification?.body, platformChannelSpecifics, payload: 'Default_Sound'); + } + + Future _showNotificationViaFBConsole(RemoteMessage message) async { + final RemoteNotification? notification = message.notification; + if (notification == null) return; + + final String? imgUrl = _getImageUrl(notification); + + debugPrint('==> imgUrl: $imgUrl '); + + BigPictureStyleInformation? styleInformation; + if (imgUrl != null) { + final largeIconPath = await downloadFile(imgUrl, 'largeIcon'); + final bigPicturePath = await downloadFile(imgUrl, 'bigPicture'); + + styleInformation = new BigPictureStyleInformation( + FilePathAndroidBitmap(bigPicturePath), + largeIcon: FilePathAndroidBitmap(largeIconPath), + ); + } + + var androidPlatformChannelSpecifics = AndroidNotificationDetails( + channel.id, + channel.name, + icon: '@drawable/ic_launcher', + channelDescription: channel.description, + // importance: Importance.max, + priority: Priority.high, + color: ThemeColor.mainColor, + styleInformation: styleInformation, + ); + var iOSPlatformChannelSpecifics = DarwinNotificationDetails(); + + var platformChannelSpecifics = NotificationDetails( + android: androidPlatformChannelSpecifics, + iOS: iOSPlatformChannelSpecifics, + ); + + flip.initialize( + initSettings, + // onDidReceiveBackgroundNotificationResponse: (details) { + // debugPrint('==> ${details.payload}'); + // }, + onDidReceiveNotificationResponse: (details) { + debugPrint('onDidReceiveNotificationResponse'); + _performClickAction(message); + }, + ); + await flip.show(0, notification.title, notification.body, platformChannelSpecifics, payload: 'Default_Sound'); + } + + Future _performClickAction(RemoteMessage message) async { + // if (message.data['type'] == 'product') { + // final int productId = int.parse(message.data['id']); + // final ProductModel? model = await ProductApi.getProductById(productId); + // if (model != null) Get.to(() => ProductDetailsPage(model: model)); + // } else if (message.data['type'] == 'filter') { + // message.data.remove('type'); + // navigateToProductListScreen(message.data, false); + // } else { + // open dialog + // if (message.notification == null) return; + + // Get.to( + // () => NotificationPage(title: message.notification!.title ?? '', data: message.notification!.body ?? ''), + // ); + // } + } + + String? _getImageUrl(RemoteNotification notification) { + if (Platform.isIOS && notification.apple != null) return notification.apple?.imageUrl; + if (Platform.isAndroid && notification.android != null) return notification.android?.imageUrl; + return null; + } +} + +final fcmFunctions = FCMFunctions(); + +// backgroundHandler must be on top and separated +Future onBackgroundHandler(RemoteMessage message) async { + // fcmFunctions._showNotification(message); + fcmFunctions._showNotificationViaFBConsole(message); +} + +Future initFCMFunctions() async { + await fcmFunctions.initApp(); + await fcmFunctions.iosWebPermission(); + + FirebaseMessaging.onBackgroundMessage(onBackgroundHandler); + + await fcmFunctions.getFCMToken(); + fcmFunctions.tokenListener(); + fcmFunctions.foreGroundMessageListener(); + await fcmFunctions.subscribeToTopics('notifications'); +} + +/* final http.Response response = await http.get(Uri.parse(URL)); + BigPictureStyleInformation bigPictureStyleInformation = + BigPictureStyleInformation( + ByteArrayAndroidBitmap.fromBase64String(base64Encode(image)), + largeIcon: ByteArrayAndroidBitmap.fromBase64String(base64Encode(image)), + ); + flutterLocalNotificationsPlugin.show( + Random().nextInt(1000), + title, + description, + NotificationDetails( + android: AndroidNotificationDetails(channel.id, channel.name, + channelDescription: channel.description, + importance: Importance.high, + styleInformation: bigPictureStyleInformation), + ), + ); */ diff --git a/lib/app/data/apis/filter.dart b/lib/app/data/apis/filter.dart index bbd5b23..49b9802 100644 --- a/lib/app/data/apis/filter.dart +++ b/lib/app/data/apis/filter.dart @@ -143,4 +143,12 @@ class FilterApi { return []; } } + + static Future> getOptions(int page, int itemsPerPage, FilterModel model, String searchKey) async { + debugPrint('page:$page, model:${model.code}' ', id:${model.id}'); + + List options = []; + + return options; + } } diff --git a/lib/app/data/models/category.dart b/lib/app/data/models/category.dart index 490c1b5..6c16a86 100644 --- a/lib/app/data/models/category.dart +++ b/lib/app/data/models/category.dart @@ -1,22 +1,22 @@ class CategoryModel { late int id; late String name; - late String imageUrl; + // late String imageUrl; + late String iconPath; late List children; int? parentId; String? slug; String? description; - String? categoryIconPath; CategoryModel({ required this.id, required this.name, - required this.imageUrl, + // required this.imageUrl, + required this.iconPath, required this.children, this.parentId, this.slug, this.description, - this.categoryIconPath, }); CategoryModel.fromJson(Map json) { @@ -25,8 +25,8 @@ class CategoryModel { parentId = json['parent_id']; slug = json['slug'] ?? ''; description = json['description'] ?? ''; - imageUrl = json['image_url'] ?? 'assets/phone.jpg'; //TODO: change - categoryIconPath = json['category_icon_path'] ?? ''; + // imageUrl = json['image_url'] ?? 'assets/phone.jpg'; //TODO: change + iconPath = json['category_icon_path'] ?? ''; if (json['children'] != null) { children = []; json['children'].forEach((v) { diff --git a/lib/app/global_widgets/app_bar.dart b/lib/app/global_widgets/app_bar.dart index 6c1aeeb..325fbfd 100644 --- a/lib/app/global_widgets/app_bar.dart +++ b/lib/app/global_widgets/app_bar.dart @@ -1,4 +1,4 @@ -import 'package:badges/badges.dart'; +import 'package:badges/badges.dart' as badge; import 'package:elektronika/app/data/routes/app_routes.dart'; import 'package:elektronika/app/pages/cart/controller.dart'; import 'package:flutter/material.dart'; @@ -39,7 +39,8 @@ class CustomAppbarWidget extends StatelessWidget implements PreferredSizeWidget elevation: this.elevation, actions: [ GestureDetector( - onTap: () => Get.toNamed(AppRoutes.CONTACTS), //debugPrint('onContactTapped'), //Get.toNamed(AppRoutes.CART), + onTap: () => + Get.toNamed(AppRoutes.CONTACTS), //debugPrint('onContactTapped'), //Get.toNamed(AppRoutes.CART), child: Row( children: [ Icon(Icons.call_outlined, color: Colors.grey, size: 26), @@ -53,9 +54,9 @@ class CustomAppbarWidget extends StatelessWidget implements PreferredSizeWidget Row( children: [ controller.state.cartModel.value != null /* && controller.state.cartModel.value?.itemsQty != 0 */ - ? Badge( - position: BadgePosition.topEnd(top: -14), - animationType: BadgeAnimationType.scale, + ? badge.Badge( + position: badge.BadgePosition.topEnd(top: -14), + animationType: badge.BadgeAnimationType.scale, animationDuration: Duration(milliseconds: 300), badgeColor: ThemeColor.mainColor.withOpacity(0.70), badgeContent: Text( diff --git a/lib/app/pages/category/widgets/categories_widget.dart b/lib/app/pages/category/widgets/categories_widget.dart index 2b5693d..c60b410 100644 --- a/lib/app/pages/category/widgets/categories_widget.dart +++ b/lib/app/pages/category/widgets/categories_widget.dart @@ -73,14 +73,14 @@ class CategoryItem extends StatelessWidget { child: root.children.isEmpty ? new ListTile( // contentPadding: EdgeInsets.symmetric(horizontal: 16.h), - leading: _getTileLeading(root.imageUrl), + leading: _getTileLeading(root.iconPath), title: _getTileTitle(root.name), onTap: () => cc.navigateToProducts(root), ) : new ExpansionTile( childrenPadding: EdgeInsets.symmetric(horizontal: 12.h), key: new PageStorageKey(root), - leading: _getTileLeading(root.imageUrl), + leading: _getTileLeading(root.iconPath), title: GestureDetector( onTap: () => cc.navigateToProducts(root), child: _getTileTitle(root.name), diff --git a/lib/firebase_options.dart b/lib/firebase_options.dart new file mode 100644 index 0000000..d6453a0 --- /dev/null +++ b/lib/firebase_options.dart @@ -0,0 +1,69 @@ +// File generated by FlutterFire CLI. +// ignore_for_file: lines_longer_than_80_chars, avoid_classes_with_only_static_members +import 'package:firebase_core/firebase_core.dart' show FirebaseOptions; +import 'package:flutter/foundation.dart' + show defaultTargetPlatform, kIsWeb, TargetPlatform; + +/// Default [FirebaseOptions] for use with your Firebase apps. +/// +/// Example: +/// ```dart +/// import 'firebase_options.dart'; +/// // ... +/// await Firebase.initializeApp( +/// options: DefaultFirebaseOptions.currentPlatform, +/// ); +/// ``` +class DefaultFirebaseOptions { + static FirebaseOptions get currentPlatform { + if (kIsWeb) { + throw UnsupportedError( + 'DefaultFirebaseOptions have not been configured for web - ' + 'you can reconfigure this by running the FlutterFire CLI again.', + ); + } + switch (defaultTargetPlatform) { + case TargetPlatform.android: + return android; + case TargetPlatform.iOS: + return ios; + case TargetPlatform.macOS: + throw UnsupportedError( + 'DefaultFirebaseOptions have not been configured for macos - ' + 'you can reconfigure this by running the FlutterFire CLI again.', + ); + case TargetPlatform.windows: + throw UnsupportedError( + 'DefaultFirebaseOptions have not been configured for windows - ' + 'you can reconfigure this by running the FlutterFire CLI again.', + ); + case TargetPlatform.linux: + throw UnsupportedError( + 'DefaultFirebaseOptions have not been configured for linux - ' + 'you can reconfigure this by running the FlutterFire CLI again.', + ); + default: + throw UnsupportedError( + 'DefaultFirebaseOptions are not supported for this platform.', + ); + } + } + + static const FirebaseOptions android = FirebaseOptions( + apiKey: 'AIzaSyD9JBvYuGMFymroLwL9rYxkqB6u7EIaee0', + appId: '1:186538881179:android:96a2f9ce98f8bbf00f563e', + messagingSenderId: '186538881179', + projectId: 'elektronika-app', + storageBucket: 'elektronika-app.appspot.com', + ); + + static const FirebaseOptions ios = FirebaseOptions( + apiKey: 'AIzaSyCS07pxfuN62pBYCauLVRAWttTx0GSNDH0', + appId: '1:186538881179:ios:fb651acd4ce97d5d0f563e', + messagingSenderId: '186538881179', + projectId: 'elektronika-app', + storageBucket: 'elektronika-app.appspot.com', + iosClientId: '186538881179-d39r6qso5iv98m8m60vev91gtsh8fs9o.apps.googleusercontent.com', + iosBundleId: 'com.elektronika.tm', + ); +} diff --git a/lib/library/multi_selector/controller.dart b/lib/library/multi_selector/controller.dart new file mode 100644 index 0000000..a156ac6 --- /dev/null +++ b/lib/library/multi_selector/controller.dart @@ -0,0 +1,143 @@ +import 'dart:async'; + +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; + +import '../../../app/app.dart'; +import 'multi_select_action.dart'; +import 'multi_select_item.dart'; + +class MultiSelectController extends GetxController + with StateMixin>>, MultiSelectActions, ScrollMixin { + // List initialValues; + // String modelCode; + Timer? _debounce; + + FilterModel model; + + MultiSelectController(this.model); + + RxList selectedValues = [].obs; + + List> items = []; + + RxString searchKey = ''.obs; + + int page = 1; + int itemPerPage = 20; + bool getFirstData = false; + RxBool lastPage = false.obs; + @override + void onInit() { + searchKey.value = ''; + + debugPrint('model.selectedOptions ${model.selectedOptions}'); + + this.selectedValues.addAll(model.selectedOptions); + update(); + + getData(); + + super.onInit(); + } + + Future getData() async { + await FilterApi.getOptions(page, itemPerPage, model, searchKey.value).then((result) { + final bool emptyRepositories = result.isEmpty; + if (!getFirstData && emptyRepositories) { + change(null, status: RxStatus.empty()); + } else if (getFirstData && emptyRepositories) { + lastPage.value = true; + } else { + getFirstData = true; + + // convert data + var newItems = result.map((option) => MultiSelectItem(option, option.adminName)).toList(); + debugPrint('newItems ${newItems.length}'); + for (var item in newItems) { + item.selected = this.selectedValues.where((element) => element.id == item.value.id).isNotEmpty; + items.add(item); + } + + // check is last item + if (items.length < itemPerPage) { + lastPage.value = true; + } + change(items, status: RxStatus.success()); + } + update(); + }, onError: (err) { + change(null, status: RxStatus.error(err.toString())); + }); + } + + @override + Future onEndScroll() async { + debugPrint('onEndScroll ${lastPage.value}'); + if (!lastPage.value) { + page += 1; + await getData(); + } + } + + @override + Future onTopScroll() async { + debugPrint('onTopScroll'); + } + + void clearFilter(BuildContext ctx, void Function(List)? onClear) { + debugPrint('clearFilter'); + + for (int i = 0; i < items.length; i++) { + if (selectedValues.contains(items[i].value)) { + items[i].selected = false; + } + } + selectedValues.clear(); + + this.onClearTap(ctx, selectedValues, onClear); + + update(); + } + + Future onSearchChanged(String val) async { + getFirstData = false; + page = 1; + + searchKey.value = val; + + if (_debounce?.isActive ?? false) _debounce!.cancel(); + _debounce = Timer(const Duration(milliseconds: 600), () { + items.clear(); + change(items, status: RxStatus.loading()); + getData(); + update(); + }); + } + + void onListBoxListTileChanged( + MultiSelectItem item, void Function(List)? onSelectionChanged, checked) { + debugPrint('onListBoxListTileChanged'); + + if (checked) { + item.selected = true; + selectedValues.add(item.value); + } else { + item.selected = false; + selectedValues.removeWhere((e) => e.id == item.value.id); + } + + selectedValues.refresh(); + + if (onSelectionChanged != null) { + onSelectionChanged(selectedValues); + } + + update(); + } + + void onConfirmSelection(BuildContext context, void Function(List) onConfirm) { + onConfirmTap(context, selectedValues, onConfirm); + update(); + } +} diff --git a/lib/library/multi_selector/multi_select_bottom_sheet_getx.dart b/lib/library/multi_selector/multi_select_bottom_sheet_getx.dart new file mode 100644 index 0000000..d3810b8 --- /dev/null +++ b/lib/library/multi_selector/multi_select_bottom_sheet_getx.dart @@ -0,0 +1,253 @@ +// import 'package:animate_do/animate_do.dart'; +// import 'package:flutter/material.dart'; +// import 'package:flutter/services.dart'; +// import 'package:flutter_screenutil/flutter_screenutil.dart'; +// import 'package:flutter_svg/flutter_svg.dart'; +// import 'package:get/get.dart'; + +// import '../../../app/app.dart'; +// import 'controller.dart'; +// import 'multi_select_item.dart'; + +// class MultiSelectBottomSheetGetX extends StatelessWidget { +// /// The list of selected values before interaction. +// // final List initialValue; + +// /// The text at the top of the BottomSheet. +// // final String title; + +// /// Used to [getData] from api. +// // final String modelCode; + +// final FilterModel model; + +// /// Fires when the an item is selected / unselected. +// final void Function(List)? onSelectionChanged; + +// /// Fires when confirm is tapped. +// final void Function(List) onConfirm; + +// /// Fires when clear is tapped. +// final void Function(List) onClear; + +// MultiSelectBottomSheetGetX({ +// // required this.initialValue, +// // required this.title, +// // required this.modelCode, +// required this.model, +// required this.onConfirm, +// required this.onClear, +// this.onSelectionChanged, +// }); + +// /// Returns a CheckboxListTile +// Widget _buildListItem(BuildContext context, MultiSelectController msc, MultiSelectItem item) { +// final theme = Theme.of(context); +// final oldCheckboxTheme = theme.checkboxTheme; + +// final newCheckBoxTheme = oldCheckboxTheme.copyWith( +// shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(300)), +// ); +// return Theme( +// data: theme.copyWith(checkboxTheme: newCheckBoxTheme), +// child: Transform.translate( +// offset: Offset(-24, 0), +// child: Transform.scale( +// scale: 1.h, +// child: CheckboxListTile( +// checkColor: ThemeColor.white, +// value: item.selected, +// activeColor: ThemeColor.mainColor, +// title: model.code != 'color' +// ? Text(item.label) +// : Align( +// alignment: Alignment.centerLeft, +// child: Row( +// children: [ +// item.value.swatchValue.isNotEmpty +// ? CircleAvatar( +// backgroundColor: Colors.grey, +// maxRadius: 8.40.w, +// child: CircleAvatar( +// backgroundColor: HexColor(item.value.swatchValue), +// maxRadius: 8.0.w, +// ), +// ) +// : SizedBox.shrink(), +// SizedBox(width: 16.w), +// Text(item.label), +// ], +// ), +// ), +// controlAffinity: ListTileControlAffinity.leading, +// onChanged: (checked) => msc.onListBoxListTileChanged( +// item, +// onSelectionChanged, +// checked, +// ), +// ), +// ), +// ), +// ); +// } + +// @override +// Widget build(BuildContext context) { +// final EdgeInsets mqPadding = MediaQuery.of(context).padding; +// var screenSize = MediaQuery.of(context).size; +// return GetBuilder( +// init: MultiSelectController(model), +// builder: (msc) { +// final bool isLastPage = msc.lastPage.value; +// return Container( +// constraints: BoxConstraints(maxHeight: screenSize.height - mqPadding.top), +// padding: EdgeInsets.only(bottom: mqPadding.bottom + 16, top: 16, left: 16, right: 16), +// decoration: new BoxDecoration( +// color: ThemeColor.white, +// borderRadius: BorderRadius.only(topRight: Radius.circular(16), topLeft: Radius.circular(16)), +// ), +// child: Column( +// mainAxisSize: MainAxisSize.min, +// children: [ +// Container( +// padding: const EdgeInsets.only(top: 8), +// child: Center(child: SvgPicture.asset('assets/icons/drag_line.svg')), +// ), +// SizedBox(height: 8.h), +// // title +// Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Text(model.name, style: AppTheme.bottomSheetHeaderStyle), +// SizedBox(height: 16), +// // search box +// Container( +// padding: const EdgeInsets.all(8), +// height: 40.h, +// width: double.infinity, +// decoration: new BoxDecoration( +// color: ThemeColor.colorEFF0F4, +// borderRadius: BorderRadius.circular(8), +// ), +// child: TextFormField( +// cursorColor: Colors.black, +// inputFormatters: [new LengthLimitingTextInputFormatter(30)], +// decoration: InputDecoration( +// border: InputBorder.none, +// prefixIcon: Icon( +// Icons.search, +// size: 24.h, +// color: Colors.grey, +// ), +// ), +// onChanged: (val) => msc.onSearchChanged(val), +// ), +// ), +// SizedBox(height: 20), +// Row( +// children: [ +// FadeIn(child: CircleNumberWidget(number: msc.selectedValues.length)), +// SizedBox(width: 8), +// Text( +// 'applied'.tr, +// style: new TextStyle( +// color: ThemeColor.color717278, +// fontSize: 16.sp, +// ), +// ), +// Spacer(), +// msc.selectedValues.isNotEmpty +// ? FadeIn( +// child: TextButton( +// child: Text('clear'.tr), +// style: TextButton.styleFrom(foregroundColor: ThemeColor.mainColor), +// onPressed: () => msc.clearFilter(context, onClear), +// ), +// ) +// : SizedBox.shrink(), +// ], +// ), +// ], +// ), + +// AppTheme.appDivider, + +// // body +// Expanded( +// child: ConstrainedBox( +// constraints: new BoxConstraints(minHeight: 0.3.sh), +// child: msc.obx( +// (state) => state != null +// ? RefreshIndicator( +// onRefresh: msc.getData, +// color: ThemeColor.mainColor, +// child: MediaQuery.removePadding( +// context: context, +// removeTop: true, +// child: ListView.builder( +// shrinkWrap: true, +// controller: msc.scroll, +// itemCount: state.length + 1, +// itemBuilder: (context, index) { +// if (index < state.length) { +// return FadeIn( +// child: _buildListItem(context, msc, state[index]), +// ); +// } else if (index == state.length && !isLastPage) +// return Padding( +// padding: const EdgeInsets.only(top: 10, bottom: 40), +// child: Center( +// child: CustomLoader(), +// ), +// ); +// else { +// return SizedBox.shrink(); +// } +// }, +// ), +// ), +// ) +// : Center( +// child: Text( +// 'error_occurred'.tr, +// style: TextStyle(fontSize: 18), +// textAlign: TextAlign.center, +// ), +// ), +// onLoading: Center(child: CustomLoader()), +// onEmpty: Align( +// alignment: Alignment.topCenter, +// child: NotFoundWidget(), +// ), +// onError: (error) => Center( +// child: Text( +// 'error_occurred'.tr, +// style: TextStyle(fontSize: 18), +// textAlign: TextAlign.center, +// ), +// ), +// ), +// ), +// ), + +// // footer +// msc.selectedValues.isNotEmpty +// ? FadeIn( +// duration: Duration(milliseconds: 900), +// child: ButtonWidthFull( +// title: 'done'.tr, +// btnColor: ThemeColor.mainColor, +// callback: () => msc.onConfirmSelection( +// context, +// onConfirm, +// ), +// ), +// ) +// : SizedBox.shrink(), +// ], +// ), +// ); +// }, +// ); +// } +// } diff --git a/lib/main.dart b/lib/main.dart index e440aff..e69c93b 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -5,11 +5,19 @@ import 'package:get/get.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'app/app.dart'; +import 'app/core/utils/notification_service.dart'; DBHelper dbHelper = DBHelper(); +// Firebase initials is separated, app needs to be initialized +// regardless Firebase +Future _initFBInitials() async { + await initFCMFunctions(); +} + Future main() async { WidgetsFlutterBinding.ensureInitialized(); + await _initFBInitials(); SharedPreferences prefs = await SharedPreferences.getInstance(); diff --git a/pubspec.lock b/pubspec.lock index 846a876..8e981cf 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1,216 +1,310 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: + _flutterfire_internals: + dependency: transitive + description: + name: _flutterfire_internals + sha256: "330d7fcbb72624f5b6d374af8b059b0ef4ba96ba5b8987f874964a1287eb617d" + url: "https://pub.dev" + source: hosted + version: "1.0.18" animate_do: dependency: "direct main" description: name: animate_do - url: "https://pub.dartlang.org" + sha256: "4554744e604b841e2bde710398ef3f4f8a1935a182b48727afe2a1023527b883" + url: "https://pub.dev" source: hosted version: "2.1.0" archive: dependency: transitive description: name: archive - url: "https://pub.dartlang.org" + sha256: d6347d54a2d8028e0437e3c099f66fdb8ae02c4720c1e7534c9f24c10351f85d + url: "https://pub.dev" source: hosted - version: "3.2.2" + version: "3.3.6" args: dependency: transitive description: name: args - url: "https://pub.dartlang.org" + sha256: "4cab82a83ffef80b262ddedf47a0a8e56ee6fbf7fe21e6e768b02792034dd440" + url: "https://pub.dev" source: hosted - version: "2.3.0" + version: "2.4.0" async: dependency: transitive description: name: async - url: "https://pub.dartlang.org" + sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0 + url: "https://pub.dev" source: hosted - version: "2.9.0" + version: "2.10.0" back_button_interceptor: dependency: transitive description: name: back_button_interceptor - url: "https://pub.dartlang.org" + sha256: e47660f2178a4392eb72001f9594d3fdcb5efde93e59d2819d61fda499e781c8 + url: "https://pub.dev" source: hosted - version: "6.0.0" + version: "6.0.2" badges: dependency: "direct main" description: name: badges - url: "https://pub.dartlang.org" + sha256: "727580d938b7a1ff47ea42df730d581415606b4224cfa708671c10287f8d3fe6" + url: "https://pub.dev" source: hosted - version: "2.0.2" + version: "2.0.3" boolean_selector: dependency: transitive description: name: boolean_selector - url: "https://pub.dartlang.org" + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" cached_network_image: dependency: "direct main" description: name: cached_network_image - url: "https://pub.dartlang.org" + sha256: fd3d0dc1d451f9a252b32d95d3f0c3c487bc41a75eba2e6097cb0b9c71491b15 + url: "https://pub.dev" source: hosted - version: "3.2.1" + version: "3.2.3" cached_network_image_platform_interface: dependency: transitive description: name: cached_network_image_platform_interface - url: "https://pub.dartlang.org" + sha256: bb2b8403b4ccdc60ef5f25c70dead1f3d32d24b9d6117cfc087f496b178594a7 + url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "2.0.0" cached_network_image_web: dependency: transitive description: name: cached_network_image_web - url: "https://pub.dartlang.org" + sha256: b8eb814ebfcb4dea049680f8c1ffb2df399e4d03bf7a352c775e26fa06e02fa0 + url: "https://pub.dev" source: hosted - version: "1.0.1" + version: "1.0.2" carousel_slider: dependency: "direct main" description: name: carousel_slider - url: "https://pub.dartlang.org" + sha256: "9c695cc963bf1d04a47bd6021f68befce8970bcd61d24938e1fb0918cf5d9c42" + url: "https://pub.dev" source: hosted - version: "4.0.0" + version: "4.2.1" characters: dependency: transitive description: name: characters - url: "https://pub.dartlang.org" + sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c + url: "https://pub.dev" source: hosted version: "1.2.1" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.1" chewie: dependency: transitive description: name: chewie - url: "https://pub.dartlang.org" + sha256: e9da4898ee4859825404f507969f57113c04ca0060e152b95c9afd73934126ad + url: "https://pub.dev" source: hosted - version: "1.3.3" + version: "1.4.0" chewie_audio: dependency: transitive description: name: chewie_audio - url: "https://pub.dartlang.org" + sha256: f92bb4364ced21318e1a7c0eddaf249a7554e5cf27f869d58c44d926abd292a7 + url: "https://pub.dev" source: hosted version: "1.3.0" clock: dependency: transitive description: name: clock - url: "https://pub.dartlang.org" + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" source: hosted version: "1.1.1" collection: dependency: transitive description: name: collection - url: "https://pub.dartlang.org" + sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0 + url: "https://pub.dev" source: hosted - version: "1.16.0" + version: "1.17.0" + convert: + dependency: transitive + description: + name: convert + sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + url: "https://pub.dev" + source: hosted + version: "3.1.1" crypto: dependency: transitive description: name: crypto - url: "https://pub.dartlang.org" + sha256: aa274aa7774f8964e4f4f38cc994db7b6158dd36e9187aaceaddc994b35c6c67 + url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.0.2" csslib: dependency: transitive description: name: csslib - url: "https://pub.dartlang.org" + sha256: b36c7f7e24c0bdf1bf9a3da461c837d1de64b9f8beb190c9011d8c72a3dfd745 + url: "https://pub.dev" source: hosted - version: "0.17.1" + version: "0.17.2" cupertino_icons: dependency: "direct main" description: name: cupertino_icons - url: "https://pub.dartlang.org" + sha256: e35129dc44c9118cee2a5603506d823bab99c68393879edb440e0090d07586be + url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "1.0.5" + dbus: + dependency: transitive + description: + name: dbus + sha256: "4f814fc7e73057f78f307a6c4714fe2ffb4bdb994ab1970540a068ec4d5a45be" + url: "https://pub.dev" + source: hosted + version: "0.7.3" device_info_plus: dependency: "direct main" description: name: device_info_plus - url: "https://pub.dartlang.org" + sha256: c2386729379f04cd39ee0d5d4c48d8c8a0e70f7622dac626cbf5e396392602fd + url: "https://pub.dev" source: hosted - version: "3.2.2" + version: "3.2.4" device_info_plus_linux: dependency: transitive description: name: device_info_plus_linux - url: "https://pub.dartlang.org" + sha256: e4eb5db4704f5534e872148a21cfcd39581022b63df556da6720d88f7c9f91a9 + url: "https://pub.dev" source: hosted version: "2.1.1" device_info_plus_macos: dependency: transitive description: name: device_info_plus_macos - url: "https://pub.dartlang.org" + sha256: "38871fd2ad31871399d8307630c9f4eb5941dd2c643ee221c44d58de95d367a1" + url: "https://pub.dev" source: hosted - version: "2.2.2" + version: "2.2.3" device_info_plus_platform_interface: dependency: transitive description: name: device_info_plus_platform_interface - url: "https://pub.dartlang.org" + sha256: b2743934f0efc3e291880d76fb341ea114b7e8417d77ee0f93bd21f5dfd3e8d2 + url: "https://pub.dev" source: hosted - version: "2.3.0+1" + version: "2.6.1" device_info_plus_web: dependency: transitive description: name: device_info_plus_web - url: "https://pub.dartlang.org" + sha256: "38715ad1ef3bee8915dd7bee08a9ac9ab54472a8df425c887062a3046209f663" + url: "https://pub.dev" source: hosted version: "2.1.0" device_info_plus_windows: dependency: transitive description: name: device_info_plus_windows - url: "https://pub.dartlang.org" + sha256: "8fb1403fc94636d6ab48aeebb5f9379f2ca51cde3b337167ec6f39db09234492" + url: "https://pub.dev" source: hosted version: "2.1.1" dio: dependency: "direct main" description: name: dio - url: "https://pub.dartlang.org" + sha256: "7d328c4d898a61efc3cd93655a0955858e29a0aa647f0f9e02d59b3bb275e2e8" + url: "https://pub.dev" source: hosted - version: "4.0.4" + version: "4.0.6" fake_async: dependency: transitive description: name: fake_async - url: "https://pub.dartlang.org" + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" source: hosted version: "1.3.1" ffi: dependency: transitive description: name: ffi - url: "https://pub.dartlang.org" + sha256: "13a6ccf6a459a125b3fcdb6ec73bd5ff90822e071207c663bfd1f70062d51d18" + url: "https://pub.dev" source: hosted - version: "1.1.2" + version: "1.2.1" file: dependency: transitive description: name: file - url: "https://pub.dartlang.org" + sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" + url: "https://pub.dev" source: hosted - version: "6.1.2" + version: "6.1.4" + firebase_core: + dependency: "direct main" + description: + name: firebase_core + sha256: "75f747cafd7cbd6c00b908e3a7aa59fc31593d46ba8165d9ee8a79e69464a394" + url: "https://pub.dev" + source: hosted + version: "2.8.0" + firebase_core_platform_interface: + dependency: transitive + description: + name: firebase_core_platform_interface + sha256: "5615b30c36f55b2777d0533771deda7e5730e769e5d3cb7fda79e9bed86cfa55" + url: "https://pub.dev" + source: hosted + version: "4.5.3" + firebase_core_web: + dependency: transitive + description: + name: firebase_core_web + sha256: "0c1cf1f1022d2245ac117443bb95207952ca770281524d2908e323bc063fb8ff" + url: "https://pub.dev" + source: hosted + version: "2.2.2" + firebase_messaging: + dependency: "direct main" + description: + name: firebase_messaging + sha256: e82c99bcccf707db4d82ac3fb07be629a392c4cc2a6756aaf1a74c009114846f + url: "https://pub.dev" + source: hosted + version: "14.3.0" + firebase_messaging_platform_interface: + dependency: transitive + description: + name: firebase_messaging_platform_interface + sha256: "710bb139ff6e27fe47a0684ba88df4b7517a44d814dc6b7f54a2537568a82fcf" + url: "https://pub.dev" + source: hosted + version: "4.2.16" + firebase_messaging_web: + dependency: transitive + description: + name: firebase_messaging_web + sha256: "66ece031cb17fb771cda4b3328858395fa48aa4c3b3e6a5d1bcaff928086cacd" + url: "https://pub.dev" + source: hosted + version: "3.2.17" flutter: dependency: "direct main" description: flutter @@ -220,70 +314,104 @@ packages: dependency: transitive description: name: flutter_blurhash - url: "https://pub.dartlang.org" + sha256: "05001537bd3fac7644fa6558b09ec8c0a3f2eba78c0765f88912882b1331a5c6" + url: "https://pub.dev" source: hosted - version: "0.6.4" + version: "0.7.0" flutter_cache_manager: dependency: transitive description: name: flutter_cache_manager - url: "https://pub.dartlang.org" + sha256: "32cd900555219333326a2d0653aaaf8671264c29befa65bbd9856d204a4c9fb3" + url: "https://pub.dev" source: hosted version: "3.3.0" flutter_html: dependency: "direct main" description: name: flutter_html - url: "https://pub.dartlang.org" + sha256: ccb810fcabfce3a7ffaca46e458323915ac7e7fc59082c7357ff848972c02230 + url: "https://pub.dev" source: hosted version: "2.2.1" flutter_launcher_icons: dependency: "direct dev" description: name: flutter_launcher_icons - url: "https://pub.dartlang.org" + sha256: "559c600f056e7c704bd843723c21e01b5fba47e8824bd02422165bcc02a5de1d" + url: "https://pub.dev" source: hosted - version: "0.9.2" + version: "0.9.3" flutter_layout_grid: dependency: transitive description: name: flutter_layout_grid - url: "https://pub.dartlang.org" + sha256: "86c1b21520612edfbb93f189b3ec05058470570f3a5c08ce10c92cc76a6e814e" + url: "https://pub.dev" source: hosted version: "1.0.6" + flutter_local_notifications: + dependency: "direct main" + description: + name: flutter_local_notifications + sha256: f222919a34545931e47b06000836b5101baeffb0e6eb5a4691d2d42851740dd9 + url: "https://pub.dev" + source: hosted + version: "12.0.4" + flutter_local_notifications_linux: + dependency: transitive + description: + name: flutter_local_notifications_linux + sha256: "6af440e3962eeab8459602c309d7d4ab9e62f05d5cfe58195a28f846a0b5d523" + url: "https://pub.dev" + source: hosted + version: "1.0.0" + flutter_local_notifications_platform_interface: + dependency: transitive + description: + name: flutter_local_notifications_platform_interface + sha256: "5ec1feac5f7f7d9266759488bc5f76416152baba9aa1b26fe572246caa00d1ab" + url: "https://pub.dev" + source: hosted + version: "6.0.0" flutter_math_fork: dependency: transitive description: name: flutter_math_fork - url: "https://pub.dartlang.org" + sha256: cfec964c4975c6becc64291eb9b782fe70df5e0c5bfe0763d9e856432fcc6fcd + url: "https://pub.dev" source: hosted version: "0.4.2+2" flutter_rating_bar: dependency: "direct main" description: name: flutter_rating_bar - url: "https://pub.dartlang.org" + sha256: d2af03469eac832c591a1eba47c91ecc871fe5708e69967073c043b2d775ed93 + url: "https://pub.dev" source: hosted - version: "4.0.0" + version: "4.0.1" flutter_screenutil: dependency: "direct main" description: name: flutter_screenutil - url: "https://pub.dartlang.org" + sha256: "0a122936b450324cbdfd51be0819cc6fcebb093eb65585e9cd92263f7a1a8a39" + url: "https://pub.dev" source: hosted - version: "5.5.3+2" + version: "5.7.0" flutter_staggered_grid_view: dependency: "direct main" description: name: flutter_staggered_grid_view - url: "https://pub.dartlang.org" + sha256: "1312314293acceb65b92754298754801b0e1f26a1845833b740b30415bbbcf07" + url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.6.2" flutter_svg: dependency: "direct main" description: name: flutter_svg - url: "https://pub.dartlang.org" + sha256: "9ac1967e2f72a08af11b05b39167920f90d043cf67163d13a544a358c8f31afa" + url: "https://pub.dev" source: hosted version: "0.22.0" flutter_test: @@ -300,329 +428,368 @@ packages: dependency: "direct main" description: name: get - url: "https://pub.dartlang.org" + sha256: "2ba20a47c8f1f233bed775ba2dd0d3ac97b4cf32fc17731b3dfc672b06b0e92a" + url: "https://pub.dev" source: hosted version: "4.6.5" html: dependency: "direct main" description: name: html - url: "https://pub.dartlang.org" + sha256: "79d498e6d6761925a34ee5ea8fa6dfef38607781d2fa91e37523474282af55cb" + url: "https://pub.dev" source: hosted - version: "0.15.0" + version: "0.15.2" http: dependency: transitive description: name: http - url: "https://pub.dartlang.org" + sha256: "6aa2946395183537c8b880962d935877325d6a09a2867c3970c05c0fed6ac482" + url: "https://pub.dev" source: hosted - version: "0.13.4" + version: "0.13.5" http_parser: dependency: transitive description: name: http_parser - url: "https://pub.dartlang.org" + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + url: "https://pub.dev" source: hosted - version: "4.0.0" + version: "4.0.2" image: dependency: transitive description: name: image - url: "https://pub.dartlang.org" + sha256: "02bafd3b4f399bfeb10034deba9753d93b55ce41cd0c4d3d8b355626f80e5b32" + url: "https://pub.dev" source: hosted version: "3.1.3" intl: dependency: "direct main" description: name: intl - url: "https://pub.dartlang.org" + sha256: "910f85bce16fb5c6f614e117efa303e85a1731bb0081edf3604a2ae6e9a3cc91" + url: "https://pub.dev" source: hosted version: "0.17.0" js: dependency: transitive description: name: js - url: "https://pub.dartlang.org" + sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7" + url: "https://pub.dev" source: hosted - version: "0.6.4" + version: "0.6.5" lint: dependency: "direct dev" description: name: lint - url: "https://pub.dartlang.org" + sha256: "4a539aa34ec5721a2c7574ae2ca0336738ea4adc2a34887d54b7596310b33c85" + url: "https://pub.dev" source: hosted - version: "1.8.2" + version: "1.10.0" loader_overlay: dependency: "direct main" description: name: loader_overlay - url: "https://pub.dartlang.org" + sha256: fba43a51a89b5578e3c05e39c9826a6853a1ab181b02e79cd41d96c58286716c + url: "https://pub.dev" source: hosted - version: "2.0.7" + version: "2.1.0" mask_text_input_formatter: dependency: "direct main" description: name: mask_text_input_formatter - url: "https://pub.dartlang.org" + sha256: "19bb7809c3c2559277e95521b3ee421e1409eb2cc85efd2feb191696c92490f4" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.4.0" matcher: dependency: transitive description: name: matcher - url: "https://pub.dartlang.org" + sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72" + url: "https://pub.dev" source: hosted - version: "0.12.12" + version: "0.12.13" material_color_utilities: dependency: transitive description: name: material_color_utilities - url: "https://pub.dartlang.org" + sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 + url: "https://pub.dev" source: hosted - version: "0.1.5" + version: "0.2.0" meta: dependency: transitive description: name: meta - url: "https://pub.dartlang.org" + sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42" + url: "https://pub.dev" source: hosted version: "1.8.0" modal_bottom_sheet: dependency: "direct main" description: name: modal_bottom_sheet - url: "https://pub.dartlang.org" + sha256: ef533916a2c3089571c32bd34e410faca77a6849a3f28f748e0794525c5658a0 + url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "2.1.2" multi_select_flutter: dependency: "direct main" description: name: multi_select_flutter - url: "https://pub.dartlang.org" + sha256: "503857b415d390d29159df8a9d92d83c6aac17aaf1c307fb7bcfc77d097d20ed" + url: "https://pub.dev" source: hosted - version: "4.1.2" + version: "4.1.3" nested: dependency: transitive description: name: nested - url: "https://pub.dartlang.org" + sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20" + url: "https://pub.dev" source: hosted version: "1.0.0" numerus: dependency: transitive description: name: numerus - url: "https://pub.dartlang.org" + sha256: "0087ef729d63b96cb347a9c44b9c592f21cecb3605b415bbd18710aef80ce5cb" + url: "https://pub.dev" source: hosted version: "1.1.1" octo_image: dependency: transitive description: name: octo_image - url: "https://pub.dartlang.org" + sha256: "107f3ed1330006a3bea63615e81cf637433f5135a52466c7caa0e7152bca9143" + url: "https://pub.dev" source: hosted - version: "1.0.1" + version: "1.0.2" path: dependency: transitive description: name: path - url: "https://pub.dartlang.org" + sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b + url: "https://pub.dev" source: hosted version: "1.8.2" path_drawing: dependency: transitive description: name: path_drawing - url: "https://pub.dartlang.org" + sha256: "3bdd251dae9ffaef944450b73f168610db7e968e7b20daf0c3907f8b4aafc8a2" + url: "https://pub.dev" source: hosted version: "0.5.1+1" path_parsing: dependency: transitive description: name: path_parsing - url: "https://pub.dartlang.org" + sha256: ee5c47c1058ad66b4a41746ec3996af9593d0858872807bcd64ac118f0700337 + url: "https://pub.dev" source: hosted version: "0.2.1" path_provider: dependency: "direct main" description: name: path_provider - url: "https://pub.dartlang.org" + sha256: c7edf82217d4b2952b2129a61d3ad60f1075b9299e629e149a8d2e39c2e6aad4 + url: "https://pub.dev" source: hosted - version: "2.0.9" + version: "2.0.14" path_provider_android: dependency: transitive description: name: path_provider_android - url: "https://pub.dartlang.org" + sha256: "019f18c9c10ae370b08dce1f3e3b73bc9f58e7f087bb5e921f06529438ac0ae7" + url: "https://pub.dev" source: hosted - version: "2.0.12" - path_provider_ios: + version: "2.0.24" + path_provider_foundation: dependency: transitive description: - name: path_provider_ios - url: "https://pub.dartlang.org" + name: path_provider_foundation + sha256: "12eee51abdf4d34c590f043f45073adbb45514a108bd9db4491547a2fd891059" + url: "https://pub.dev" source: hosted - version: "2.0.8" + version: "2.2.0" path_provider_linux: dependency: transitive description: name: path_provider_linux - url: "https://pub.dartlang.org" + sha256: "2ae08f2216225427e64ad224a24354221c2c7907e448e6e0e8b57b1eb9f10ad1" + url: "https://pub.dev" source: hosted - version: "2.1.5" - path_provider_macos: - dependency: transitive - description: - name: path_provider_macos - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.5" + version: "2.1.10" path_provider_platform_interface: dependency: transitive description: name: path_provider_platform_interface - url: "https://pub.dartlang.org" + sha256: "57585299a729335f1298b43245842678cb9f43a6310351b18fb577d6e33165ec" + url: "https://pub.dev" source: hosted - version: "2.0.3" + version: "2.0.6" path_provider_windows: dependency: transitive description: name: path_provider_windows - url: "https://pub.dartlang.org" + sha256: a34ecd7fb548f8e57321fd8e50d865d266941b54e6c3b7758cf8f37c24116905 + url: "https://pub.dev" source: hosted - version: "2.0.5" + version: "2.0.7" pedantic: dependency: transitive description: name: pedantic - url: "https://pub.dartlang.org" + sha256: "67fc27ed9639506c856c840ccce7594d0bdcd91bc8d53d6e52359449a1d50602" + url: "https://pub.dev" source: hosted version: "1.11.1" petitparser: dependency: transitive description: name: petitparser - url: "https://pub.dartlang.org" + sha256: "49392a45ced973e8d94a85fdb21293fbb40ba805fc49f2965101ae748a3683b4" + url: "https://pub.dev" source: hosted - version: "4.4.0" + version: "5.1.0" pin_code_fields: dependency: "direct main" description: name: pin_code_fields - url: "https://pub.dartlang.org" + sha256: c8652519d14688f3fe2a8288d86910a46aa0b9046d728f292d3bf6067c31b4c7 + url: "https://pub.dev" source: hosted - version: "7.3.0" + version: "7.4.0" platform: dependency: transitive description: name: platform - url: "https://pub.dartlang.org" + sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76" + url: "https://pub.dev" source: hosted version: "3.1.0" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - url: "https://pub.dartlang.org" + sha256: "6a2128648c854906c53fa8e33986fc0247a1116122f9534dd20e3ab9e16a32bc" + url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.4" + pointycastle: + dependency: transitive + description: + name: pointycastle + sha256: c3120a968135aead39699267f4c74bc9a08e4e909e86bc1b0af5bfd78691123c + url: "https://pub.dev" + source: hosted + version: "3.7.2" process: dependency: transitive description: name: process - url: "https://pub.dartlang.org" + sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09" + url: "https://pub.dev" source: hosted version: "4.2.4" provider: dependency: transitive description: name: provider - url: "https://pub.dartlang.org" + sha256: cdbe7530b12ecd9eb455bdaa2fcb8d4dad22e80b8afb4798b41479d5ce26847f + url: "https://pub.dev" source: hosted - version: "6.0.3" + version: "6.0.5" quiver: dependency: transitive description: name: quiver - url: "https://pub.dartlang.org" + sha256: b1c1ac5ce6688d77f65f3375a9abb9319b3cb32486bdc7a1e0fdf004d7ba4e47 + url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "3.2.1" roundcheckbox: dependency: "direct main" description: name: roundcheckbox - url: "https://pub.dartlang.org" + sha256: "5d6f607ed9d26fde0072af2545f56d84a6b6d2a45972b0c41f90c2d73224f339" + url: "https://pub.dev" source: hosted - version: "2.0.4+1" + version: "2.0.5" rxdart: dependency: transitive description: name: rxdart - url: "https://pub.dartlang.org" + sha256: "0c7c0cedd93788d996e33041ffecda924cc54389199cde4e6a34b440f50044cb" + url: "https://pub.dev" source: hosted - version: "0.27.3" + version: "0.27.7" shared_preferences: dependency: "direct main" description: name: shared_preferences - url: "https://pub.dartlang.org" + sha256: "78528fd87d0d08ffd3e69551173c026e8eacc7b7079c82eb6a77413957b7e394" + url: "https://pub.dev" source: hosted - version: "2.0.13" + version: "2.0.20" shared_preferences_android: dependency: transitive description: name: shared_preferences_android - url: "https://pub.dartlang.org" + sha256: ad423a80fe7b4e48b50d6111b3ea1027af0e959e49d485712e134863d9c1c521 + url: "https://pub.dev" source: hosted - version: "2.0.11" - shared_preferences_ios: + version: "2.0.17" + shared_preferences_foundation: dependency: transitive description: - name: shared_preferences_ios - url: "https://pub.dartlang.org" + name: shared_preferences_foundation + sha256: "1e755f8583229f185cfca61b1d80fb2344c9d660e1c69ede5450d8f478fa5310" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.5" shared_preferences_linux: dependency: transitive description: name: shared_preferences_linux - url: "https://pub.dartlang.org" + sha256: "3a59ed10890a8409ad0faad7bb2957dab4b92b8fbe553257b05d30ed8af2c707" + url: "https://pub.dev" source: hosted - version: "2.1.0" - shared_preferences_macos: - dependency: transitive - description: - name: shared_preferences_macos - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.3" + version: "2.1.5" shared_preferences_platform_interface: dependency: transitive description: name: shared_preferences_platform_interface - url: "https://pub.dartlang.org" + sha256: "824bfd02713e37603b2bdade0842e47d56e7db32b1dcdd1cae533fb88e2913fc" + url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "2.1.1" shared_preferences_web: dependency: transitive description: name: shared_preferences_web - url: "https://pub.dartlang.org" + sha256: "0dc2633f215a3d4aa3184c9b2c5766f4711e4e5a6b256e62aafee41f89f1bfb8" + url: "https://pub.dev" source: hosted - version: "2.0.3" + version: "2.0.6" shared_preferences_windows: dependency: transitive description: name: shared_preferences_windows - url: "https://pub.dartlang.org" + sha256: "71bcd669bb9cdb6b39f22c4a7728b6d49e934f6cba73157ffa5a54f1eed67436" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.5" shimmer: dependency: "direct main" description: name: shimmer - url: "https://pub.dartlang.org" + sha256: "1f1009b5845a1f88f1c5630212279540486f97409e9fc3f63883e71070d107bf" + url: "https://pub.dev" source: hosted version: "2.0.0" sky_engine: @@ -634,289 +801,338 @@ packages: dependency: "direct main" description: name: smooth_page_indicator - url: "https://pub.dartlang.org" + sha256: "8c301bc686892306cd41672c1880167f140c16be305d5ede8201fefd9fcda829" + url: "https://pub.dev" source: hosted - version: "1.0.0+2" + version: "1.0.1" snapping_sheet: dependency: "direct main" description: name: snapping_sheet - url: "https://pub.dartlang.org" + sha256: "17c6367bca51858a903ea2dc66db1d82a61d417e1faf78b0374aae181abb0d79" + url: "https://pub.dev" source: hosted version: "3.1.0" source_span: dependency: transitive description: name: source_span - url: "https://pub.dartlang.org" + sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 + url: "https://pub.dev" source: hosted - version: "1.9.0" + version: "1.9.1" sqflite: dependency: transitive description: name: sqflite - url: "https://pub.dartlang.org" + sha256: "500d6fec583d2c021f2d25a056d96654f910662c64f836cd2063167b8f1fa758" + url: "https://pub.dev" source: hosted - version: "2.0.2" + version: "2.2.6" sqflite_common: dependency: transitive description: name: sqflite_common - url: "https://pub.dartlang.org" + sha256: "963dad8c4aa2f814ce7d2d5b1da2f36f31bd1a439d8f27e3dc189bb9d26bc684" + url: "https://pub.dev" source: hosted - version: "2.2.1" + version: "2.4.3" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.dartlang.org" + sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 + url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.11.0" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.dartlang.org" + sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.dartlang.org" + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.2.0" synchronized: dependency: transitive description: name: synchronized - url: "https://pub.dartlang.org" + sha256: "33b31b6beb98100bf9add464a36a8dd03eb10c7a8cf15aeec535e9b054aaf04b" + url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "3.0.1" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.dartlang.org" + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" source: hosted version: "1.2.1" test_api: dependency: transitive description: name: test_api - url: "https://pub.dartlang.org" + sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206 + url: "https://pub.dev" source: hosted - version: "0.4.12" + version: "0.4.16" + timezone: + dependency: transitive + description: + name: timezone + sha256: "24c8fcdd49a805d95777a39064862133ff816ebfffe0ceff110fb5960e557964" + url: "https://pub.dev" + source: hosted + version: "0.9.1" tuple: dependency: transitive description: name: tuple - url: "https://pub.dartlang.org" + sha256: "0ea99cd2f9352b2586583ab2ce6489d1f95a5f6de6fb9492faaf97ae2060f0aa" + url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "2.0.1" typed_data: dependency: transitive description: name: typed_data - url: "https://pub.dartlang.org" + sha256: "26f87ade979c47a150c9eaab93ccd2bebe70a27dc0b4b29517f2904f04eb11a5" + url: "https://pub.dev" source: hosted - version: "1.3.0" + version: "1.3.1" url_launcher: dependency: "direct main" description: name: url_launcher - url: "https://pub.dartlang.org" + sha256: "75f2846facd11168d007529d6cd8fcb2b750186bea046af9711f10b907e1587e" + url: "https://pub.dev" source: hosted - version: "6.1.5" + version: "6.1.10" url_launcher_android: dependency: transitive description: name: url_launcher_android - url: "https://pub.dartlang.org" + sha256: dd729390aa936bf1bdf5cd1bc7468ff340263f80a2c4f569416507667de8e3c8 + url: "https://pub.dev" source: hosted - version: "6.0.17" + version: "6.0.26" url_launcher_ios: dependency: transitive description: name: url_launcher_ios - url: "https://pub.dartlang.org" + sha256: "3dedc66ca3c0bef9e6a93c0999aee102556a450afcc1b7bcfeace7a424927d92" + url: "https://pub.dev" source: hosted - version: "6.0.17" + version: "6.1.3" url_launcher_linux: dependency: transitive description: name: url_launcher_linux - url: "https://pub.dartlang.org" + sha256: "206fb8334a700ef7754d6a9ed119e7349bc830448098f21a69bf1b4ed038cabc" + url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.0.4" url_launcher_macos: dependency: transitive description: name: url_launcher_macos - url: "https://pub.dartlang.org" + sha256: "0ef2b4f97942a16523e51256b799e9aa1843da6c60c55eefbfa9dbc2dcb8331a" + url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.0.4" url_launcher_platform_interface: dependency: transitive description: name: url_launcher_platform_interface - url: "https://pub.dartlang.org" + sha256: "6c9ca697a5ae218ce56cece69d46128169a58aa8653c1b01d26fcd4aad8c4370" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.2" url_launcher_web: dependency: transitive description: name: url_launcher_web - url: "https://pub.dartlang.org" + sha256: "81fe91b6c4f84f222d186a9d23c73157dc4c8e1c71489c4d08be1ad3b228f1aa" + url: "https://pub.dev" source: hosted - version: "2.0.12" + version: "2.0.16" url_launcher_windows: dependency: transitive description: name: url_launcher_windows - url: "https://pub.dartlang.org" + sha256: a83ba3607a507758669cfafb03f9de09bf6e6280c14d9b9cb18f013e406dcacd + url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.0.5" uuid: dependency: transitive description: name: uuid - url: "https://pub.dartlang.org" + sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313" + url: "https://pub.dev" source: hosted - version: "3.0.6" + version: "3.0.7" vector_math: dependency: transitive description: name: vector_math - url: "https://pub.dartlang.org" + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.4" video_player: dependency: transitive description: name: video_player - url: "https://pub.dartlang.org" + sha256: "868a139229acb5018d22aded3eb9cb4767ff43a8216573c086b6c535a4957481" + url: "https://pub.dev" source: hosted - version: "2.4.7" + version: "2.6.0" video_player_android: dependency: transitive description: name: video_player_android - url: "https://pub.dartlang.org" + sha256: dc31c60ae591aa3ccb2d460c3690ceceb86cbb826e73428d817a37650dc4e229 + url: "https://pub.dev" source: hosted - version: "2.3.9" + version: "2.4.2" video_player_avfoundation: dependency: transitive description: name: video_player_avfoundation - url: "https://pub.dartlang.org" + sha256: "90468226c8687adf7b567d9bb42c25588783c4d30509af1fbd663b2dd049f700" + url: "https://pub.dev" source: hosted - version: "2.3.5" + version: "2.4.2" video_player_platform_interface: dependency: transitive description: name: video_player_platform_interface - url: "https://pub.dartlang.org" + sha256: a8c4dcae2a7a6e7cc1d7f9808294d968eca1993af34a98e95b9bdfa959bec684 + url: "https://pub.dev" source: hosted - version: "5.1.4" + version: "6.1.0" video_player_web: dependency: transitive description: name: video_player_web - url: "https://pub.dartlang.org" + sha256: fb3bbeaf0302cb0c31340ebd6075487939aa1fe3b379d1a8784ef852b679940e + url: "https://pub.dev" source: hosted - version: "2.0.12" + version: "2.0.15" wakelock: dependency: transitive description: name: wakelock - url: "https://pub.dartlang.org" + sha256: "769ecf42eb2d07128407b50cb93d7c10bd2ee48f0276ef0119db1d25cc2f87db" + url: "https://pub.dev" source: hosted version: "0.6.2" wakelock_macos: dependency: transitive description: name: wakelock_macos - url: "https://pub.dartlang.org" + sha256: "047c6be2f88cb6b76d02553bca5a3a3b95323b15d30867eca53a19a0a319d4cd" + url: "https://pub.dev" source: hosted version: "0.4.0" wakelock_platform_interface: dependency: transitive description: name: wakelock_platform_interface - url: "https://pub.dartlang.org" + sha256: "1f4aeb81fb592b863da83d2d0f7b8196067451e4df91046c26b54a403f9de621" + url: "https://pub.dev" source: hosted version: "0.3.0" wakelock_web: dependency: transitive description: name: wakelock_web - url: "https://pub.dartlang.org" + sha256: "1b256b811ee3f0834888efddfe03da8d18d0819317f20f6193e2922b41a501b5" + url: "https://pub.dev" source: hosted version: "0.4.0" wakelock_windows: dependency: transitive description: name: wakelock_windows - url: "https://pub.dartlang.org" + sha256: "108b1b73711f1664ee462e73af34a9286ff496e27d4d8371e2fb4da8fde4cdac" + url: "https://pub.dev" source: hosted version: "0.2.0" webview_flutter: dependency: "direct main" description: name: webview_flutter - url: "https://pub.dartlang.org" + sha256: "6886b3ceef1541109df5001054aade5ee3c36b5780302e41701c78357233721c" + url: "https://pub.dev" source: hosted version: "2.8.0" webview_flutter_android: dependency: transitive description: name: webview_flutter_android - url: "https://pub.dartlang.org" + sha256: "8b3b2450e98876c70bfcead876d9390573b34b9418c19e28168b74f6cb252dbd" + url: "https://pub.dev" source: hosted - version: "2.8.3" + version: "2.10.4" webview_flutter_platform_interface: dependency: transitive description: name: webview_flutter_platform_interface - url: "https://pub.dartlang.org" + sha256: "812165e4e34ca677bdfbfa58c01e33b27fd03ab5fa75b70832d4b7d4ca1fa8cf" + url: "https://pub.dev" source: hosted - version: "1.8.1" + version: "1.9.5" webview_flutter_wkwebview: dependency: transitive description: name: webview_flutter_wkwebview - url: "https://pub.dartlang.org" + sha256: a5364369c758892aa487cbf59ea41d9edd10f9d9baf06a94e80f1bd1b4c7bbc0 + url: "https://pub.dev" source: hosted - version: "2.7.1" + version: "2.9.5" win32: dependency: transitive description: name: win32 - url: "https://pub.dartlang.org" + sha256: c0e3a4f7be7dae51d8f152230b86627e3397c1ba8c3fa58e63d44a9f3edc9cef + url: "https://pub.dev" source: hosted - version: "2.4.4" + version: "2.6.1" xdg_directories: dependency: transitive description: name: xdg_directories - url: "https://pub.dartlang.org" + sha256: bd512f03919aac5f1313eb8249f223bacf4927031bf60b02601f81f687689e86 + url: "https://pub.dev" source: hosted - version: "0.2.0+1" + version: "0.2.0+3" xml: dependency: transitive description: name: xml - url: "https://pub.dartlang.org" + sha256: "80d494c09849dc3f899d227a78c30c5b949b985ededf884cb3f3bcd39f4b447a" + url: "https://pub.dev" source: hosted - version: "5.3.1" + version: "5.4.1" yaml: dependency: transitive description: name: yaml - url: "https://pub.dartlang.org" + sha256: "23812a9b125b48d4007117254bca50abb6c712352927eece9e155207b1db2370" + url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "3.1.1" sdks: - dart: ">=2.17.0 <3.0.0" - flutter: ">=3.0.0" + dart: ">=2.18.0 <3.0.0" + flutter: ">=3.3.0" diff --git a/pubspec.yaml b/pubspec.yaml index 287583e..ea5ca07 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -40,6 +40,9 @@ dependencies: flutter_staggered_grid_view: ^0.6.1 url_launcher: ^6.1.5 webview_flutter: ^2.8.0 + firebase_messaging: ^14.1.1 + firebase_core: ^2.3.0 + flutter_local_notifications: ^12.0.4 dev_dependencies: flutter_test: