From 3380f4d1e82733f4ea928bd51499f1457b52c5ac Mon Sep 17 00:00:00 2001 From: Moktadir Date: Wed, 9 Aug 2023 04:41:04 +0600 Subject: [PATCH] hive,Flutter local notification, connectivity --- android/app/build.gradle | 6 + android/app/src/main/AndroidManifest.xml | 3 + .../plugins/GeneratedPluginRegistrant.java | 15 +- animations/image_loader.json | 1 + assets/images/no_image.png | Bin 0 -> 10865 bytes ios/Podfile.lock | 54 +- ios/Runner/AppDelegate.swift | 3 + lib/app/data/local/my_hive.dart | 48 ++ .../controllers/home_controller.dart | 54 +- .../home-with-restAPI/model/posts.dart | 44 +- .../home-with-restAPI/model/posts.g.dart | 50 ++ .../home-with-restAPI/views/home_view.dart | 85 +-- .../views/post_detail_view.dart | 5 +- lib/app/routes/app_pages.dart | 11 +- lib/app/routes/app_routes.dart | 4 + lib/app/service/network_connectivity.dart | 13 + lib/main.dart | 13 +- .../awesome_notifications_helper.dart | 184 ------ lib/utils/fcm_notification/fcm_helper.dart | 17 +- .../local_notification_helper.dart | 208 +++++++ linux/flutter/generated_plugin_registrant.cc | 4 - linux/flutter/generated_plugins.cmake | 1 - macos/Flutter/GeneratedPluginRegistrant.swift | 8 +- pubspec.lock | 586 +++++++++++++----- pubspec.yaml | 18 +- .../flutter/generated_plugin_registrant.cc | 5 +- windows/flutter/generated_plugins.cmake | 3 +- 27 files changed, 942 insertions(+), 501 deletions(-) create mode 100644 animations/image_loader.json create mode 100644 assets/images/no_image.png create mode 100644 lib/app/data/local/my_hive.dart create mode 100644 lib/app/modules/home-with-restAPI/model/posts.g.dart create mode 100644 lib/app/service/network_connectivity.dart delete mode 100755 lib/utils/fcm_notification/awesome_notifications_helper.dart create mode 100644 lib/utils/fcm_notification/local_notification_helper.dart diff --git a/android/app/build.gradle b/android/app/build.gradle index 2f663f0..14f1c94 100755 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -31,6 +31,7 @@ android { ndkVersion flutter.ndkVersion compileOptions { + coreLibraryDesugaringEnabled true sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } @@ -52,6 +53,7 @@ android { targetSdkVersion flutter.targetSdkVersion versionCode flutterVersionCode.toInteger() versionName flutterVersionName + multiDexEnabled true } buildTypes { @@ -69,4 +71,8 @@ flutter { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + implementation 'com.google.android.material:material:1.9.0' + coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5' + implementation 'androidx.window:window:1.0.0' + implementation 'androidx.window:window-java:1.0.0' } diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 40c44ca..4de1a3c 100755 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -26,6 +26,9 @@ + CV z$q4|E@GBB4^;4h!#3RTFPi)875IC7z#;o!04~b1{}DwE;oqT9D#X+- z#M<98B+MeKa4-VO71oj689M=n^~SouW3UWZo&PlPO!R-T_0#jg<_5UME%>t5L`bOD9{=2}|;Kfxz9^7s&blar;?MfODZOvI+JqYcp zq1Y}UHsqQY)EY^UAB8m#=(X^0zabz1yAc9I{C{+)6#}ULZd*avrS0dmi^%z@goMPl z*wc+H116>Z`!Ya6bhtBmuPlA<79|m<^+BG*5~(O%Jp40SFip zT3bf_YW{pBR@xw~(^|Dd@LM)J(8(cfAY=)pfO#mi zp7KF!|C;Smd&Y3iXFN8GZl_|$R{Bd2#~HjX&6BOvcaQDHsvk(|T|8tL)}eh=0?cYO zHTjLO4Jtc341z1|M(ss1~p#YAEfY~3^7lJG; zj2Js0tGl3biqfIZ&`#=UK(2$5)M#)lZ}+=l%7NN#;u>r=&TeN;kOF-;f27Cho48f)iyzVkP$Jt(fZ<`U`Jd&O;Cv|i%{kNq4d95|#1 z+Fd?&1o#()KilQCW(7rb($-lj8C2pJ8a|6=_d+4_7jbt>hg|(D!k>-qEqln$rszKK zHl<><?|4)KMyUw$1#|z+gs)Yb6v&IX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5vfj!m;~cY|yTeTF2q0{5ZECc{%i0u96i94FFRmUTs$SYd z&eJXQ>e#Plf}7#LO5zV%_Ni}-BS1SfarsxWOavrMx@>T!JFNzW8TBWf)j z%!wfJXZYY19e}z_M zsAJw)pYPC6+k=b76S=hT#C5Ti@13%i!XJ02sHx-5#1Z{6mog>z#~=6KS@Ihn{+ws+ zYzG>7E`@nK@aUH57F#$!e!11qBSJM|KSER!#oVO1sjQziG?KNF?m1*zK9MT10sY)~ z*nfA?IcCiKKu<#C3OVyp+w_UylN(LCu<^eUh}@DOS5e1(oR-A3IHb&F8>bMyGsWjXark~>t%H` z6TIikt0^A2LkxIvyl#1C7Cy38VkEbXv}%?~^=Kc6CLT{|RT?|Dsd5GhOLQojo|2WK zj=|^ka{{0M{?``}VG|m*A_2Szg6}8+_*D77sKfmme5%Oqg#!U_WrTgU(pU(Vqm;C? T-hC4M2@acDm=qsyz5IUw32(;0 literal 0 HcmV?d00001 diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 60c8e26..a568ead 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -628,9 +628,6 @@ PODS: - abseil/base/base_internal - abseil/base/config - abseil/meta/type_traits - - awesome_notifications (0.7.5-dev.3): - - Flutter - - IosAwnCore (= 0.7.5-dev.3) - BoringSSL-GRPC (0.0.24): - BoringSSL-GRPC/Implementation (= 0.0.24) - BoringSSL-GRPC/Interface (= 0.0.24) @@ -703,7 +700,7 @@ PODS: - Firebase/Messaging (= 10.10.0) - firebase_core - Flutter - - FirebaseAppCheckInterop (10.12.0) + - FirebaseAppCheckInterop (10.13.0) - FirebaseAuth (10.10.0): - FirebaseAppCheckInterop (~> 10.0) - FirebaseCore (~> 10.0) @@ -714,7 +711,7 @@ PODS: - FirebaseCoreInternal (~> 10.0) - GoogleUtilities/Environment (~> 7.8) - GoogleUtilities/Logger (~> 7.8) - - FirebaseCoreInternal (10.12.0): + - FirebaseCoreInternal (10.13.0): - "GoogleUtilities/NSData+zlib (~> 7.8)" - FirebaseFirestore (10.10.0): - abseil/algorithm (~> 1.20220623.0) @@ -729,7 +726,7 @@ PODS: - "gRPC-C++ (~> 1.50.1)" - leveldb-library (~> 1.22) - nanopb (< 2.30910.0, >= 2.30908.0) - - FirebaseInstallations (10.12.0): + - FirebaseInstallations (10.13.0): - FirebaseCore (~> 10.0) - GoogleUtilities/Environment (~> 7.8) - GoogleUtilities/UserDefaults (~> 7.8) @@ -744,31 +741,35 @@ PODS: - GoogleUtilities/UserDefaults (~> 7.8) - nanopb (< 2.30910.0, >= 2.30908.0) - Flutter (1.0.0) + - flutter_local_notifications (0.0.1): + - Flutter - flutter_native_splash (0.0.1): - Flutter + - flutter_timezone (0.0.1): + - Flutter - FMDB (2.7.5): - FMDB/standard (= 2.7.5) - FMDB/standard (2.7.5) - - GoogleDataTransport (9.2.3): + - GoogleDataTransport (9.2.5): - GoogleUtilities/Environment (~> 7.7) - nanopb (< 2.30910.0, >= 2.30908.0) - PromisesObjC (< 3.0, >= 1.2) - - GoogleUtilities/AppDelegateSwizzler (7.11.4): + - GoogleUtilities/AppDelegateSwizzler (7.11.5): - GoogleUtilities/Environment - GoogleUtilities/Logger - GoogleUtilities/Network - - GoogleUtilities/Environment (7.11.4): + - GoogleUtilities/Environment (7.11.5): - PromisesObjC (< 3.0, >= 1.2) - - GoogleUtilities/Logger (7.11.4): + - GoogleUtilities/Logger (7.11.5): - GoogleUtilities/Environment - - GoogleUtilities/Network (7.11.4): + - GoogleUtilities/Network (7.11.5): - GoogleUtilities/Logger - "GoogleUtilities/NSData+zlib" - GoogleUtilities/Reachability - - "GoogleUtilities/NSData+zlib (7.11.4)" - - GoogleUtilities/Reachability (7.11.4): + - "GoogleUtilities/NSData+zlib (7.11.5)" + - GoogleUtilities/Reachability (7.11.5): - GoogleUtilities/Logger - - GoogleUtilities/UserDefaults (7.11.4): + - GoogleUtilities/UserDefaults (7.11.5): - GoogleUtilities/Logger - "gRPC-C++ (1.50.1)": - "gRPC-C++/Implementation (= 1.50.1)" @@ -832,7 +833,6 @@ PODS: - gRPC-Core/Interface (= 1.50.1) - gRPC-Core/Interface (1.50.1) - GTMSessionFetcher/Core (3.1.1) - - IosAwnCore (0.7.5-dev.3) - leveldb-library (1.22.2) - nanopb (2.30909.0): - nanopb/decode (= 2.30909.0) @@ -856,7 +856,6 @@ PODS: - SwiftyGif (5.4.4) DEPENDENCIES: - - awesome_notifications (from `.symlinks/plugins/awesome_notifications/ios`) - cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`) - connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`) - device_info_plus (from `.symlinks/plugins/device_info_plus/ios`) @@ -865,7 +864,9 @@ DEPENDENCIES: - firebase_core (from `.symlinks/plugins/firebase_core/ios`) - firebase_messaging (from `.symlinks/plugins/firebase_messaging/ios`) - Flutter (from `Flutter`) + - flutter_local_notifications (from `.symlinks/plugins/flutter_local_notifications/ios`) - flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`) + - flutter_timezone (from `.symlinks/plugins/flutter_timezone/ios`) - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) - shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`) - sqflite (from `.symlinks/plugins/sqflite/ios`) @@ -890,7 +891,6 @@ SPEC REPOS: - "gRPC-C++" - gRPC-Core - GTMSessionFetcher - - IosAwnCore - leveldb-library - nanopb - PromisesObjC @@ -899,8 +899,6 @@ SPEC REPOS: - SwiftyGif EXTERNAL SOURCES: - awesome_notifications: - :path: ".symlinks/plugins/awesome_notifications/ios" cloud_firestore: :path: ".symlinks/plugins/cloud_firestore/ios" connectivity_plus: @@ -917,8 +915,12 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/firebase_messaging/ios" Flutter: :path: Flutter + flutter_local_notifications: + :path: ".symlinks/plugins/flutter_local_notifications/ios" flutter_native_splash: :path: ".symlinks/plugins/flutter_native_splash/ios" + flutter_timezone: + :path: ".symlinks/plugins/flutter_timezone/ios" path_provider_foundation: :path: ".symlinks/plugins/path_provider_foundation/darwin" shared_preferences_foundation: @@ -928,7 +930,6 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: abseil: 926fb7a82dc6d2b8e1f2ed7f3a718bce691d1e46 - awesome_notifications: 1b6393d6ce02878dc50d0ae87baf7bdbc9d802a2 BoringSSL-GRPC: 3175b25143e648463a56daeaaa499c6cb86dad33 cloud_firestore: 818ebb1a8235177a0dcf7005c14aed5408b8342c connectivity_plus: 413a8857dd5d9f1c399a39130850d02fe0feaf7e @@ -940,22 +941,23 @@ SPEC CHECKSUMS: firebase_auth: 9905bc3d82328b5050a8b7cb410a959f150b6549 firebase_core: 85b6664038311940ad60584eaabc73103c61f5de firebase_messaging: c55f70dd48a998dea00a29ccf94572e1e4d454b2 - FirebaseAppCheckInterop: f95a4feb9089867aff1a4bdc2ce309137e07736a + FirebaseAppCheckInterop: 5e12dc623d443dedffcde9c6f3ed41510125d8ef FirebaseAuth: 5ddbe23ebc4e647469261f5c59cd12a04f37c8e6 FirebaseCore: d027ff503d37edb78db98429b11f580a24a7df2a - FirebaseCoreInternal: 950500ad8a08963657f6d8c67b579740c06d6aa1 + FirebaseCoreInternal: b342e37cd4f5b4454ec34308f073420e7920858e FirebaseFirestore: b3bb12a497c9d13e80ec3158dbb75ded03592e8d - FirebaseInstallations: 7b99ef103f013624444c614397038219c45f8e63 + FirebaseInstallations: b28af1b9f997f1a799efe818c94695a3728c352f FirebaseMessaging: 8a3b9a8b98ce72a42d22e69865cf662e38d2d6f5 Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 + flutter_local_notifications: 0c0b1ae97e741e1521e4c1629a459d04b9aec743 flutter_native_splash: 52501b97d1c0a5f898d687f1646226c1f93c56ef + flutter_timezone: ffb07bdad3c6276af8dada0f11978d8a1f8a20bb FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a - GoogleDataTransport: f0308f5905a745f94fb91fea9c6cbaf3831cb1bd - GoogleUtilities: c63691989bf362ba0505507da00eeb326192e83e + GoogleDataTransport: 54dee9d48d14580407f8f5fbf2f496e92437a2f2 + GoogleUtilities: 13e2c67ede716b8741c7989e26893d151b2b2084 "gRPC-C++": 0968bace703459fd3e5dcb0b2bed4c573dbff046 gRPC-Core: 17108291d84332196d3c8466b48f016fc17d816d GTMSessionFetcher: e8647203b65cee28c5f73d0f473d096653945e72 - IosAwnCore: edf31913fd18960ebcde7c05912dc860ca2b63b2 leveldb-library: f03246171cce0484482ec291f88b6d563699ee06 nanopb: b552cce312b6c8484180ef47159bc0f65a1f0431 path_provider_foundation: eaf5b3e458fc0e5fbb9940fb09980e853fe058b8 diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift index 70693e4..2d48c6f 100755 --- a/ios/Runner/AppDelegate.swift +++ b/ios/Runner/AppDelegate.swift @@ -8,6 +8,9 @@ import Flutter didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? ) -> Bool { 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/app/data/local/my_hive.dart b/lib/app/data/local/my_hive.dart new file mode 100644 index 0000000..2c1ff30 --- /dev/null +++ b/lib/app/data/local/my_hive.dart @@ -0,0 +1,48 @@ +import 'package:getx_standard/app/modules/home-with-restAPI/model/posts.dart'; +import 'package:hive_flutter/hive_flutter.dart'; + +class MyHive { + // Prevent making an instance of this class + MyHive._(); + + // Hive box to store movie data + static late Box _postBox; + + // Box name, it's like the table name + static const String _postBoxName = 'posts'; + + /// Initialize local db (HIVE) + /// Pass testPath only if you are testing hive + static Future init( + {Function(HiveInterface)? registerAdapters, String? testPath}) async { + if (testPath != null) { + Hive.init(testPath); + } else { + await Hive.initFlutter(); + } + await registerAdapters?.call(Hive); + await initPostsBox(); + } + + /// Initialize post box + static Future initPostsBox() async { + _postBox = await Hive.openBox(_postBoxName); + } + + /// Save all posts to the database + static Future saveAllPosts(List posts) async { + try { + await _postBox.clear(); // Clear existing data + await _postBox.addAll(posts); // Add all posts to Hive + } catch (error) { + // Handle error + } + } + + /// Get all posts from Hive + static List getAllPosts() { + final posts = _postBox.values.toList(); + return posts + .cast(); // Cast the list to the correct type (List) + } +} diff --git a/lib/app/modules/home-with-restAPI/controllers/home_controller.dart b/lib/app/modules/home-with-restAPI/controllers/home_controller.dart index 6dad02f..f4f16ad 100755 --- a/lib/app/modules/home-with-restAPI/controllers/home_controller.dart +++ b/lib/app/modules/home-with-restAPI/controllers/home_controller.dart @@ -1,49 +1,53 @@ import 'package:get/get.dart'; +import 'package:getx_standard/app/components/custom_snackbar.dart'; +import 'package:getx_standard/app/service/network_connectivity.dart'; import '../../../components/navbar/navbar_controller.dart'; +import '../../../data/local/my_hive.dart'; import '../../../service/REST/api_urls.dart'; import '../../../service/REST/dio_client.dart'; import '../../../service/handler/exception_handler.dart'; -import '../bindings/home_binding.dart'; import '../model/posts.dart'; -import '../views/post_detail_view.dart'; class HomeController extends GetxController with ExceptionHandler { final navController = Get.put(NavbarController()); - ///GET POST LIST + RxString title = "".obs; + RxString body = "".obs; + + /// GET POST LIST final postList = RxList(); getPostList() async { showLoading(); - var response = - await DioClient().get(url: ApiUrl.allPosts).catchError(handleError); - - if (response == null) return; + if (await NetworkConnectivity.isNetworkAvailable()) { + // Fetch posts from the API + var response = + await DioClient().get(url: ApiUrl.allPosts).catchError(handleError); - postList - .assignAll((response as List).map((e) => Posts.fromJson(e)).toList()); + if (response == null) return; - hideLoading(); - } + postList + .assignAll((response as List).map((e) => Posts.fromJson(e)).toList()); - /// GET POST DETAIL - String title = ""; - String body = ""; + // Save fetched posts to Hive for future use + await MyHive.saveAllPosts(postList); - getPostDetail(int? id) async { - showLoading(); - var response = await DioClient() - .get(url: "${ApiUrl.postDetail}$id") - .catchError(handleError); + hideLoading(); + } else { + // If offline, try to load from Hive + CustomSnackBar.showCustomToast(message: "No network!"); + var posts = MyHive.getAllPosts(); - if (response == null) return; + if (posts.isNotEmpty) { + // Use posts from Hive if available + postList.assignAll(posts); - title = response["title"].toString(); - body = response["body"].toString(); - hideLoading(); - Get.to(() => const PostDetailView(), binding: HomeBinding()); + hideLoading(); + return; + } + } } @override @@ -53,4 +57,4 @@ class HomeController extends GetxController with ExceptionHandler { super.onReady(); } -} \ No newline at end of file +} diff --git a/lib/app/modules/home-with-restAPI/model/posts.dart b/lib/app/modules/home-with-restAPI/model/posts.dart index d97ee4e..d09f45b 100755 --- a/lib/app/modules/home-with-restAPI/model/posts.dart +++ b/lib/app/modules/home-with-restAPI/model/posts.dart @@ -1,4 +1,21 @@ -class Posts { +import 'package:hive/hive.dart'; + +part 'posts.g.dart'; // This is the generated Hive type adapter file + +@HiveType(typeId: 0) // Replace 0 with a unique integer identifier for this type +class Posts extends HiveObject { + @HiveField(0) + int? userId; + + @HiveField(1) + int? id; + + @HiveField(2) + String? title; + + @HiveField(3) + String? body; + Posts({ this.userId, this.id, @@ -6,23 +23,12 @@ class Posts { this.body, }); - Posts.fromJson(dynamic json) { - userId = json['userId']; - id = json['id']; - title = json['title']; - body = json['body']; - } - int? userId; - int? id; - String? title; - String? body; - - Map toJson() { - final map = {}; - map['userId'] = userId; - map['id'] = id; - map['title'] = title; - map['body'] = body; - return map; + factory Posts.fromJson(Map json) { + return Posts( + userId: json['userId'], + id: json['id'], + title: json['title'], + body: json['body'], + ); } } diff --git a/lib/app/modules/home-with-restAPI/model/posts.g.dart b/lib/app/modules/home-with-restAPI/model/posts.g.dart new file mode 100644 index 0000000..9fd6a5f --- /dev/null +++ b/lib/app/modules/home-with-restAPI/model/posts.g.dart @@ -0,0 +1,50 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'posts.dart'; + +// ************************************************************************** +// TypeAdapterGenerator +// ************************************************************************** + +class PostsAdapter extends TypeAdapter { + @override + final int typeId = 0; + + @override + Posts read(BinaryReader reader) { + final numOfFields = reader.readByte(); + final fields = { + for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(), + }; + return Posts( + userId: fields[0] as int?, + id: fields[1] as int?, + title: fields[2] as String?, + body: fields[3] as String?, + ); + } + + @override + void write(BinaryWriter writer, Posts obj) { + writer + ..writeByte(4) + ..writeByte(0) + ..write(obj.userId) + ..writeByte(1) + ..write(obj.id) + ..writeByte(2) + ..write(obj.title) + ..writeByte(3) + ..write(obj.body); + } + + @override + int get hashCode => typeId.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is PostsAdapter && + runtimeType == other.runtimeType && + typeId == other.typeId; +} diff --git a/lib/app/modules/home-with-restAPI/views/home_view.dart b/lib/app/modules/home-with-restAPI/views/home_view.dart index 3ce0f09..1274401 100755 --- a/lib/app/modules/home-with-restAPI/views/home_view.dart +++ b/lib/app/modules/home-with-restAPI/views/home_view.dart @@ -5,6 +5,7 @@ import 'package:iconly/iconly.dart'; import '../../../../config/theme/my_fonts.dart'; import '../../../components/empty_widget.dart'; +import '../../../routes/app_pages.dart'; import '../controllers/home_controller.dart'; class HomeView extends GetView { @@ -27,54 +28,54 @@ class HomeView extends GetView { ], centerTitle: true, ), - body: Obx(() => - controller.isError.value == true + body: Obx(() => controller.isError.value == true ? EmptyWidget(onPressed: () async => await controller.getPostList()) : RefreshIndicator( - color: theme.primaryColor, - onRefresh: () async => await controller.getPostList(), - child: Padding( - padding: const EdgeInsets.all(18.0), - child: RawScrollbar( - thumbColor: theme.primaryColor, - radius: const Radius.circular(100), - thickness: 5, - interactive: true, - child: ListView.separated( - itemCount: controller.postList.length, - physics: const BouncingScrollPhysics(), - padding: EdgeInsets.zero, - separatorBuilder: (_, __) => - SizedBox( - height: 20.h, - ), - itemBuilder: (ctx, index) => - GestureDetector( - onTap: () async { - await controller - .getPostDetail(controller.postList[index].id); - }, - child: Container( - padding: const EdgeInsets.all(5), - width: double.infinity, - color: theme.canvasColor, - child: Center( - child: Text( - controller.postList[index].title ?? "", - textAlign: TextAlign.center, - style: TextStyle( - fontSize: MyFonts.headline6TextSize, - fontWeight: FontWeight.w500, - color: theme.primaryColor, + color: theme.primaryColor, + onRefresh: () async => await controller.getPostList(), + child: Padding( + padding: const EdgeInsets.all(18.0), + child: RawScrollbar( + thumbColor: theme.primaryColor, + radius: const Radius.circular(100), + thickness: 5, + interactive: true, + child: ListView.separated( + itemCount: controller.postList.length, + physics: const BouncingScrollPhysics(), + padding: EdgeInsets.zero, + separatorBuilder: (_, __) => SizedBox( + height: 20.h, + ), + itemBuilder: (ctx, index) => GestureDetector( + onTap: () { + controller.title.value = + controller.postList[index].title ?? ""; + controller.body.value = + controller.postList[index].body ?? ""; + Get.toNamed(Routes.POST_DETAIL); + }, + child: Container( + padding: const EdgeInsets.all(5), + width: double.infinity, + color: theme.canvasColor, + child: Center( + child: Text( + controller.postList[index].title ?? "", + textAlign: TextAlign.center, + style: TextStyle( + fontSize: MyFonts.headline6TextSize, + fontWeight: FontWeight.w500, + color: theme.primaryColor, + ), ), ), ), ), ), - ), - ), - ), - )), + ), + ), + )), ); } -} \ No newline at end of file +} diff --git a/lib/app/modules/home-with-restAPI/views/post_detail_view.dart b/lib/app/modules/home-with-restAPI/views/post_detail_view.dart index 171e2f9..70f571d 100755 --- a/lib/app/modules/home-with-restAPI/views/post_detail_view.dart +++ b/lib/app/modules/home-with-restAPI/views/post_detail_view.dart @@ -6,6 +6,7 @@ import '../controllers/home_controller.dart'; class PostDetailView extends GetView { const PostDetailView({Key? key}) : super(key: key); + @override Widget build(BuildContext context) { var theme = Theme.of(context); @@ -21,12 +22,12 @@ class PostDetailView extends GetView { mainAxisAlignment: MainAxisAlignment.start, children: [ Text( - controller.title, + controller.title.value, style: theme.textTheme.headlineSmall, ), SizedBox(height: 40.h), Text( - controller.body, + controller.body.value, style: theme.textTheme.bodyLarge, ), ], diff --git a/lib/app/routes/app_pages.dart b/lib/app/routes/app_pages.dart index 51a37f5..756d8e1 100755 --- a/lib/app/routes/app_pages.dart +++ b/lib/app/routes/app_pages.dart @@ -1,4 +1,5 @@ import 'package:get/get.dart'; +import 'package:getx_standard/app/modules/home-with-restAPI/views/post_detail_view.dart'; import '../components/navbar/bottom_navbar.dart'; import '../components/navbar/navbar_binding.dart'; @@ -16,6 +17,7 @@ class AppPages { static const NAV = Routes.NAV; static const HOME = Routes.HOME; + static const POST_DETAIL = Routes.POST_DETAIL; static final routes = [ /// NAV BAR @@ -28,7 +30,12 @@ class AppPages { /// GetPage( name: _Paths.HOME, - page: () => HomeView(), + page: () => const HomeView(), + binding: HomeBinding(), + ), + GetPage( + name: _Paths.POST_DETAIL, + page: () => const PostDetailView(), binding: HomeBinding(), ), GetPage( @@ -37,4 +44,4 @@ class AppPages { binding: GraphQLBinding(), ), ]; -} \ No newline at end of file +} diff --git a/lib/app/routes/app_routes.dart b/lib/app/routes/app_routes.dart index c086d0a..3f360e7 100755 --- a/lib/app/routes/app_routes.dart +++ b/lib/app/routes/app_routes.dart @@ -5,14 +5,18 @@ part of 'app_pages.dart'; abstract class Routes { Routes._(); + static const NAV = _Paths.NAV; static const HOME = _Paths.HOME; + static const POST_DETAIL = _Paths.POST_DETAIL; static const GRAPHQL = _Paths.GRAPHQL; } abstract class _Paths { _Paths._(); + static const NAV = '/nav'; static const HOME = '/home'; + static const POST_DETAIL = '/post_detail'; static const GRAPHQL = '/graphql'; } diff --git a/lib/app/service/network_connectivity.dart b/lib/app/service/network_connectivity.dart new file mode 100644 index 0000000..511b892 --- /dev/null +++ b/lib/app/service/network_connectivity.dart @@ -0,0 +1,13 @@ +import 'package:connectivity_plus/connectivity_plus.dart'; + +class NetworkConnectivity { + static Future isNetworkAvailable() async { + var connectivityResult = await Connectivity().checkConnectivity(); + + if (connectivityResult == ConnectivityResult.none) { + return false; // No network connection + } + + return true; // Network connection available + } +} diff --git a/lib/main.dart b/lib/main.dart index 368b296..e3416fd 100755 --- a/lib/main.dart +++ b/lib/main.dart @@ -2,6 +2,8 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; +import 'package:getx_standard/app/data/local/my_hive.dart'; +import 'package:getx_standard/app/modules/home-with-restAPI/model/posts.dart'; import 'app/data/local/my_shared_pref.dart'; import 'app/routes/app_pages.dart'; @@ -14,6 +16,13 @@ Future main() async { SystemChrome.setPreferredOrientations( [DeviceOrientation.portraitUp], ); + + // init hive and adapters + await MyHive.init(registerAdapters: (hive) { + hive.registerAdapter(PostsAdapter()); + //myHive.registerAdapter(OtherAdapter()); + }); + // Device info // DeviceInfoHelper.initializeDeviceInfo(); @@ -27,7 +36,7 @@ Future main() async { // FirebaseMessaging.onMessage.listen(FcmHelper.fcmForegroundHandler); // initialize local notifications service - // await AwesomeNotificationsHelper.init(); + // LocalNotificationHelper.initializeNotifications(); runApp( ScreenUtilInit( @@ -55,7 +64,7 @@ Future main() async { initialRoute: AppPages.NAV, // first screen to show when app is running - defaultTransition: Transition.noTransition, + defaultTransition: Transition.circularReveal, getPages: AppPages.routes, // app screens diff --git a/lib/utils/fcm_notification/awesome_notifications_helper.dart b/lib/utils/fcm_notification/awesome_notifications_helper.dart deleted file mode 100755 index 31fd9d8..0000000 --- a/lib/utils/fcm_notification/awesome_notifications_helper.dart +++ /dev/null @@ -1,184 +0,0 @@ -import 'package:awesome_notifications/awesome_notifications.dart'; -import 'package:flutter/material.dart'; - -class AwesomeNotificationsHelper { - // prevent making instance - AwesomeNotificationsHelper._(); - - // Notification lib - static AwesomeNotifications awesomeNotifications = AwesomeNotifications(); - - /// initialize local notifications service, create channels and groups - /// setup notifications button actions handlers - static init() async { - // initialize local notifications - await _initNotification(); - - // request permission to show notifications - await awesomeNotifications.requestPermissionToSendNotifications(); - - // list when user click on notifications - listenToActionButtons(); - } - - /// when user click on notification or click on button on the notification - static listenToActionButtons() { - // Only after at least the action method is set, the notification events are delivered - awesomeNotifications.setListeners( - onActionReceivedMethod: NotificationController.onActionReceivedMethod, - onNotificationCreatedMethod: - NotificationController.onNotificationCreatedMethod, - onNotificationDisplayedMethod: - NotificationController.onNotificationDisplayedMethod, - onDismissActionReceivedMethod: - NotificationController.onDismissActionReceivedMethod); - } - - ///init notifications channels - static _initNotification() async { - await awesomeNotifications.initialize( - null, - // null mean it will show app icon on the notification (status bar) - [ - NotificationChannel( - channelGroupKey: NotificationChannels.generalChannelGroupKey, - channelKey: NotificationChannels.generalChannelKey, - channelName: NotificationChannels.generalChannelName, - groupKey: NotificationChannels.generalGroupKey, - channelDescription: NotificationChannels.generalChannelDescription, - defaultColor: Colors.green, - ledColor: Colors.white, - channelShowBadge: true, - playSound: true, - importance: NotificationImportance.Max, - ), - NotificationChannel( - channelGroupKey: NotificationChannels.chatChannelGroupKey, - channelKey: NotificationChannels.chatChannelKey, - channelName: NotificationChannels.chatChannelName, - groupKey: NotificationChannels.chatGroupKey, - channelDescription: NotificationChannels.chatChannelDescription, - defaultColor: Colors.green, - ledColor: Colors.white, - channelShowBadge: true, - playSound: true, - importance: NotificationImportance.Max) - ], channelGroups: [ - NotificationChannelGroup( - channelGroupKey: NotificationChannels.generalChannelGroupKey, - channelGroupName: NotificationChannels.generalChannelGroupName, - ), - NotificationChannelGroup( - channelGroupKey: NotificationChannels.chatChannelGroupKey, - channelGroupName: NotificationChannels.chatChannelGroupName, - ) - ]); - } - - //display notification for user with sound - static showNotification( - {required String title, - required String body, - required int id, - String? channelKey, - String? groupKey, - NotificationLayout? notificationLayout, - String? summary, - List? actionButtons, - Map? payload, - String? largeIcon}) async { - awesomeNotifications.isNotificationAllowed().then((isAllowed) { - if (!isAllowed) { - awesomeNotifications.requestPermissionToSendNotifications(); - } else { - // u can show notification - awesomeNotifications.createNotification( - content: NotificationContent( - id: id, - title: title, - body: body, - groupKey: groupKey ?? NotificationChannels.generalGroupKey, - channelKey: channelKey ?? NotificationChannels.generalChannelKey, - showWhen: true, - // Hide/show the time elapsed since notification was displayed - payload: payload, - // data of the notification (it will be used when user clicks on notification) - notificationLayout: - notificationLayout ?? NotificationLayout.Default, - // notification shape (message,media player..etc) For ex => NotificationLayout.Messaging - autoDismissible: true, - // dismiss notification when user clicks on it - summary: summary, - // for ex: New message (it will be shown on status bar before notificaiton shows up) - largeIcon: - largeIcon, // image of sender for ex (when someone send you message his image will be shown) - ), - actionButtons: actionButtons, - ); - } - }); - } -} - -class NotificationController { - /// Use this method to detect when a new notification or a schedule is created - @pragma("vm:entry-point") - static Future onNotificationCreatedMethod( - ReceivedNotification receivedNotification) async { - // Your code goes here - } - - /// Use this method to detect every time that a new notification is displayed - @pragma("vm:entry-point") - static Future onNotificationDisplayedMethod( - ReceivedNotification receivedNotification) async { - // Your code goes here - } - - /// Use this method to detect if the user dismissed a notification - @pragma("vm:entry-point") - static Future onDismissActionReceivedMethod( - ReceivedAction receivedAction) async { - // Your code goes here - } - - /// Use this method to detect when the user taps on a notification or action button - @pragma("vm:entry-point") - static Future onActionReceivedMethod( - ReceivedAction receivedAction) async { - Map? payload = receivedAction.payload; - // TODO handle clicking on notification - // example - // String routeToGetTo = payload['route']; - // normal navigation (Get.toNamed) will throw error - } -} - -class NotificationChannels { - // chat channel (for messages only) - static String get chatChannelKey => "chat_channel"; - - static String get chatChannelName => "Chat channel"; - - static String get chatGroupKey => "chat group key"; - - static String get chatChannelGroupKey => "chat_channel_group"; - - static String get chatChannelGroupName => "Chat notifications channels"; - - static String get chatChannelDescription => "Chat notifications channels"; - - // general channel (for all other notifications) - static String get generalChannelKey => "general_channel"; - - static String get generalGroupKey => "general group key"; - - static String get generalChannelGroupKey => "general_channel_group"; - - static String get generalChannelGroupName => "general notifications channel"; - - static String get generalChannelName => "general notifications channels"; - - static String get generalChannelDescription => - "Notification channel for general notifications"; -} diff --git a/lib/utils/fcm_notification/fcm_helper.dart b/lib/utils/fcm_notification/fcm_helper.dart index b2ec044..9296ecd 100755 --- a/lib/utils/fcm_notification/fcm_helper.dart +++ b/lib/utils/fcm_notification/fcm_helper.dart @@ -1,11 +1,13 @@ // ignore_for_file: unused_local_variable +import 'dart:convert'; + import 'package:firebase_core/firebase_core.dart'; import 'package:firebase_messaging/firebase_messaging.dart'; import 'package:logger/logger.dart'; import '../../app/data/local/my_shared_pref.dart'; -import 'awesome_notifications_helper.dart'; +import 'local_notification_helper.dart'; class FcmHelper { // prevent making instance @@ -85,23 +87,18 @@ class FcmHelper { @pragma('vm:entry-point') static Future fcmBackgroundHandler(RemoteMessage message) async { - AwesomeNotificationsHelper.showNotification( - id: 1, - title: message.notification?.title ?? 'Tittle', + LocalNotificationHelper.showNotification( + title: message.notification?.title ?? 'Title', body: message.notification?.body ?? 'Body', - payload: message.data - .cast(), // pass payload to the notification card so you can use it (when user click on notification) + payload: jsonEncode(message.data.cast()), ); } //handle fcm notification when app is open static Future fcmForegroundHandler(RemoteMessage message) async { - // Show the Awesome Notification - AwesomeNotificationsHelper.showNotification( + LocalNotificationHelper.showNotification( title: message.notification?.title ?? 'Title', body: message.notification?.body ?? 'Body', - id: 1, // Provide a unique ID for each notification - // Add other parameters for customization if needed ); } } diff --git a/lib/utils/fcm_notification/local_notification_helper.dart b/lib/utils/fcm_notification/local_notification_helper.dart new file mode 100644 index 0000000..f8b71db --- /dev/null +++ b/lib/utils/fcm_notification/local_notification_helper.dart @@ -0,0 +1,208 @@ +import 'dart:async'; +import 'dart:io'; + +import 'package:flutter/cupertino.dart'; +import 'package:flutter/foundation.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_local_notifications/flutter_local_notifications.dart'; +import 'package:flutter_timezone/flutter_timezone.dart'; +import 'package:logger/logger.dart'; +import 'package:timezone/data/latest_all.dart' as tz; +import 'package:timezone/timezone.dart' as tz; + +class LocalNotificationHelper { + static int id = 0; + static final FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin = + FlutterLocalNotificationsPlugin(); + + static final StreamController + didReceiveLocalNotificationStream = + StreamController.broadcast(); + + static final StreamController selectNotificationStream = + StreamController.broadcast(); + + static void initializeNotifications() async { + WidgetsFlutterBinding.ensureInitialized(); + await _configureLocalTimeZone(); + + const AndroidInitializationSettings initializationSettingsAndroid = + AndroidInitializationSettings('@mipmap/ic_launcher'); + + final List darwinNotificationCategories = + [ + DarwinNotificationCategory( + 'textCategory', + actions: [ + DarwinNotificationAction.text( + 'text_1', + 'Action 1', + buttonTitle: 'Send', + placeholder: 'Placeholder', + ), + ], + ), + DarwinNotificationCategory( + 'plainCategory', + actions: [ + DarwinNotificationAction.plain('id_1', 'Action 1'), + DarwinNotificationAction.plain( + 'id_2', + 'Action 2 (destructive)', + options: { + DarwinNotificationActionOption.destructive, + }, + ), + DarwinNotificationAction.plain( + 'id_3', + 'Action 3 (foreground)', + options: { + DarwinNotificationActionOption.foreground, + }, + ), + DarwinNotificationAction.plain( + 'id_4', + 'Action 4 (auth required)', + options: { + DarwinNotificationActionOption.authenticationRequired, + }, + ), + ], + options: { + DarwinNotificationCategoryOption.hiddenPreviewShowTitle, + }, + ) + ]; + + final DarwinInitializationSettings initializationSettingsDarwin = + DarwinInitializationSettings( + requestAlertPermission: true, + requestBadgePermission: true, + requestSoundPermission: true, + onDidReceiveLocalNotification: + (int id, String? title, String? body, String? payload) async { + didReceiveLocalNotificationStream.add( + ReceivedNotification( + id: id, + title: title, + body: body, + payload: payload, + ), + ); + }, + notificationCategories: darwinNotificationCategories, + ); + + final LinuxInitializationSettings initializationSettingsLinux = + LinuxInitializationSettings( + defaultActionName: 'Open notification', + defaultIcon: AssetsLinuxIcon('icons/app_icon.png'), + ); + + final InitializationSettings initializationSettings = + InitializationSettings( + android: initializationSettingsAndroid, + iOS: initializationSettingsDarwin, + macOS: initializationSettingsDarwin, + linux: initializationSettingsLinux, + ); + + await flutterLocalNotificationsPlugin.initialize( + initializationSettings, + onDidReceiveNotificationResponse: + (NotificationResponse notificationResponse) { + switch (notificationResponse.notificationResponseType) { + case NotificationResponseType.selectedNotification: + selectNotificationStream.add(notificationResponse.payload); + _onNotificationTap(notificationResponse.payload); + break; + case NotificationResponseType.selectedNotificationAction: + if (notificationResponse.actionId == 'id_3') { + selectNotificationStream.add(notificationResponse.payload); + _onNotificationTap(notificationResponse.payload); + } + break; + } + }, + onDidReceiveBackgroundNotificationResponse: _notificationTapBackground, + ); + } + + static Future _onNotificationTap(String? payload) async { + if (payload != null) { + // Use the payload data to navigate to the specific page + // await Get.find() + // .getNotifications(MySharedPref.getLangID() ?? "2"); + // + // Get.key.currentState + // ?.pushNamed(Routes.NOTIFICATION_HOME, arguments: payload); + } + } + + static Future _configureLocalTimeZone() async { + if (kIsWeb || Platform.isLinux) { + return; + } + tz.initializeTimeZones(); + final String timeZoneName = await FlutterTimezone.getLocalTimezone(); + tz.setLocalLocation(tz.getLocation(timeZoneName)); + } + + static Future _notificationTapBackground( + NotificationResponse notificationResponse) async { + Logger().d('notification(${notificationResponse.id}) action tapped: ' + '${notificationResponse.actionId} with' + ' payload: ${notificationResponse.payload}'); + if (notificationResponse.input?.isNotEmpty ?? false) { + Logger().d( + 'notification action tapped with input: ${notificationResponse.input}'); + } + } + + static void showNotification({ + required String title, + required String body, + String? payload, + }) async { + const AndroidNotificationDetails androidPlatformChannelSpecifics = + AndroidNotificationDetails( + 'notification_channel', // Change this to a unique channel ID + 'Notification Channel', // Change this to a channel name + + importance: Importance.max, + priority: Priority.high, + ticker: 'ticker', + ); + const NotificationDetails platformChannelSpecifics = + NotificationDetails(android: androidPlatformChannelSpecifics); + + await flutterLocalNotificationsPlugin.show( + id, + title, + body, + platformChannelSpecifics, + payload: payload, + ); + + id++; + } + + static void dispose() { + didReceiveLocalNotificationStream.close(); + selectNotificationStream.close(); + } +} + +class ReceivedNotification { + ReceivedNotification({ + required this.id, + required this.title, + required this.body, + required this.payload, + }); + + final int id; + final String? title; + final String? body; + final String? payload; +} diff --git a/linux/flutter/generated_plugin_registrant.cc b/linux/flutter/generated_plugin_registrant.cc index 7e7bf28..e71a16d 100755 --- a/linux/flutter/generated_plugin_registrant.cc +++ b/linux/flutter/generated_plugin_registrant.cc @@ -6,10 +6,6 @@ #include "generated_plugin_registrant.h" -#include void fl_register_plugins(FlPluginRegistry* registry) { - g_autoptr(FlPluginRegistrar) awesome_notifications_registrar = - fl_plugin_registry_get_registrar_for_plugin(registry, "AwesomeNotificationsPlugin"); - awesome_notifications_plugin_register_with_registrar(awesome_notifications_registrar); } diff --git a/linux/flutter/generated_plugins.cmake b/linux/flutter/generated_plugins.cmake index 4c05cc5..2e1de87 100755 --- a/linux/flutter/generated_plugins.cmake +++ b/linux/flutter/generated_plugins.cmake @@ -3,7 +3,6 @@ # list(APPEND FLUTTER_PLUGIN_LIST - awesome_notifications ) list(APPEND FLUTTER_FFI_PLUGIN_LIST diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index b53c66f..59981d1 100755 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -5,25 +5,27 @@ import FlutterMacOS import Foundation -import awesome_notifications import cloud_firestore -import connectivity_plus_macos +import connectivity_plus import device_info_plus import firebase_auth import firebase_core import firebase_messaging +import flutter_local_notifications +import flutter_timezone import path_provider_foundation import shared_preferences_foundation import sqflite func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { - AwesomeNotificationsPlugin.register(with: registry.registrar(forPlugin: "AwesomeNotificationsPlugin")) FLTFirebaseFirestorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseFirestorePlugin")) ConnectivityPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlugin")) DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin")) FLTFirebaseAuthPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseAuthPlugin")) FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin")) FLTFirebaseMessagingPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseMessagingPlugin")) + FlutterLocalNotificationsPlugin.register(with: registry.registrar(forPlugin: "FlutterLocalNotificationsPlugin")) + FlutterTimezonePlugin.register(with: registry.registrar(forPlugin: "FlutterTimezonePlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin")) diff --git a/pubspec.lock b/pubspec.lock index d8c0321..4d08f40 100755 --- a/pubspec.lock +++ b/pubspec.lock @@ -1,14 +1,30 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: + _fe_analyzer_shared: + dependency: transitive + description: + name: _fe_analyzer_shared + sha256: ae92f5d747aee634b87f89d9946000c2de774be1d6ac3e58268224348cd0101a + url: "https://pub.dev" + source: hosted + version: "61.0.0" _flutterfire_internals: dependency: transitive description: name: _flutterfire_internals - sha256: a742f71d7f3484253a623b30e19256aa4668ecbb3de6ad1beb0bcf8d4777ecd8 + sha256: "5dce45a06d386358334eb1689108db6455d90ceb0d75848d5f4819283d4ee2b8" + url: "https://pub.dev" + source: hosted + version: "1.3.4" + analyzer: + dependency: transitive + description: + name: analyzer + sha256: ea3d8652bda62982addfd92fdc2d0214e5f82e43325104990d4f4c4a2a313562 url: "https://pub.dev" source: hosted - version: "1.3.3" + version: "5.13.0" animated_text_kit: dependency: "direct main" description: @@ -41,14 +57,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.11.0" - awesome_notifications: - dependency: "direct main" - description: - name: awesome_notifications - sha256: "6ba98d73553c8a54e7b77f8dd8b95ce9d32a7839ef182b28cf2ad54ec28b1821" - url: "https://pub.dev" - source: hosted - version: "0.7.5-dev.3" boolean_selector: dependency: transitive description: @@ -57,6 +65,70 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.1" + build: + dependency: transitive + description: + name: build + sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0" + url: "https://pub.dev" + source: hosted + version: "2.4.1" + build_config: + dependency: transitive + description: + name: build_config + sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1 + url: "https://pub.dev" + source: hosted + version: "1.1.1" + build_daemon: + dependency: transitive + description: + name: build_daemon + sha256: "5f02d73eb2ba16483e693f80bee4f088563a820e47d1027d4cdfe62b5bb43e65" + url: "https://pub.dev" + source: hosted + version: "4.0.0" + build_resolvers: + dependency: transitive + description: + name: build_resolvers + sha256: "6c4dd11d05d056e76320b828a1db0fc01ccd376922526f8e9d6c796a5adbac20" + url: "https://pub.dev" + source: hosted + version: "2.2.1" + build_runner: + dependency: "direct dev" + description: + name: build_runner + sha256: "10c6bcdbf9d049a0b666702cf1cee4ddfdc38f02a19d35ae392863b47519848b" + url: "https://pub.dev" + source: hosted + version: "2.4.6" + build_runner_core: + dependency: transitive + description: + name: build_runner_core + sha256: "6d6ee4276b1c5f34f21fdf39425202712d2be82019983d52f351c94aafbc2c41" + url: "https://pub.dev" + source: hosted + version: "7.2.10" + built_collection: + dependency: transitive + description: + name: built_collection + sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" + url: "https://pub.dev" + source: hosted + version: "5.1.1" + built_value: + dependency: transitive + description: + name: built_value + sha256: "598a2a682e2a7a90f08ba39c0aaa9374c5112340f0a2e275f61b59389543d166" + url: "https://pub.dev" + source: hosted + version: "8.6.1" cached_network_image: dependency: "direct main" description: @@ -117,10 +189,10 @@ packages: dependency: transitive description: name: cli_util - sha256: "66f86e916d285c1a93d3b79587d94bd71984a66aac4ff74e524cfa7877f1395c" + sha256: b8db3080e59b2503ca9e7922c3df2072cf13992354d5e944074ffa836fba43b7 url: "https://pub.dev" source: hosted - version: "0.3.5" + version: "0.4.0" clock: dependency: transitive description: @@ -133,26 +205,34 @@ packages: dependency: "direct main" description: name: cloud_firestore - sha256: "5bbc1f5bffa79af54ca035b92b57f81c6fb35ee5471ead67e29c8e12de8432f8" + sha256: f1a06ad4499ed9ab73703560d44893e6b9e66ce3923c9121f4ef3981c972057f url: "https://pub.dev" source: hosted - version: "4.8.2" + version: "4.8.4" cloud_firestore_platform_interface: dependency: transitive description: name: cloud_firestore_platform_interface - sha256: "8e0aafeb727087f84710275d59a101b2acf2290ffbb3b111aab70423f8350d5d" + sha256: "86bd1865abbeb09a7d09da3e70364a09f894937270651fc611a1c6d6a9f7b02c" url: "https://pub.dev" source: hosted - version: "5.15.2" + version: "5.15.3" cloud_firestore_web: dependency: transitive description: name: cloud_firestore_web - sha256: bbf0ebb9d1e9251caa00e8727389313c64cb4240c1c31f895971c52d0c782316 + sha256: ac2eeb2a7ab1928c3aacc30eed750fa839d6f620e112a5459e321df217be2f47 url: "https://pub.dev" source: hosted - version: "3.6.2" + version: "3.6.3" + code_builder: + dependency: transitive + description: + name: code_builder + sha256: "4ad01d6e56db961d29661561effde45e519939fdaeb46c351275b182eac70189" + url: "https://pub.dev" + source: hosted + version: "4.5.0" collection: dependency: transitive description: @@ -162,29 +242,13 @@ packages: source: hosted version: "1.17.1" connectivity_plus: - dependency: transitive + dependency: "direct main" description: name: connectivity_plus - sha256: "63b6c0cfcefc2b81f803f04ff033d614f4969ed74ac369643455d5829947908a" - url: "https://pub.dev" - source: hosted - version: "2.1.0" - connectivity_plus_linux: - dependency: transitive - description: - name: connectivity_plus_linux - sha256: "0b5133ef6c4919c0d4e15ff7038a6a330ce2f15d5271074b9873873b8f4b2823" - url: "https://pub.dev" - source: hosted - version: "1.1.0" - connectivity_plus_macos: - dependency: transitive - description: - name: connectivity_plus_macos - sha256: "488d2de1e47e1224ad486e501b20b088686ba1f4ee9c4420ecbc3b9824f0b920" + sha256: "77a180d6938f78ca7d2382d2240eb626c0f6a735d0bfdce227d8ffb80f95c48b" url: "https://pub.dev" source: hosted - version: "1.2.6" + version: "4.0.2" connectivity_plus_platform_interface: dependency: transitive description: @@ -193,22 +257,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.4" - connectivity_plus_web: - dependency: transitive - description: - name: connectivity_plus_web - sha256: "81332be1b4baf8898fed17bb4fdef27abb7c6fd990bf98c54fd978478adf2f1a" - url: "https://pub.dev" - source: hosted - version: "1.2.5" - connectivity_plus_windows: - dependency: transitive - description: - name: connectivity_plus_windows - sha256: "535b0404b4d5605c4dd8453d67e5d6d2ea0dd36e3b477f50f31af51b0aeab9dd" - url: "https://pub.dev" - source: hosted - version: "1.2.2" convert: dependency: transitive description: @@ -225,6 +273,14 @@ packages: url: "https://pub.dev" source: hosted version: "3.0.3" + csslib: + dependency: transitive + description: + name: csslib + sha256: "706b5707578e0c1b4b7550f64078f0a0f19dec3f50a178ffae7006b0a9ca58fb" + url: "https://pub.dev" + source: hosted + version: "1.0.0" cupertino_icons: dependency: "direct main" description: @@ -233,22 +289,30 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.5" + dart_style: + dependency: transitive + description: + name: dart_style + sha256: "1efa911ca7086affd35f463ca2fc1799584fb6aa89883cf0af8e3664d6a02d55" + url: "https://pub.dev" + source: hosted + version: "2.3.2" dbus: dependency: transitive description: name: dbus - sha256: "3350efa144252eaa4264055dded4404a94b770cfe914f1d08c20953aee55cac2" + sha256: "6f07cba3f7b3448d42d015bfd3d53fe12e5b36da2423f23838efc1d5fb31a263" url: "https://pub.dev" source: hosted - version: "0.5.4" + version: "0.7.8" device_info_plus: dependency: "direct main" description: name: device_info_plus - sha256: "2c35b6d1682b028e42d07b3aee4b98fa62996c10bc12cb651ec856a80d6a761b" + sha256: "86add5ef97215562d2e090535b0a16f197902b10c369c558a100e74ea06e8659" url: "https://pub.dev" source: hosted - version: "9.0.2" + version: "9.0.3" device_info_plus_platform_interface: dependency: transitive description: @@ -261,10 +325,10 @@ packages: dependency: "direct main" description: name: dio - sha256: a9d76e72985d7087eb7c5e7903224ae52b337131518d127c554b9405936752b8 + sha256: ce75a1b40947fea0a0e16ce73337122a86762e38b982e1ccb909daa3b9bc4197 url: "https://pub.dev" source: hosted - version: "5.2.1+1" + version: "5.3.2" expandable_text: dependency: "direct main" description: @@ -285,10 +349,10 @@ packages: dependency: transitive description: name: ffi - sha256: ed5337a5660c506388a9f012be0288fb38b49020ce2b45fe1f8b8323fe429f99 + sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" url: "https://pub.dev" source: hosted - version: "2.0.2" + version: "2.1.0" file: dependency: transitive description: @@ -301,42 +365,42 @@ packages: dependency: "direct main" description: name: file_picker - sha256: b1729fc96627dd44012d0a901558177418818d6bd428df59dcfeb594e5f66432 + sha256: "21145c9c268d54b1f771d8380c195d2d6f655e0567dc1ca2f9c134c02c819e0a" url: "https://pub.dev" source: hosted - version: "5.3.2" + version: "5.3.3" firebase_auth: dependency: "direct main" description: name: firebase_auth - sha256: f693c0aa998b1101453878951b171b69f0db5199003df1c943b33493a1de7917 + sha256: "49fd35ce06f2530dd460e5dc123235731cb61dd7c76b0af4b6e190404880d04d" url: "https://pub.dev" source: hosted - version: "4.6.3" + version: "4.7.2" firebase_auth_platform_interface: dependency: transitive description: name: firebase_auth_platform_interface - sha256: "689ae048b78ad088ba31acdec45f5badb56201e749ed8b534947a7303ddb32aa" + sha256: "817f3ceb84ef5e9adaaf50cf7a19255f6ffcdd12c6f9e9aa4cf00fc7f2eb3cfb" url: "https://pub.dev" source: hosted - version: "6.15.3" + version: "6.16.1" firebase_auth_web: dependency: transitive description: name: firebase_auth_web - sha256: f35d637a1707afd51f30090bb5234b381d5071ccbfef09b8c393bc7c65e440cd + sha256: e9044778287f1ff8f9f4cee7e247b03ec87bb8977e0e65ad27dc337e196132e8 url: "https://pub.dev" source: hosted - version: "5.5.3" + version: "5.6.2" firebase_core: dependency: "direct main" description: name: firebase_core - sha256: a4a99204da264a0aa9d54a332ea0315ce7b0768075139c77abefe98093dd98be + sha256: "2e9324f719e90200dc7d3c4f5d2abc26052f9f2b995d3b6626c47a0dfe1c8192" url: "https://pub.dev" source: hosted - version: "2.14.0" + version: "2.15.0" firebase_core_platform_interface: dependency: transitive description: @@ -357,26 +421,34 @@ packages: dependency: "direct main" description: name: firebase_messaging - sha256: "7a09d8c21147f009882a27c96de1918ea283f974d73cb6fae1d234bb9ec18d8b" + sha256: "8ac91d83a028eef050de770f1dc98421e215714d245f34de7b154d436676fbd0" url: "https://pub.dev" source: hosted - version: "14.6.4" + version: "14.6.5" firebase_messaging_platform_interface: dependency: transitive description: name: firebase_messaging_platform_interface - sha256: e9e9dc48a3d8ffa67aaba3d6b1ebf74bc7d7d8c83d10b1458ff97878b9d8a2b0 + sha256: b2995e3640efb646e9ebf0e2fa50dea84895f0746a31d7e3af0e5e009a533a1a url: "https://pub.dev" source: hosted - version: "4.5.3" + version: "4.5.4" firebase_messaging_web: dependency: transitive description: name: firebase_messaging_web - sha256: "381f217e41e0e407baf8df21787b97e46fabfacefd6a953425be3a6cdf2269f4" + sha256: "5d8446a28339124a2cb4f57a6ca454a3aca7d0c5c0cdfa5707afb192f7c830a7" url: "https://pub.dev" source: hosted - version: "3.5.3" + version: "3.5.4" + fixnum: + dependency: transitive + description: + name: fixnum + sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + url: "https://pub.dev" + source: hosted + version: "1.1.0" flutter: dependency: "direct main" description: flutter @@ -410,10 +482,10 @@ packages: dependency: "direct main" description: name: flutter_launcher_icons - sha256: ce0e501cfc258907842238e4ca605e74b7fd1cdf04b3b43e86c43f3e40a1592c + sha256: "526faf84284b86a4cb36d20a5e45147747b7563d921373d4ee0559c54fcdbcea" url: "https://pub.dev" source: hosted - version: "0.11.0" + version: "0.13.1" flutter_lints: dependency: "direct dev" description: @@ -422,14 +494,38 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.2" + flutter_local_notifications: + dependency: "direct main" + description: + name: flutter_local_notifications + sha256: "3cc40fe8c50ab8383f3e053a499f00f975636622ecdc8e20a77418ece3b1e975" + url: "https://pub.dev" + source: hosted + version: "15.1.0+1" + flutter_local_notifications_linux: + dependency: transitive + description: + name: flutter_local_notifications_linux + sha256: "33f741ef47b5f63cc7f78fe75eeeac7e19f171ff3c3df054d84c1e38bedb6a03" + url: "https://pub.dev" + source: hosted + version: "4.0.0+1" + flutter_local_notifications_platform_interface: + dependency: transitive + description: + name: flutter_local_notifications_platform_interface + sha256: "7cf643d6d5022f3baed0be777b0662cce5919c0a7b86e700299f22dc4ae660ef" + url: "https://pub.dev" + source: hosted + version: "7.0.0+1" flutter_native_splash: dependency: "direct main" description: name: flutter_native_splash - sha256: bd36d1a7f05ff8378cad17d20c33ca904630bfd3fcf8b15c9e8237efbccfad0a + sha256: ba45d8cfbd778478a74696b012f33ffb6b1760c9bc531b21e2964444a4870dae url: "https://pub.dev" source: hosted - version: "2.2.0+1" + version: "2.3.1" flutter_otp_text_field: dependency: "direct main" description: @@ -459,11 +555,27 @@ packages: description: flutter source: sdk version: "0.0.0" + flutter_timezone: + dependency: "direct main" + description: + name: flutter_timezone + sha256: "4508018aba499c837f723e2e718259eb677410490638b7ea669b11113d083e68" + url: "https://pub.dev" + source: hosted + version: "1.0.7" flutter_web_plugins: dependency: transitive description: flutter source: sdk version: "0.0.0" + frontend_server_client: + dependency: transitive + description: + name: frontend_server_client + sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612" + url: "https://pub.dev" + source: hosted + version: "3.2.0" get: dependency: "direct main" description: @@ -472,94 +584,142 @@ packages: url: "https://pub.dev" source: hosted version: "4.6.5" + glob: + dependency: transitive + description: + name: glob + sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" + url: "https://pub.dev" + source: hosted + version: "2.1.2" gql: dependency: transitive description: name: gql - sha256: "998304fbb88a3956cfea10cd27a56f8e5d4b3bc110f03c952c18a9310774e8bb" + sha256: c2d4248adf2cc568976d9bb42803531232a981eff205b9931b73389e0665ac63 url: "https://pub.dev" source: hosted - version: "0.14.0" + version: "1.0.1-alpha+1690479830964" gql_dedupe_link: dependency: transitive description: name: gql_dedupe_link - sha256: "89681048cf956348e865da872a40081499b8c087fc84dd4d4b9c134bd70d27b3" + sha256: "307a33a0723edd5d9de652e38f6ccb01fbf04b90464e32efca7a3fa9027367d3" url: "https://pub.dev" source: hosted - version: "2.0.3+1" + version: "2.0.4-alpha+1690479831065" gql_error_link: dependency: transitive description: name: gql_error_link - sha256: e7bfdd2b6232f3e15861cd96c2ad6b7c9c94693843b3dea18295136a5fb5b534 + sha256: bfdb543137da89448cc5d003fd029c2e8718931d39d4a7dedb16f9169862fbb9 url: "https://pub.dev" source: hosted - version: "0.2.3+1" + version: "1.0.0" gql_exec: dependency: transitive description: name: gql_exec - sha256: "0d1fdb2e4154efbfc1dcf3f35ec36d19c8428ff0d560eb4c45b354f8f871dc50" + sha256: "257b6eeb206343349b188a4bfe874ba5826ec7992461a97890ebf4802eaa9a86" url: "https://pub.dev" source: hosted - version: "0.4.3" + version: "1.0.1-alpha+1690479830973" gql_http_link: dependency: transitive description: name: gql_http_link - sha256: "89ef87b32947acf4189f564c095f1148b0ab9bb9996fe518716dbad66708b834" + sha256: "0789d397d46ce274942fcc73e18a080cd2584296dadc33d8ae53d0666d7fe981" url: "https://pub.dev" source: hosted - version: "0.4.5" + version: "1.0.1" gql_link: dependency: transitive description: name: gql_link - sha256: f7973279126bc922d465c4f4da6ed93d187085e597b3480f5e14e74d28fe14bd + sha256: "6e429187a7c199c9a7bb7fc26c8ed0673dae9be3a00c8be6ecf15ba9b713b3cb" url: "https://pub.dev" source: hosted - version: "0.5.1" + version: "1.0.1-alpha+1690479830981" gql_transform_link: dependency: transitive description: name: gql_transform_link - sha256: b1735a9a92d25a92960002a8b40dfaede95ec1e5ed848906125d69efd878661f + sha256: "0645fdd874ca1be695fd327271fdfb24c0cd6fa40774a64b946062f321a59709" url: "https://pub.dev" source: hosted - version: "0.2.2+1" + version: "1.0.0" graphql: dependency: transitive description: name: graphql - sha256: b061201579040e9548cec2bae17bbdea0ab30666cb4e7ba48b9675f14d982199 + sha256: "1e3720c13cd1c9a345fed40dfac35759b626ff907661567d299616e9d9903e0c" url: "https://pub.dev" source: hosted - version: "5.1.3" + version: "5.2.0-beta.5" graphql_flutter: dependency: "direct main" description: name: graphql_flutter - sha256: "9ff835973d9b0e23194153944ecc7d12953d30ffe3ed23431bf476e2b0386ca4" + sha256: cfbeaa0542bc70d2f207352517fa1049e463560331389bda5bc563fa447b9bb6 url: "https://pub.dev" source: hosted - version: "5.1.0" - hive: + version: "5.2.0-beta.5" + graphs: dependency: transitive + description: + name: graphs + sha256: aedc5a15e78fc65a6e23bcd927f24c64dd995062bcd1ca6eda65a3cff92a4d19 + url: "https://pub.dev" + source: hosted + version: "2.3.1" + hive: + dependency: "direct main" description: name: hive sha256: "8dcf6db979d7933da8217edcec84e9df1bdb4e4edc7fc77dbd5aa74356d6d941" url: "https://pub.dev" source: hosted version: "2.2.3" + hive_flutter: + dependency: "direct main" + description: + name: hive_flutter + sha256: dca1da446b1d808a51689fb5d0c6c9510c0a2ba01e22805d492c73b68e33eecc + url: "https://pub.dev" + source: hosted + version: "1.1.0" + hive_generator: + dependency: "direct dev" + description: + name: hive_generator + sha256: "65998cc4d2cd9680a3d9709d893d2f6bb15e6c1f92626c3f1fa650b4b3281521" + url: "https://pub.dev" + source: hosted + version: "2.0.0" + html: + dependency: transitive + description: + name: html + sha256: "3a7812d5bcd2894edf53dfaf8cd640876cf6cef50a8f238745c8b8120ea74d3a" + url: "https://pub.dev" + source: hosted + version: "0.15.4" http: dependency: "direct main" description: name: http - sha256: "5895291c13fa8a3bd82e76d5627f69e0d85ca6a30dcac95c4ea19a5d555879c2" + sha256: "759d1a329847dd0f39226c688d3e06a6b8679668e350e2891a6474f8b4bb8525" url: "https://pub.dev" source: hosted - version: "0.13.6" + version: "1.1.0" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" + url: "https://pub.dev" + source: hosted + version: "3.2.1" http_parser: dependency: transitive description: @@ -588,10 +748,10 @@ packages: dependency: transitive description: name: image - sha256: "02bafd3b4f399bfeb10034deba9753d93b55ce41cd0c4d3d8b355626f80e5b32" + sha256: a72242c9a0ffb65d03de1b7113bc4e189686fc07c7147b8b41811d0dd0e0d9bf url: "https://pub.dev" source: hosted - version: "3.1.3" + version: "4.0.17" intl: dependency: "direct main" description: @@ -600,6 +760,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.18.1" + io: + dependency: transitive + description: + name: io + sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" + url: "https://pub.dev" + source: hosted + version: "1.0.4" ionicons: dependency: "direct main" description: @@ -624,14 +792,6 @@ packages: url: "https://pub.dev" source: hosted version: "4.8.1" - lint: - dependency: transitive - description: - name: lint - sha256: "4a539aa34ec5721a2c7574ae2ca0336738ea4adc2a34887d54b7596310b33c85" - url: "https://pub.dev" - source: hosted - version: "1.10.0" lints: dependency: transitive description: @@ -644,18 +804,26 @@ packages: dependency: "direct main" description: name: logger - sha256: "7ad7215c15420a102ec687bb320a7312afd449bac63bfb1c60d9787c27b9767f" + sha256: "66cb048220ca51cf9011da69fa581e4ee2bed4be6e82870d9e9baae75739da49" url: "https://pub.dev" source: hosted - version: "1.4.0" + version: "2.0.1" + logging: + dependency: transitive + description: + name: logging + sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" + url: "https://pub.dev" + source: hosted + version: "1.2.0" lottie: dependency: "direct main" description: name: lottie - sha256: f461105d3a35887b27089abf9c292334478dd292f7b47ecdccb6ae5c37a22c80 + sha256: b8bdd54b488c54068c57d41ae85d02808da09e2bee8b8dd1f59f441e7efa60cd url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.6.0" matcher: dependency: transitive description: @@ -680,22 +848,38 @@ 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" + mockito: + dependency: "direct dev" + description: + name: mockito + sha256: "7d5b53bcd556c1bc7ffbe4e4d5a19c3e112b7e925e9e172dd7c6ad0630812616" + url: "https://pub.dev" + source: hosted + version: "5.4.2" nm: dependency: transitive description: name: nm - sha256: b47776ec6a4799d7df9e8dff48319e66efd791bf2bcab8d26408db8f716e3a0e + sha256: "2c9aae4127bdc8993206464fcc063611e0e36e72018696cd9631023a31b24254" url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "0.5.0" normalize: dependency: transitive description: name: normalize - sha256: baf8caf2d8b745af5737cca6c24f7fe3cf3158897fdbcde9a909b9c8d3e2e5af + sha256: "8a60e37de5b608eeaf9b839273370c71ebba445e9f73b08eee7725e0d92dbc43" url: "https://pub.dev" source: hosted - version: "0.7.2" + version: "0.8.2+1" octo_image: dependency: transitive description: @@ -704,6 +888,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.2" + package_config: + dependency: transitive + description: + name: package_config + sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" + url: "https://pub.dev" + source: hosted + version: "2.1.0" path: dependency: transitive description: @@ -716,58 +908,50 @@ packages: dependency: transitive description: name: path_provider - sha256: "3087813781ab814e4157b172f1a11c46be20179fcc9bea043e0fba36bc0acaa2" + sha256: "909b84830485dbcd0308edf6f7368bc8fd76afa26a270420f34cabea2a6467a0" url: "https://pub.dev" source: hosted - version: "2.0.15" + version: "2.1.0" path_provider_android: dependency: transitive description: name: path_provider_android - sha256: "2cec049d282c7f13c594b4a73976b0b4f2d7a1838a6dd5aaf7bd9719196bee86" + sha256: "5d44fc3314d969b84816b569070d7ace0f1dea04bd94a83f74c4829615d22ad8" url: "https://pub.dev" source: hosted - version: "2.0.27" + version: "2.1.0" path_provider_foundation: dependency: transitive description: name: path_provider_foundation - sha256: "1995d88ec2948dac43edf8fe58eb434d35d22a2940ecee1a9fefcd62beee6eb3" + sha256: "1b744d3d774e5a879bb76d6cd1ecee2ba2c6960c03b1020cd35212f6aa267ac5" url: "https://pub.dev" source: hosted - version: "2.2.3" + version: "2.3.0" path_provider_linux: dependency: transitive description: name: path_provider_linux - sha256: ffbb8cc9ed2c9ec0e4b7a541e56fd79b138e8f47d2fb86815f15358a349b3b57 + sha256: ba2b77f0c52a33db09fc8caf85b12df691bf28d983e84cf87ff6d693cfa007b3 url: "https://pub.dev" source: hosted - version: "2.1.11" + version: "2.2.0" path_provider_platform_interface: dependency: transitive description: name: path_provider_platform_interface - sha256: "57585299a729335f1298b43245842678cb9f43a6310351b18fb577d6e33165ec" + sha256: bced5679c7df11190e1ddc35f3222c858f328fff85c3942e46e7f5589bf9eb84 url: "https://pub.dev" source: hosted - version: "2.0.6" + version: "2.1.0" path_provider_windows: dependency: transitive description: name: path_provider_windows - sha256: "1cb68ba4cd3a795033de62ba1b7b4564dace301f952de6bfb3cd91b202b6ee96" - url: "https://pub.dev" - source: hosted - version: "2.1.7" - pedantic: - dependency: transitive - description: - name: pedantic - sha256: "67fc27ed9639506c856c840ccce7594d0bdcd91bc8d53d6e52359449a1d50602" + sha256: ee0e0d164516b90ae1f970bdf29f726f1aa730d7cfc449ecc74c495378b705da url: "https://pub.dev" source: hosted - version: "1.11.1" + version: "2.2.0" petitparser: dependency: transitive description: @@ -788,10 +972,10 @@ packages: dependency: transitive description: name: plugin_platform_interface - sha256: "6a2128648c854906c53fa8e33986fc0247a1116122f9534dd20e3ab9e16a32bc" + sha256: "43798d895c929056255600343db8f049921cbec94d31ec87f1dc5c16c01935dd" url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.1.5" pointycastle: dependency: transitive description: @@ -800,22 +984,30 @@ packages: url: "https://pub.dev" source: hosted version: "3.7.3" - process: + pool: dependency: transitive description: - name: process - sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09" + name: pool + sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" url: "https://pub.dev" source: hosted - version: "4.2.4" - rename_app: - dependency: "direct main" + version: "1.5.1" + pub_semver: + dependency: "direct dev" description: - name: rename_app - sha256: "9db1121f65843e27f4e7a2ee3bef54d8cb6bc35fca5e5bda405be2a9e41e983b" + name: pub_semver + sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "2.1.4" + pubspec_parse: + dependency: transitive + description: + name: pubspec_parse + sha256: c63b2876e58e194e4b0828fcb080ad0e06d051cb607a6be51a9e084f47cb9367 + url: "https://pub.dev" + source: hosted + version: "1.2.3" rxdart: dependency: transitive description: @@ -844,10 +1036,10 @@ packages: dependency: transitive description: name: shared_preferences_foundation - sha256: b046999bf0ff58f04c364491bb803dcfa8f42e47b19c75478f53d323684a8cc1 + sha256: f39696b83e844923b642ce9dd4bd31736c17e697f6731a5adf445b1274cf3cd4 url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.3.2" shared_preferences_linux: dependency: transitive description: @@ -880,11 +1072,43 @@ packages: url: "https://pub.dev" source: hosted version: "2.3.0" + shelf: + dependency: transitive + description: + name: shelf + sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 + url: "https://pub.dev" + source: hosted + version: "1.4.1" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" + url: "https://pub.dev" + source: hosted + version: "1.0.4" sky_engine: dependency: transitive description: flutter source: sdk version: "0.0.99" + source_gen: + dependency: transitive + description: + name: source_gen + sha256: fc0da689e5302edb6177fdd964efcb7f58912f43c28c2047a808f5bfff643d16 + url: "https://pub.dev" + source: hosted + version: "1.4.0" + source_helper: + dependency: transitive + description: + name: source_helper + sha256: "6adebc0006c37dd63fe05bca0a929b99f06402fc95aa35bf36d67f5c06de01fd" + url: "https://pub.dev" + source: hosted + version: "1.3.4" source_span: dependency: transitive description: @@ -897,18 +1121,18 @@ packages: dependency: transitive description: name: sqflite - sha256: b4d6710e1200e96845747e37338ea8a819a12b51689a3bcf31eff0003b37a0b9 + sha256: "591f1602816e9c31377d5f008c2d9ef7b8aca8941c3f89cc5fd9d84da0c38a9a" url: "https://pub.dev" source: hosted - version: "2.2.8+4" + version: "2.3.0" sqflite_common: dependency: transitive description: name: sqflite_common - sha256: "8f7603f3f8f126740bc55c4ca2d1027aab4b74a1267a3e31ce51fe40e3b65b8f" + sha256: "1b92f368f44b0dee2425bb861cfa17b6f6cf3961f762ff6f941d20b33355660a" url: "https://pub.dev" source: hosted - version: "2.4.5+1" + version: "2.5.0" stack_trace: dependency: transitive description: @@ -925,6 +1149,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.1" + stream_transform: + dependency: transitive + description: + name: stream_transform + sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" + url: "https://pub.dev" + source: hosted + version: "2.1.0" string_scanner: dependency: transitive description: @@ -957,6 +1189,22 @@ packages: url: "https://pub.dev" source: hosted version: "0.5.1" + timezone: + dependency: "direct main" + description: + name: timezone + sha256: "1cfd8ddc2d1cfd836bc93e67b9be88c3adaeca6f40a00ca999104c30693cdca0" + url: "https://pub.dev" + source: hosted + version: "0.9.2" + timing: + dependency: transitive + description: + name: timing + sha256: "70a3b636575d4163c477e6de42f247a23b315ae20e86442bebe32d3cabf61c32" + url: "https://pub.dev" + source: hosted + version: "1.0.1" typed_data: dependency: transitive description: @@ -989,22 +1237,30 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" + watcher: + dependency: transitive + description: + name: watcher + sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" + url: "https://pub.dev" + source: hosted + version: "1.1.0" web_socket_channel: dependency: transitive description: name: web_socket_channel - sha256: "3a969ddcc204a3e34e863d204b29c0752716f78b6f9cc8235083208d268a4ccd" + sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.4.0" win32: dependency: transitive description: name: win32 - sha256: dfdf0136e0aa7a1b474ea133e67cb0154a0acd2599c4f3ada3b49d38d38793ee + sha256: f2add6fa510d3ae152903412227bda57d0d5a8da61d2c39c1fb022c9429a41c0 url: "https://pub.dev" source: hosted - version: "5.0.5" + version: "5.0.6" win32_registry: dependency: transitive description: @@ -1017,18 +1273,18 @@ packages: dependency: transitive description: name: xdg_directories - sha256: ee1505df1426458f7f60aac270645098d318a8b4766d85fde75f76f2e21807d1 + sha256: f0c26453a2d47aa4c2570c6a033246a3fc62da2fe23c7ffdd0a7495086dc0247 url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "1.0.2" xml: dependency: transitive description: name: xml - sha256: "80d494c09849dc3f899d227a78c30c5b949b985ededf884cb3f3bcd39f4b447a" + sha256: "5bc72e1e45e941d825fd7468b9b4cc3b9327942649aeb6fc5cdbf135f0a86e84" url: "https://pub.dev" source: hosted - version: "5.4.1" + version: "6.3.0" yaml: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 67400f7..391e851 100755 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -18,10 +18,10 @@ dependencies: cupertino_icons: ^1.0.2 get: ^4.6.5 - logger: ^1.4.0 + logger: ^2.0.1 flutter_screenutil: ^5.8.4 dio: ^5.2.1+1 - http: ^0.13.6 + http: ^1.1.0 shared_preferences: ^2.2.0 change_app_package_name: ^1.1.0 iconly: ^1.0.1 @@ -31,20 +31,24 @@ dependencies: lottie: ^2.4.0 ionicons: ^0.2.2 flutter_otp_text_field: ^1.1.1 - rename_app: ^1.1.0 - flutter_launcher_icons: ^0.11.0 + flutter_launcher_icons: ^0.13.1 flutter_native_splash: ^2.2.0+1 firebase_core: ^2.14.0 firebase_auth: ^4.6.3 cloud_firestore: ^4.8.2 firebase_messaging: ^14.6.4 - awesome_notifications: ^0.7.4+1 carousel_slider: ^4.2.1 cached_network_image: ^3.2.3 graphql_flutter: ^5.1.0 intl: ^0.18.1 animated_text_kit: ^4.2.2 device_info_plus: ^9.0.2 + flutter_local_notifications: ^15.1.0+1 + timezone: ^0.9.2 + flutter_timezone: ^1.0.7 + hive: ^2.2.3 + hive_flutter: ^1.1.0 + connectivity_plus: ^4.0.2 dev_dependencies: flutter_test: @@ -52,6 +56,10 @@ dev_dependencies: flutter_lints: ^2.0.0 + mockito: + build_runner: + hive_generator: + pub_semver: flutter_icons: android: true diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc index c59c4f6..7bfdda0 100755 --- a/windows/flutter/generated_plugin_registrant.cc +++ b/windows/flutter/generated_plugin_registrant.cc @@ -6,13 +6,10 @@ #include "generated_plugin_registrant.h" -#include -#include +#include #include void RegisterPlugins(flutter::PluginRegistry* registry) { - AwesomeNotificationsPluginCApiRegisterWithRegistrar( - registry->GetRegistrarForPlugin("AwesomeNotificationsPluginCApi")); ConnectivityPlusWindowsPluginRegisterWithRegistrar( registry->GetRegistrarForPlugin("ConnectivityPlusWindowsPlugin")); FirebaseCorePluginCApiRegisterWithRegistrar( diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake index 1c5599a..0e68a11 100755 --- a/windows/flutter/generated_plugins.cmake +++ b/windows/flutter/generated_plugins.cmake @@ -3,8 +3,7 @@ # list(APPEND FLUTTER_PLUGIN_LIST - awesome_notifications - connectivity_plus_windows + connectivity_plus firebase_core )