diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 65f64db..d14e495 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -43,7 +43,7 @@ android:value="2" /> + android:value="ca-app-pub-8206166796422159~5135681453"/> diff --git a/android/build.gradle b/android/build.gradle index 9192654..2139d26 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -29,6 +29,6 @@ subprojects { project.evaluationDependsOn(':app') } -task clean(type: Delete) { +tasks.register("clean", Delete) { delete rootProject.buildDir } diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 0e67cad..7d8fe5a 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -1,61 +1,61 @@ PODS: - - Firebase/Analytics (10.6.0): + - Firebase/Analytics (10.9.0): - Firebase/Core - - Firebase/Core (10.6.0): + - Firebase/Core (10.9.0): - Firebase/CoreOnly - - FirebaseAnalytics (~> 10.6.0) - - Firebase/CoreOnly (10.6.0): - - FirebaseCore (= 10.6.0) - - Firebase/Crashlytics (10.6.0): + - FirebaseAnalytics (~> 10.9.0) + - Firebase/CoreOnly (10.9.0): + - FirebaseCore (= 10.9.0) + - Firebase/Crashlytics (10.9.0): - Firebase/CoreOnly - - FirebaseCrashlytics (~> 10.6.0) - - Firebase/Performance (10.6.0): + - FirebaseCrashlytics (~> 10.9.0) + - Firebase/Performance (10.9.0): - Firebase/CoreOnly - - FirebasePerformance (~> 10.6.0) - - firebase_analytics (10.1.6): - - Firebase/Analytics (= 10.6.0) + - FirebasePerformance (~> 10.9.0) + - firebase_analytics (10.4.1): + - Firebase/Analytics (= 10.9.0) - firebase_core - Flutter - - firebase_core (2.8.0): - - Firebase/CoreOnly (= 10.6.0) + - firebase_core (2.13.0): + - Firebase/CoreOnly (= 10.9.0) - Flutter - - firebase_crashlytics (3.0.17): - - Firebase/Crashlytics (= 10.6.0) + - firebase_crashlytics (3.3.1): + - Firebase/Crashlytics (= 10.9.0) - firebase_core - Flutter - - firebase_performance (0.9.0-16): - - Firebase/Performance (= 10.6.0) + - firebase_performance (0.9.2-1): + - Firebase/Performance (= 10.9.0) - firebase_core - Flutter - - FirebaseABTesting (10.7.0): + - FirebaseABTesting (10.9.0): - FirebaseCore (~> 10.0) - - FirebaseAnalytics (10.6.0): - - FirebaseAnalytics/AdIdSupport (= 10.6.0) + - FirebaseAnalytics (10.9.0): + - FirebaseAnalytics/AdIdSupport (= 10.9.0) - FirebaseCore (~> 10.0) - FirebaseInstallations (~> 10.0) - - GoogleUtilities/AppDelegateSwizzler (~> 7.8) - - GoogleUtilities/MethodSwizzler (~> 7.8) - - GoogleUtilities/Network (~> 7.8) - - "GoogleUtilities/NSData+zlib (~> 7.8)" + - GoogleUtilities/AppDelegateSwizzler (~> 7.11) + - GoogleUtilities/MethodSwizzler (~> 7.11) + - GoogleUtilities/Network (~> 7.11) + - "GoogleUtilities/NSData+zlib (~> 7.11)" - nanopb (< 2.30910.0, >= 2.30908.0) - - FirebaseAnalytics/AdIdSupport (10.6.0): + - FirebaseAnalytics/AdIdSupport (10.9.0): - FirebaseCore (~> 10.0) - FirebaseInstallations (~> 10.0) - - GoogleAppMeasurement (= 10.6.0) - - GoogleUtilities/AppDelegateSwizzler (~> 7.8) - - GoogleUtilities/MethodSwizzler (~> 7.8) - - GoogleUtilities/Network (~> 7.8) - - "GoogleUtilities/NSData+zlib (~> 7.8)" + - GoogleAppMeasurement (= 10.9.0) + - GoogleUtilities/AppDelegateSwizzler (~> 7.11) + - GoogleUtilities/MethodSwizzler (~> 7.11) + - GoogleUtilities/Network (~> 7.11) + - "GoogleUtilities/NSData+zlib (~> 7.11)" - nanopb (< 2.30910.0, >= 2.30908.0) - - FirebaseCore (10.6.0): + - FirebaseCore (10.9.0): - FirebaseCoreInternal (~> 10.0) - GoogleUtilities/Environment (~> 7.8) - GoogleUtilities/Logger (~> 7.8) - - FirebaseCoreExtension (10.7.0): + - FirebaseCoreExtension (10.9.0): - FirebaseCore (~> 10.0) - - FirebaseCoreInternal (10.7.0): + - FirebaseCoreInternal (10.9.0): - "GoogleUtilities/NSData+zlib (~> 7.8)" - - FirebaseCrashlytics (10.6.0): + - FirebaseCrashlytics (10.9.0): - FirebaseCore (~> 10.5) - FirebaseInstallations (~> 10.0) - FirebaseSessions (~> 10.5) @@ -63,12 +63,12 @@ PODS: - GoogleUtilities/Environment (~> 7.8) - nanopb (< 2.30910.0, >= 2.30908.0) - PromisesObjC (~> 2.1) - - FirebaseInstallations (10.7.0): + - FirebaseInstallations (10.9.0): - FirebaseCore (~> 10.0) - GoogleUtilities/Environment (~> 7.8) - GoogleUtilities/UserDefaults (~> 7.8) - PromisesObjC (~> 2.1) - - FirebasePerformance (10.6.0): + - FirebasePerformance (10.9.0): - FirebaseCore (~> 10.5) - FirebaseInstallations (~> 10.0) - FirebaseRemoteConfig (~> 10.0) @@ -78,13 +78,13 @@ PODS: - GoogleUtilities/ISASwizzler (~> 7.8) - GoogleUtilities/MethodSwizzler (~> 7.8) - nanopb (< 2.30910.0, >= 2.30908.0) - - FirebaseRemoteConfig (10.7.0): + - FirebaseRemoteConfig (10.9.0): - FirebaseABTesting (~> 10.0) - FirebaseCore (~> 10.0) - FirebaseInstallations (~> 10.0) - GoogleUtilities/Environment (~> 7.8) - "GoogleUtilities/NSData+zlib (~> 7.8)" - - FirebaseSessions (10.7.0): + - FirebaseSessions (10.9.0): - FirebaseCore (~> 10.5) - FirebaseCoreExtension (~> 10.0) - FirebaseInstallations (~> 10.0) @@ -93,56 +93,60 @@ PODS: - nanopb (< 2.30910.0, >= 2.30908.0) - PromisesSwift (~> 2.1) - Flutter (1.0.0) - - Google-Mobile-Ads-SDK (9.14.0): + - FMDB (2.7.5): + - FMDB/standard (= 2.7.5) + - FMDB/standard (2.7.5) + - Google-Mobile-Ads-SDK (10.4.0): - GoogleAppMeasurement (< 11.0, >= 7.0) - GoogleUserMessagingPlatform (>= 1.1) - google_mobile_ads (1.0.0): - Flutter - - Google-Mobile-Ads-SDK (~> 9.13) - - GoogleAppMeasurement (10.6.0): - - GoogleAppMeasurement/AdIdSupport (= 10.6.0) - - GoogleUtilities/AppDelegateSwizzler (~> 7.8) - - GoogleUtilities/MethodSwizzler (~> 7.8) - - GoogleUtilities/Network (~> 7.8) - - "GoogleUtilities/NSData+zlib (~> 7.8)" + - Google-Mobile-Ads-SDK (~> 10.4.0) + - webview_flutter_wkwebview + - GoogleAppMeasurement (10.9.0): + - GoogleAppMeasurement/AdIdSupport (= 10.9.0) + - GoogleUtilities/AppDelegateSwizzler (~> 7.11) + - GoogleUtilities/MethodSwizzler (~> 7.11) + - GoogleUtilities/Network (~> 7.11) + - "GoogleUtilities/NSData+zlib (~> 7.11)" - nanopb (< 2.30910.0, >= 2.30908.0) - - GoogleAppMeasurement/AdIdSupport (10.6.0): - - GoogleAppMeasurement/WithoutAdIdSupport (= 10.6.0) - - GoogleUtilities/AppDelegateSwizzler (~> 7.8) - - GoogleUtilities/MethodSwizzler (~> 7.8) - - GoogleUtilities/Network (~> 7.8) - - "GoogleUtilities/NSData+zlib (~> 7.8)" + - GoogleAppMeasurement/AdIdSupport (10.9.0): + - GoogleAppMeasurement/WithoutAdIdSupport (= 10.9.0) + - GoogleUtilities/AppDelegateSwizzler (~> 7.11) + - GoogleUtilities/MethodSwizzler (~> 7.11) + - GoogleUtilities/Network (~> 7.11) + - "GoogleUtilities/NSData+zlib (~> 7.11)" - nanopb (< 2.30910.0, >= 2.30908.0) - - GoogleAppMeasurement/WithoutAdIdSupport (10.6.0): - - GoogleUtilities/AppDelegateSwizzler (~> 7.8) - - GoogleUtilities/MethodSwizzler (~> 7.8) - - GoogleUtilities/Network (~> 7.8) - - "GoogleUtilities/NSData+zlib (~> 7.8)" + - GoogleAppMeasurement/WithoutAdIdSupport (10.9.0): + - GoogleUtilities/AppDelegateSwizzler (~> 7.11) + - GoogleUtilities/MethodSwizzler (~> 7.11) + - GoogleUtilities/Network (~> 7.11) + - "GoogleUtilities/NSData+zlib (~> 7.11)" - nanopb (< 2.30910.0, >= 2.30908.0) - - GoogleDataTransport (9.2.1): + - GoogleDataTransport (9.2.3): - GoogleUtilities/Environment (~> 7.7) - nanopb (< 2.30910.0, >= 2.30908.0) - PromisesObjC (< 3.0, >= 1.2) - GoogleUserMessagingPlatform (2.0.1) - - GoogleUtilities/AppDelegateSwizzler (7.11.0): + - GoogleUtilities/AppDelegateSwizzler (7.11.1): - GoogleUtilities/Environment - GoogleUtilities/Logger - GoogleUtilities/Network - - GoogleUtilities/Environment (7.11.0): + - GoogleUtilities/Environment (7.11.1): - PromisesObjC (< 3.0, >= 1.2) - - GoogleUtilities/ISASwizzler (7.11.0) - - GoogleUtilities/Logger (7.11.0): + - GoogleUtilities/ISASwizzler (7.11.1) + - GoogleUtilities/Logger (7.11.1): - GoogleUtilities/Environment - - GoogleUtilities/MethodSwizzler (7.11.0): + - GoogleUtilities/MethodSwizzler (7.11.1): - GoogleUtilities/Logger - - GoogleUtilities/Network (7.11.0): + - GoogleUtilities/Network (7.11.1): - GoogleUtilities/Logger - "GoogleUtilities/NSData+zlib" - GoogleUtilities/Reachability - - "GoogleUtilities/NSData+zlib (7.11.0)" - - GoogleUtilities/Reachability (7.11.0): + - "GoogleUtilities/NSData+zlib (7.11.1)" + - GoogleUtilities/Reachability (7.11.1): - GoogleUtilities/Logger - - GoogleUtilities/UserDefaults (7.11.0): + - GoogleUtilities/UserDefaults (7.11.1): - GoogleUtilities/Logger - nanopb (2.30909.0): - nanopb/decode (= 2.30909.0) @@ -154,18 +158,23 @@ PODS: - PromisesObjC (2.2.0) - PromisesSwift (2.2.0): - PromisesObjC (= 2.2.0) - - Sentry/HybridSDK (8.3.3): - - SentryPrivate (= 8.3.3) + - Sentry/HybridSDK (8.7.1): + - SentryPrivate (= 8.7.1) - sentry_flutter (0.0.1): - Flutter - FlutterMacOS - - Sentry/HybridSDK (= 8.3.3) - - SentryPrivate (8.3.3) + - Sentry/HybridSDK (= 8.7.1) + - SentryPrivate (8.7.1) - shared_preferences_foundation (0.0.1): - Flutter - FlutterMacOS + - sqflite (0.0.3): + - Flutter + - FMDB (>= 2.7.5) - url_launcher_ios (0.0.1): - Flutter + - webview_flutter_wkwebview (0.0.1): + - Flutter DEPENDENCIES: - firebase_analytics (from `.symlinks/plugins/firebase_analytics/ios`) @@ -176,8 +185,10 @@ DEPENDENCIES: - google_mobile_ads (from `.symlinks/plugins/google_mobile_ads/ios`) - package_info_plus (from `.symlinks/plugins/package_info_plus/ios`) - sentry_flutter (from `.symlinks/plugins/sentry_flutter/ios`) - - shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/ios`) + - shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`) + - sqflite (from `.symlinks/plugins/sqflite/ios`) - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`) + - webview_flutter_wkwebview (from `.symlinks/plugins/webview_flutter_wkwebview/ios`) SPEC REPOS: trunk: @@ -192,6 +203,7 @@ SPEC REPOS: - FirebasePerformance - FirebaseRemoteConfig - FirebaseSessions + - FMDB - Google-Mobile-Ads-SDK - GoogleAppMeasurement - GoogleDataTransport @@ -221,42 +233,49 @@ EXTERNAL SOURCES: sentry_flutter: :path: ".symlinks/plugins/sentry_flutter/ios" shared_preferences_foundation: - :path: ".symlinks/plugins/shared_preferences_foundation/ios" + :path: ".symlinks/plugins/shared_preferences_foundation/darwin" + sqflite: + :path: ".symlinks/plugins/sqflite/ios" url_launcher_ios: :path: ".symlinks/plugins/url_launcher_ios/ios" + webview_flutter_wkwebview: + :path: ".symlinks/plugins/webview_flutter_wkwebview/ios" SPEC CHECKSUMS: - Firebase: f13680471b021937f2230ea8503c7809d8c29806 - firebase_analytics: 97d12c9683531ba3f923a798a95362e7590f0757 - firebase_core: 58542d7399889ebdbb034baa72d081e54c5c814d - firebase_crashlytics: 5f6296621a0e8ed7d15a7499c8131fbdcf176e3b - firebase_performance: b1fbf15054e1dd21f3ea225d162e196cacf200c0 - FirebaseABTesting: 76c8297fd026074e0366dc941d265d1be80a56d5 - FirebaseAnalytics: 9f382605c5ee412b039212f054bf7a403d9850c1 - FirebaseCore: fa80ad16a62d52f67274b5b88304c3a318bbf9a4 - FirebaseCoreExtension: f17247ba8c61e4d3c8d136b5e2de3cb4ac6a85b6 - FirebaseCoreInternal: 8845798510aae74703467480f71ac613788d0696 - FirebaseCrashlytics: ede07e7f433a0a2270112baf2d156b111cfb422d - FirebaseInstallations: 59c0e4c7a816a0f76710d83f77e5369b3e45eb96 - FirebasePerformance: 015ec3614f742150244171522bdb75995dbf98b7 - FirebaseRemoteConfig: d5de62211e2eaa2152d8ee85a23c301b70887a74 - FirebaseSessions: 34e5c084da010ef3802cbc062b822e513c9e6318 + Firebase: bd152f0f3d278c4060c5c71359db08ebcfd5a3e2 + firebase_analytics: 24c9089f960ea2255654488d219cb15a913adf8e + firebase_core: fc68c0f9eec4e800b9418deff14a7e0a504016f3 + firebase_crashlytics: 6c82b5f80f225b2429ebc5fdadde5b7e7735ed4e + firebase_performance: 516fbfa3ace3c84add028be727ff08f15d8a3502 + FirebaseABTesting: 005b70969e2817e2a1e631e8dba29134a04c0622 + FirebaseAnalytics: 5ea0db4893825e7b0149d575352cd838236313dc + FirebaseCore: b68d3616526ec02e4d155166bbafb8eca64af557 + FirebaseCoreExtension: d3e9bba2930a8033042112397cd9f006a1bb203d + FirebaseCoreInternal: d2b4acb827908e72eca47a9fd896767c3053921e + FirebaseCrashlytics: b60329455285aff853e54139d8ddbfe1e5f2b9f9 + FirebaseInstallations: c58489c9caacdbf27d1da60891a87318e20218e0 + FirebasePerformance: eee2f5da94fd7e5d15487649f8fe10a90c87c174 + FirebaseRemoteConfig: 5ea5834e8c518f377bf1af2d97ebd611914ebf2d + FirebaseSessions: 44a6782502eb279a214d4adca20891353278760c Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 - Google-Mobile-Ads-SDK: 4fe6304b771f8467d29978cb790ec1e56e646946 - google_mobile_ads: 528ab4673c5b5fd36321b7e90fc585064cdbaf2b - GoogleAppMeasurement: 686b48c3c895f3c55c70719041913d5d150b74f6 - GoogleDataTransport: ea169759df570f4e37bdee1623ec32a7e64e67c4 + FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a + Google-Mobile-Ads-SDK: 32fe7836431a06a29f7734ae092b600137c8108d + google_mobile_ads: 53b1f0d74445963e5810e34ac38dfb27aabe278e + GoogleAppMeasurement: 373bcbead1bb6a85be7a64d5d8f96284b762ea9c + GoogleDataTransport: f0308f5905a745f94fb91fea9c6cbaf3831cb1bd GoogleUserMessagingPlatform: 5f8b30daf181805317b6b985bb51c1ff3beca054 - GoogleUtilities: c2bdc4cf2ce786c4d2e6b3bcfd599a25ca78f06f + GoogleUtilities: 9aa0ad5a7bc171f8bae016300bfcfa3fb8425749 nanopb: b552cce312b6c8484180ef47159bc0f65a1f0431 - package_info_plus: 6c92f08e1f853dc01228d6f553146438dafcd14e + package_info_plus: fd030dabf36271f146f1f3beacd48f564b0f17f7 PromisesObjC: 09985d6d70fbe7878040aa746d78236e6946d2ef PromisesSwift: cf9eb58666a43bbe007302226e510b16c1e10959 - Sentry: 8ffc397d98fe58d693e73959b26ed0eaee55646a - sentry_flutter: 5028afacfa875785cb0e3682aece171fcd9dc0d5 - SentryPrivate: bf776a47a131648f5023097215987b40fbd47025 - shared_preferences_foundation: 986fc17f3d3251412d18b0265f9c64113a8c2472 + Sentry: 11776f6a25a128808d793d0d41bb7ad873b5ae4f + sentry_flutter: 886dbeb2674ba1232f540c54311a774bb50fda42 + SentryPrivate: b3c448eacdabe9eab7679a2e0af609c608f91572 + shared_preferences_foundation: e2dae3258e06f44cc55f49d42024fd8dd03c590c + sqflite: 31f7eba61e3074736dff8807a9b41581e4f7f15a url_launcher_ios: 08a3dfac5fb39e8759aeb0abbd5d9480f30fc8b4 + webview_flutter_wkwebview: 2e2d318f21a5e036e2c3f26171342e95908bd60a PODFILE CHECKSUM: ef19549a9bc3046e7bb7d2fab4d021637c0c58a3 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 8a4bf76..eb9a400 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -144,6 +144,7 @@ 3B06AD1E1E4923F5004D2608 /* Thin Binary */, CFFB3E3FBDDA19ECF106599F /* [CP] Embed Pods Frameworks */, 6EF480E9CCF581086B266CE4 /* [CP] Copy Pods Resources */, + BDED4F91E7EB6CAF119A332F /* [firebase_crashlytics] Crashlytics Upload Symbols */, ); buildRules = ( ); @@ -210,6 +211,7 @@ files = ( ); inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", ); name = "Thin Binary"; outputPaths = ( @@ -272,6 +274,26 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; }; + BDED4F91E7EB6CAF119A332F /* [firebase_crashlytics] Crashlytics Upload Symbols */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "\"${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${TARGET_NAME}\"", + "\"$(SRCROOT)/$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)\"", + ); + name = "[firebase_crashlytics] Crashlytics Upload Symbols"; + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"$PODS_ROOT/FirebaseCrashlytics/upload-symbols\" --flutter-project \"$PROJECT_DIR/firebase_app_id_file.json\" "; + }; CFFB3E3FBDDA19ECF106599F /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; diff --git a/ios/Runner/Base.lproj/Main.storyboard b/ios/Runner/Base.lproj/Main.storyboard index f3c2851..ba21071 100644 --- a/ios/Runner/Base.lproj/Main.storyboard +++ b/ios/Runner/Base.lproj/Main.storyboard @@ -1,8 +1,10 @@ - - + + + - + + @@ -14,13 +16,14 @@ - + - + + diff --git a/lib/helpers/database.dart b/lib/helpers/database.dart new file mode 100644 index 0000000..ceaf914 --- /dev/null +++ b/lib/helpers/database.dart @@ -0,0 +1,42 @@ +import 'dart:async'; +import 'dart:developer'; +import 'dart:io'; +import 'package:path/path.dart'; + +import 'package:sqflite/sqflite.dart'; + +class DatabaseHelper { + Database? _database; + + Future get database async { + if (_database != null) return _database!; + + return await initDB(); + } + + initDB() async { + String path = join(await getDatabasesPath(), 'seasonal.db'); + + return await openDatabase( + path, + version: 1, + onCreate: _onCreate, + onUpgrade: _onUpgrade + ); + } + + FutureOr _onCreate(Database db, int version) { + String sql = ''' + CREATE TABLE Food( + id INTEGER PRIMARY KEY, + name TEXT, + description TEXT, + image TEXT, + months TEXT) + '''; + + db.execute(sql); + } + + FutureOr _onUpgrade(Database db, int oldVersion, int newVersion) {} +} \ No newline at end of file diff --git a/lib/main.dart b/lib/main.dart index 79c405c..a5727af 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -5,7 +5,6 @@ import 'package:firebase_core/firebase_core.dart'; import 'package:sentry_flutter/sentry_flutter.dart'; import 'firebase_options.dart'; import 'package:google_mobile_ads/google_mobile_ads.dart'; -import 'package:seasonal/screens/list_screen.dart'; import 'package:seasonal/screens/tab_screen.dart'; void main() async { @@ -31,7 +30,7 @@ void main() async { // We recommend adjusting this value in production. options.tracesSampleRate = 1.0; }, - appRunner: () => runApp(MyApp()), + appRunner: () => runApp(const MyApp()), ); } @@ -49,64 +48,4 @@ class MyApp extends StatelessWidget { home: const TabScreen(), ); } -} - -// class MyHomePage extends StatefulWidget { -// const MyHomePage({super.key}); -// -// @override -// State createState() => _MyHomePageState(); -// } -// -// class _MyHomePageState extends State { -// late Future _goodData; -// -// Future getGoods() async { -// log('Start getGoods()'); -// -// var token = Constants.apiToken; -// -// var url = Uri.parse("${Constants.apiBaseUrl}/dev/goods"); -// final response = await http.get(url, headers: { -// 'Content-Type': 'application/json', -// 'Authorization': 'Bearer $token', -// }); -// -// return json.decode(response.body); -// } -// -// @override -// void initState() { -// super.initState(); -// -// _goodData = getGoods(); -// } -// -// @override -// Widget build(BuildContext context) { -// const title = '제철음식'; -// -// // 처음 시작할때 API가 느리면 listview에 아무것도 나오지 않음 -// // - FutureBuilder 사용 추가 -// return Scaffold( -// appBar: AppBar( -// title: const Text(title), -// elevation: 1, -// shadowColor: Theme.of(context).shadowColor, -// ), -// body: FutureBuilder( -// future: _goodData, -// builder: (BuildContext context, AsyncSnapshot snapshot) { -// var goods = snapshot.data ?? []; -// -// switch (snapshot.connectionState) { -// case ConnectionState.waiting: -// return const Center(child: CircularProgressIndicator()); -// default: -// return HomeListViewWidget(goods: goods); -// } -// } -// ) -// ); -// } -// } +} \ No newline at end of file diff --git a/lib/models/food.dart b/lib/models/food.dart new file mode 100644 index 0000000..795c109 --- /dev/null +++ b/lib/models/food.dart @@ -0,0 +1,35 @@ +class Food { + final int id; + final String name; + final String description; + final String image; + final List? months; + + const Food({ + required this.id, + required this.name, + required this.description, + required this.image, + required this.months, + }); + + factory Food.fromJson(Map json) { + return Food( + id: json['id'], + name: json['name'], + description: json['description'], + image: json['image'], + months: json['months'], + ); + } + + Map toJson() { + final Map data = {}; + data['id'] = id; + data['name'] = name; + data['description'] = description; + data['image'] = image; + data['months'] = months; + return data; + } +} \ No newline at end of file diff --git a/lib/prefs/bookdmark_sharedpreferences.dart b/lib/prefs/bookdmark_sharedpreferences.dart index 167a587..f488946 100644 --- a/lib/prefs/bookdmark_sharedpreferences.dart +++ b/lib/prefs/bookdmark_sharedpreferences.dart @@ -1,5 +1,4 @@ import 'dart:convert'; -import 'dart:developer'; import 'package:seasonal/models/bookmark.dart'; import 'package:shared_preferences/shared_preferences.dart'; @@ -9,7 +8,6 @@ class BookmarkSharedPreferences { Future> getBookmarks() async { SharedPreferences prefs = await SharedPreferences.getInstance(); String? json = prefs.getString(_key); - print('${json}'); if (json != null) { List list = jsonDecode(json); return list.map((e) => Bookmark.fromJson(e)).toList(); @@ -29,7 +27,6 @@ class BookmarkSharedPreferences { List bookmarks = await getBookmarks(); bookmarks.add(bookmark); SharedPreferences prefs = await SharedPreferences.getInstance(); - print('${bookmarks}'); prefs.setString(_key, jsonEncode(bookmarks.map((e) => e.toJson()).toList())); } diff --git a/lib/repositories/food_repository.dart b/lib/repositories/food_repository.dart new file mode 100644 index 0000000..e3e0067 --- /dev/null +++ b/lib/repositories/food_repository.dart @@ -0,0 +1,40 @@ +import 'dart:developer'; + +import 'package:sqflite/sqflite.dart'; + +import '../models/food.dart'; + +class FoodRepository +{ + Future select(database, id) async { + try { + List> results = + await database.query('Food', where: 'id = ?', whereArgs: [id]); + + // check empty + if (results.isNotEmpty) { + return Food.fromJson(results.first); + } + } catch (e) { + } + + return null; + } + + Future insert(Database database, Food food) async { + try { + await database.insert( + 'Food', + { + 'id': food.id, + 'name': food.name, + 'description': food.description, + 'image': food.image, + }, + // food.toJson(), + conflictAlgorithm: ConflictAlgorithm.replace, + ); + } catch (e) { + } + } +} \ No newline at end of file diff --git a/lib/screens/detail_screen.dart b/lib/screens/detail_screen.dart index 0e9455b..7530630 100644 --- a/lib/screens/detail_screen.dart +++ b/lib/screens/detail_screen.dart @@ -3,66 +3,65 @@ import 'dart:developer'; import 'package:flutter/material.dart'; import 'package:http/http.dart' as http; +import 'package:seasonal/helpers/database.dart'; import 'package:seasonal/models/bookmark.dart'; import 'package:seasonal/prefs/bookdmark_sharedpreferences.dart'; +import 'package:seasonal/repositories/food_repository.dart'; import '../config/constants.dart'; +import '../models/food.dart'; class DetailScreen extends StatefulWidget { final int index; - final Map goods; + final Map food; - const DetailScreen({super.key, required this.index, required this.goods}); + const DetailScreen({super.key, required this.index, required this.food}); @override State createState() => _DetailScreenState(); } -class Good { - final int id; - final String name; - final String description; - final String image; - final List months; - - const Good({ - required this.id, - required this.name, - required this.description, - required this.image, - required this.months, - }); - - factory Good.fromJson(Map json) { - return Good( - id: json['id'], - name: json['name'], - description: json['description'], - image: json['image'], - months: json['months'], - ); - } -} - class _DetailScreenState extends State { - late Future _goodData; final BookmarkSharedPreferences bookmarkSharedPreferences = BookmarkSharedPreferences(); + final FoodRepository _foodRepository = FoodRepository(); + final _model = DatabaseHelper(); + + late Future _foodData; + bool isBookmark = false; - Future getGoodOne() async { + Future _getFood() async { + var foodId = widget.index; + + // select + var food = await _foodRepository.select(await _model.database, foodId); + + if (food != null) { + return food; + } + + food = await _getFoodByApi(foodId); + + // insert + _foodRepository.insert(await _model.database, food); + + return food; + } + + Future _getFoodByApi(foodId) async { var token = Constants.apiToken; - var url = Uri.parse("${Constants.apiBaseUrl}/dev/goods/${widget.index}"); + var url = Uri.parse("${Constants.apiBaseUrl}/dev/goods/${foodId}"); final response = await http.get(url, headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer $token', }); - return Good.fromJson(json.decode(response.body)); + return Food.fromJson(json.decode(response.body)); } Future _checkBookmark() async { - int hasBookmark = await bookmarkSharedPreferences.hasBookmark(Bookmark(goodList: widget.goods['id'])); + int hasBookmark = await bookmarkSharedPreferences.hasBookmark(Bookmark(goodList: widget.food['id'])); setState(() { isBookmark = hasBookmark >= 0; @@ -71,9 +70,11 @@ class _DetailScreenState extends State { @override void initState() { + log('detail_screen initState()'); super.initState(); - _goodData = getGoodOne(); + _foodData = _getFood(); + _checkBookmark(); } @@ -88,7 +89,7 @@ class _DetailScreenState extends State { slivers: [ SliverAppBar( pinned: true, - title: Text('${widget.goods['name']}', + title: Text('${widget.food['name']}', style: const TextStyle( // color: Colors.black, // fontSize: 20, @@ -132,7 +133,7 @@ class _DetailScreenState extends State { fit: StackFit.expand, children: [ Image.network( - '${Constants.imageBaseUrl}/${widget.goods['image']}', + '${Constants.imageBaseUrl}/${widget.food['image']}', fit: BoxFit.cover, ), const DecoratedBox( @@ -156,7 +157,7 @@ class _DetailScreenState extends State { child: Container( padding: const EdgeInsets.all(25), child: FutureBuilder( - future: _goodData, + future: _foodData, builder: (BuildContext context, AsyncSnapshot snapshot) { var goods = snapshot.data ?? []; diff --git a/lib/screens/list_screen.dart b/lib/screens/list_screen.dart index 6536654..622b693 100644 --- a/lib/screens/list_screen.dart +++ b/lib/screens/list_screen.dart @@ -1,5 +1,4 @@ import 'dart:convert'; -import 'dart:developer'; import 'package:flutter/material.dart'; import 'package:http/http.dart' as http; diff --git a/lib/screens/setting_screen.dart b/lib/screens/setting_screen.dart index e055834..9d2cf16 100644 --- a/lib/screens/setting_screen.dart +++ b/lib/screens/setting_screen.dart @@ -1,3 +1,5 @@ +import 'dart:io' show Platform; + import 'package:flutter/material.dart'; import 'package:google_mobile_ads/google_mobile_ads.dart'; import 'package:url_launcher/url_launcher.dart'; @@ -27,15 +29,16 @@ class _SettingScreenState extends State { // 광고 로드 void _createInterstitialAd() { InterstitialAd.load( - adUnitId: 'ca-app-pub-8206166796422159/6836935110', + adUnitId: Platform.isAndroid + ? 'ca-app-pub-8206166796422159/1336440199' + : 'ca-app-pub-8206166796422159/6836935110', request: request, adLoadCallback: InterstitialAdLoadCallback( onAdLoaded: (InterstitialAd ad) { - print('$ad loaded'); _interstitialAd = ad; }, onAdFailedToLoad: (LoadAdError error) { - print('InterstitialAd failed to load: $error'); + }, ) ); @@ -43,8 +46,6 @@ class _SettingScreenState extends State { void _showInterstitialAd() { if (_interstitialAd == null) { - print('Warning: attempt to show interstitial before loaded.'); - showDialog( context: context, builder: (BuildContext context) { @@ -67,15 +68,16 @@ class _SettingScreenState extends State { } _interstitialAd!.fullScreenContentCallback = FullScreenContentCallback( - onAdShowedFullScreenContent: (InterstitialAd ad) => - print('ad onAdShowedFullScreenContent.'), + onAdShowedFullScreenContent: (InterstitialAd ad) { + // print('ad onAdShowedFullScreenContent.') + }, onAdDismissedFullScreenContent: (InterstitialAd ad) { - print('$ad onAdDismissedFullScreenContent.'); + // print('$ad onAdDismissedFullScreenContent.'); ad.dispose(); _createInterstitialAd(); }, onAdFailedToShowFullScreenContent: (InterstitialAd ad, AdError error) { - print('$ad onAdFailedToShowFullScreenContent: $error'); + // print('$ad onAdFailedToShowFullScreenContent: $error'); ad.dispose(); _createInterstitialAd(); }, diff --git a/lib/screens/tab_screen.dart b/lib/screens/tab_screen.dart index e86c441..70e3f16 100644 --- a/lib/screens/tab_screen.dart +++ b/lib/screens/tab_screen.dart @@ -1,6 +1,4 @@ -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:seasonal/screens/bookmark_list_screen.dart.bak'; import 'package:seasonal/screens/list_screen.dart'; import 'package:seasonal/screens/setting_screen.dart'; @@ -59,9 +57,4 @@ class _TabScreenState extends State with SingleTickerProviderStateMix ), ); } - - @override - void dispose() { - super.dispose(); - } } \ No newline at end of file diff --git a/lib/widgets/home_listview_widget.dart b/lib/widgets/home_listview_widget.dart index c7b9131..feae7f9 100644 --- a/lib/widgets/home_listview_widget.dart +++ b/lib/widgets/home_listview_widget.dart @@ -9,7 +9,7 @@ class HomeListViewWidget extends StatelessWidget { required this.goods, }); - final goods; + final List goods; @override Widget build(BuildContext context) { @@ -22,7 +22,7 @@ class HomeListViewWidget extends StatelessWidget { context, MaterialPageRoute( builder: (context) => - DetailScreen(index: goods[index]['id'], goods: goods[index])), + DetailScreen(index: goods[index]['id'], food: goods[index])), ); }, child: Container( diff --git a/pubspec.lock b/pubspec.lock index 40a41a2..be76dcf 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,10 +5,10 @@ packages: dependency: transitive description: name: _flutterfire_internals - sha256: "6a0ad72b2bcdb461749e40c01c478212a78db848dfcb2f10f2a461988bc5fb29" + sha256: "8eb354cb8ebed8a9fdf63699d15deff533bc133128898afaf754926b57d611b6" url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.3.1" archive: dependency: transitive description: @@ -21,18 +21,18 @@ packages: dependency: transitive description: name: args - sha256: "4cab82a83ffef80b262ddedf47a0a8e56ee6fbf7fe21e6e768b02792034dd440" + sha256: c372bb384f273f0c2a8aaaa226dad84dc27c8519a691b888725dec59518ad53a url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.4.1" async: dependency: transitive description: name: async - sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0 + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" url: "https://pub.dev" source: hosted - version: "2.10.0" + version: "2.11.0" boolean_selector: dependency: transitive description: @@ -45,18 +45,18 @@ packages: dependency: transitive description: name: characters - sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.3.0" checked_yaml: dependency: transitive description: name: checked_yaml - sha256: "3d1505d91afa809d177efd4eed5bb0eb65805097a1463abdd2add076effae311" + sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff url: "https://pub.dev" source: hosted - version: "2.0.2" + version: "2.0.3" cli_util: dependency: transitive description: @@ -77,10 +77,10 @@ packages: dependency: transitive description: name: collection - sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0 + sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c" url: "https://pub.dev" source: hosted - version: "1.17.0" + version: "1.17.1" convert: dependency: transitive description: @@ -93,10 +93,10 @@ packages: dependency: transitive description: name: crypto - sha256: aa274aa7774f8964e4f4f38cc994db7b6158dd36e9187aaceaddc994b35c6c67 + sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "3.0.3" cupertino_icons: dependency: "direct main" description: @@ -117,10 +117,10 @@ packages: dependency: transitive description: name: ffi - sha256: a38574032c5f1dd06c4aee541789906c12ccaab8ba01446e800d9c5b79c4a978 + sha256: ed5337a5660c506388a9f012be0288fb38b49020ce2b45fe1f8b8323fe429f99 url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "2.0.2" file: dependency: transitive description: @@ -133,90 +133,90 @@ packages: dependency: "direct main" description: name: firebase_analytics - sha256: "2d8f475f79658a8e1865ee8a9e2e8eea70de5e487e3a646d9073dc3d1520d3e8" + sha256: d283d7475afd8f9397889bf00961ddde55c3c2daf25334dd3e3a69db0f21c939 url: "https://pub.dev" source: hosted - version: "10.2.1" + version: "10.4.1" firebase_analytics_platform_interface: dependency: transitive description: name: firebase_analytics_platform_interface - sha256: a667807edbcd3f5a6336275a21c8802de8f98f0a91b8c97abb76119b142aa91d + sha256: e4f8f612a1847fc4e906bd581cbd84bea5385478ffa301dfe49796bf2c89308e url: "https://pub.dev" source: hosted - version: "3.4.1" + version: "3.6.1" firebase_analytics_web: dependency: transitive description: name: firebase_analytics_web - sha256: "907285030d59570d7c1a8d721912db990957ab9b87736e50a9457491c16bcffe" + sha256: afeae10f89ef87b288e830d15ad1c712feedda881d27d422b2f064fa749952c8 url: "https://pub.dev" source: hosted - version: "0.5.2+1" + version: "0.5.4+1" firebase_core: dependency: "direct main" description: name: firebase_core - sha256: "239e4ac688674a7e7b5476fd16b0d8e2b5a453d464f32091af3ce1df4ebb7316" + sha256: "250678b816279b3240c3a33e1f76bf712c00718f1fbeffc85873a5da8c077379" url: "https://pub.dev" source: hosted - version: "2.10.0" + version: "2.13.0" firebase_core_platform_interface: dependency: transitive description: name: firebase_core_platform_interface - sha256: "0df0a064ab0cad7f8836291ca6f3272edd7b83ad5b3540478ee46a0849d8022b" + sha256: b63e3be6c96ef5c33bdec1aab23c91eb00696f6452f0519401d640938c94cba2 url: "https://pub.dev" source: hosted - version: "4.6.0" + version: "4.8.0" firebase_core_web: dependency: transitive description: name: firebase_core_web - sha256: "347351a8f0518f3343d79a9a0690fa67ad232fc32e2ea270677791949eac792b" + sha256: "8c0f4c87d20e2d001a5915df238c1f9c88704231f591324205f5a5d2a7740a45" url: "https://pub.dev" source: hosted - version: "2.3.0" + version: "2.5.0" firebase_crashlytics: dependency: "direct main" description: name: firebase_crashlytics - sha256: bfc662a87df622e7d95c360536a4999f06474f53eda5a219af9e29193d498529 + sha256: "0d74cca3085f144f99aa4bd82cc4d33280d4cb72bac0b733cbf97c2d7d126df8" url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "3.3.1" firebase_crashlytics_platform_interface: dependency: transitive description: name: firebase_crashlytics_platform_interface - sha256: b9c7b8498c877a2901ad323fc92c10f672be1597bc82d08f121f6228f321a7e0 + sha256: "13880033d5f2055f53bcda28024e16607b8400445a425f86732c1935da9260db" url: "https://pub.dev" source: hosted - version: "3.4.1" + version: "3.6.1" firebase_performance: dependency: "direct main" description: name: firebase_performance - sha256: "14f4d1e89e757f0aa1dec83c13ca390bbd728aca1ccc3ad19e6a23e2710f45b7" + sha256: "60c6ef0108429a6a73f9d66f10532b715901677ed662b87a511edba9cb98c4ec" url: "https://pub.dev" source: hosted - version: "0.9.1+1" + version: "0.9.2+1" firebase_performance_platform_interface: dependency: transitive description: name: firebase_performance_platform_interface - sha256: "0914a49c4ca2cc74ac4c7fde719f280896b4c1d1bbe5fa72e059da0803cbc493" + sha256: f282cdf9f939aabfaab6b8a40e0e56ef27a7effef6540c13eaa927b935cb1944 url: "https://pub.dev" source: hosted - version: "0.1.2+1" + version: "0.1.4+1" firebase_performance_web: dependency: transitive description: name: firebase_performance_web - sha256: "8192e4e112e9e09d2c9bbc8ab51d7c4e34ea618d15452d0ecfa6141e8babbd40" + sha256: "71e4a9a0f8f39b830161986fdcd5f5d45837e56bc1d8da0e41bdc44551981d31" url: "https://pub.dev" source: hosted - version: "0.1.2+1" + version: "0.1.4+1" flutter: dependency: "direct main" description: flutter @@ -260,18 +260,18 @@ packages: dependency: "direct main" description: name: google_mobile_ads - sha256: "010b7a7a81b5c8f760eb2e5add8eaa7e429b4982dc8c8e465b709611f52887be" + sha256: "24ee4e9546866cc15ebe565dabf6a6c485ce5fbec0645fde22799800532000f0" url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "3.0.0" http: dependency: "direct main" description: name: http - sha256: "6aa2946395183537c8b880962d935877325d6a09a2867c3970c05c0fed6ac482" + sha256: "5895291c13fa8a3bd82e76d5627f69e0d85ca6a30dcac95c4ea19a5d555879c2" url: "https://pub.dev" source: hosted - version: "0.13.5" + version: "0.13.6" http_parser: dependency: transitive description: @@ -284,42 +284,42 @@ packages: dependency: transitive description: name: image - sha256: "483a389d6ccb292b570c31b3a193779b1b0178e7eb571986d9a49904b6861227" + sha256: a72242c9a0ffb65d03de1b7113bc4e189686fc07c7147b8b41811d0dd0e0d9bf url: "https://pub.dev" source: hosted - version: "4.0.15" + version: "4.0.17" js: dependency: transitive description: name: js - sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7" + sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 url: "https://pub.dev" source: hosted - version: "0.6.5" + version: "0.6.7" json_annotation: dependency: transitive description: name: json_annotation - sha256: c33da08e136c3df0190bd5bbe51ae1df4a7d96e7954d1d7249fea2968a72d317 + sha256: b10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467 url: "https://pub.dev" source: hosted - version: "4.8.0" + version: "4.8.1" lints: dependency: transitive description: name: lints - sha256: "5e4a9cd06d447758280a8ac2405101e0e2094d2a1dbdd3756aec3fe7775ba593" + sha256: "6b0206b0bf4f04961fc5438198ccb3a885685cd67d4d4a32cc20ad7f8adbe015" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "2.1.0" matcher: dependency: transitive description: name: matcher - sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72" + sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb" url: "https://pub.dev" source: hosted - version: "0.12.13" + version: "0.12.15" material_color_utilities: dependency: transitive description: @@ -332,18 +332,18 @@ packages: dependency: transitive description: name: meta - sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42" + sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" url: "https://pub.dev" source: hosted - version: "1.8.0" + version: "1.9.1" package_info_plus: dependency: transitive description: name: package_info_plus - sha256: de41e74b0ea9a3e524c68f35099af1fdeb4885625aeb277d2e01a42d6bd7b293 + sha256: "28386bbe89ab5a7919a47cea99cdd1128e5a6e0bbd7eaafe20440ead84a15de3" url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "4.0.1" package_info_plus_platform_interface: dependency: transitive description: @@ -356,18 +356,18 @@ packages: dependency: transitive description: name: path - sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b + sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" url: "https://pub.dev" source: hosted - version: "1.8.2" + version: "1.8.3" path_provider_linux: dependency: transitive description: name: path_provider_linux - sha256: "2ae08f2216225427e64ad224a24354221c2c7907e448e6e0e8b57b1eb9f10ad1" + sha256: ffbb8cc9ed2c9ec0e4b7a541e56fd79b138e8f47d2fb86815f15358a349b3b57 url: "https://pub.dev" source: hosted - version: "2.1.10" + version: "2.1.11" path_provider_platform_interface: dependency: transitive description: @@ -388,10 +388,10 @@ packages: dependency: transitive description: name: petitparser - sha256: "49392a45ced973e8d94a85fdb21293fbb40ba805fc49f2965101ae748a3683b4" + sha256: cb3798bef7fc021ac45b308f4b51208a152792445cce0448c9a4ba5879dd8750 url: "https://pub.dev" source: hosted - version: "5.1.0" + version: "5.4.0" platform: dependency: transitive description: @@ -428,42 +428,42 @@ packages: dependency: transitive description: name: sentry - sha256: cce8f5d696c7083e6915477b455de2134b689aff69bc31249844646f91a52ac7 + sha256: "617e4973b17adcfcbdcafd021d089cf6d32d47e345104217bc8e8aa5d88f0114" url: "https://pub.dev" source: hosted - version: "7.5.0" + version: "7.6.2" sentry_flutter: dependency: "direct main" description: name: sentry_flutter - sha256: a772ad8abafdcf4ac04568bf3469cc541761412fd664a7aa99d9578fd0933a09 + sha256: "8bea9438d4c0306d51d1958833fdd12a08bd26e2f9060be7eec3a95647f8347d" url: "https://pub.dev" source: hosted - version: "7.5.0" + version: "7.6.2" shared_preferences: dependency: "direct main" description: name: shared_preferences - sha256: "858aaa72d8f61637d64e776aca82e1c67e6d9ee07979123c5d17115031c1b13b" + sha256: "16d3fb6b3692ad244a695c0183fca18cf81fd4b821664394a781de42386bf022" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" shared_preferences_android: dependency: transitive description: name: shared_preferences_android - sha256: "7fa90471a6875d26ad78c7e4a675874b2043874586891128dc5899662c97db46" + sha256: "6478c6bbbecfe9aced34c483171e90d7c078f5883558b30ec3163cf18402c749" url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.4" shared_preferences_foundation: dependency: transitive description: name: shared_preferences_foundation - sha256: "0c1c16c56c9708aa9c361541a6f0e5cc6fc12a3232d866a687a7b7db30032b07" + sha256: e014107bb79d6d3297196f4f2d0db54b5d1f85b8ea8ff63b8e8b391a02700feb url: "https://pub.dev" source: hosted - version: "2.2.1" + version: "2.2.2" shared_preferences_linux: dependency: transitive description: @@ -509,6 +509,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.9.1" + sqflite: + dependency: "direct main" + description: + name: sqflite + sha256: b4d6710e1200e96845747e37338ea8a819a12b51689a3bcf31eff0003b37a0b9 + url: "https://pub.dev" + source: hosted + version: "2.2.8+4" + sqflite_common: + dependency: transitive + description: + name: sqflite_common + sha256: e77abf6ff961d69dfef41daccbb66b51e9983cdd5cb35bf30733598057401555 + url: "https://pub.dev" + source: hosted + version: "2.4.5" stack_trace: dependency: transitive description: @@ -533,6 +549,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.0" + synchronized: + dependency: transitive + description: + name: synchronized + sha256: "5fcbd27688af6082f5abd611af56ee575342c30e87541d0245f7ff99faa02c60" + url: "https://pub.dev" + source: hosted + version: "3.1.0" term_glyph: dependency: transitive description: @@ -545,34 +569,34 @@ packages: dependency: transitive description: name: test_api - sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206 + sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb url: "https://pub.dev" source: hosted - version: "0.4.16" + version: "0.5.1" typed_data: dependency: transitive description: name: typed_data - sha256: "26f87ade979c47a150c9eaab93ccd2bebe70a27dc0b4b29517f2904f04eb11a5" + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c url: "https://pub.dev" source: hosted - version: "1.3.1" + version: "1.3.2" url_launcher: dependency: "direct main" description: name: url_launcher - sha256: "75f2846facd11168d007529d6cd8fcb2b750186bea046af9711f10b907e1587e" + sha256: eb1e00ab44303d50dd487aab67ebc575456c146c6af44422f9c13889984c00f3 url: "https://pub.dev" source: hosted - version: "6.1.10" + version: "6.1.11" url_launcher_android: dependency: transitive description: name: url_launcher_android - sha256: a52628068d282d01a07cd86e6ba99e497aa45ce8c91159015b2416907d78e411 + sha256: eed4e6a1164aa9794409325c3b707ff424d4d1c2a785e7db67f8bbda00e36e51 url: "https://pub.dev" source: hosted - version: "6.0.27" + version: "6.0.35" url_launcher_ios: dependency: transitive description: @@ -585,10 +609,10 @@ packages: dependency: transitive description: name: url_launcher_linux - sha256: "206fb8334a700ef7754d6a9ed119e7349bc830448098f21a69bf1b4ed038cabc" + sha256: "207f4ddda99b95b4d4868320a352d374b0b7e05eefad95a4a26f57da413443f5" url: "https://pub.dev" source: hosted - version: "3.0.4" + version: "3.0.5" url_launcher_macos: dependency: transitive description: @@ -609,18 +633,18 @@ packages: dependency: transitive description: name: url_launcher_web - sha256: "81fe91b6c4f84f222d186a9d23c73157dc4c8e1c71489c4d08be1ad3b228f1aa" + sha256: "6bb1e5d7fe53daf02a8fee85352432a40b1f868a81880e99ec7440113d5cfcab" url: "https://pub.dev" source: hosted - version: "2.0.16" + version: "2.0.17" url_launcher_windows: dependency: transitive description: name: url_launcher_windows - sha256: a83ba3607a507758669cfafb03f9de09bf6e6280c14d9b9cb18f013e406dcacd + sha256: "254708f17f7c20a9c8c471f67d86d76d4a3f9c1591aad1e15292008aceb82771" url: "https://pub.dev" source: hosted - version: "3.0.5" + version: "3.0.6" uuid: dependency: transitive description: @@ -645,14 +669,46 @@ packages: url: "https://pub.dev" source: hosted version: "0.3.3" + webview_flutter: + dependency: transitive + description: + name: webview_flutter + sha256: "5604dac1178680a34fbe4a08c7b69ec42cca6601dc300009ec9ff69bef284cc2" + url: "https://pub.dev" + source: hosted + version: "4.2.1" + webview_flutter_android: + dependency: transitive + description: + name: webview_flutter_android + sha256: "57a22c86065375c1598b57224f92d6008141be0c877c64100de8bfb6f71083d8" + url: "https://pub.dev" + source: hosted + version: "3.7.1" + webview_flutter_platform_interface: + dependency: transitive + description: + name: webview_flutter_platform_interface + sha256: "656e2aeaef318900fffd21468b6ddc7958c7092a642f0e7220bac328b70d4a81" + url: "https://pub.dev" + source: hosted + version: "2.3.1" + webview_flutter_wkwebview: + dependency: transitive + description: + name: webview_flutter_wkwebview + sha256: "6bbc6ade302b842999b27cbaa7171241c273deea8a9c73f92ceb3d811c767de2" + url: "https://pub.dev" + source: hosted + version: "3.4.4" win32: dependency: transitive description: name: win32 - sha256: dd8f9344bc305ae2923e3d11a2a911d9a4e2c7dd6fe0ed10626d63211a69676e + sha256: "5a751eddf9db89b3e5f9d50c20ab8612296e4e8db69009788d6c8b060a84191c" url: "https://pub.dev" source: hosted - version: "4.1.3" + version: "4.1.4" xdg_directories: dependency: transitive description: @@ -665,18 +721,18 @@ packages: dependency: transitive description: name: xml - sha256: "979ee37d622dec6365e2efa4d906c37470995871fe9ae080d967e192d88286b5" + sha256: "5bc72e1e45e941d825fd7468b9b4cc3b9327942649aeb6fc5cdbf135f0a86e84" url: "https://pub.dev" source: hosted - version: "6.2.2" + version: "6.3.0" yaml: dependency: transitive description: name: yaml - sha256: "23812a9b125b48d4007117254bca50abb6c712352927eece9e155207b1db2370" + sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "3.1.2" sdks: - dart: ">=2.19.0 <3.0.0" + dart: ">=3.0.0 <4.0.0" flutter: ">=3.3.0" diff --git a/pubspec.yaml b/pubspec.yaml index 0f6384d..c50554a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -20,7 +20,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 1.0.0+2 environment: - sdk: '>=2.18.1 <3.0.0' + sdk: '>=3.0.0 <4.0.0' # Dependencies specify other packages that your package needs in order to work. # To automatically upgrade your package dependencies to the latest versions @@ -39,12 +39,13 @@ dependencies: flutter_dotenv: ^5.0.2 shared_preferences: ^2.0.17 url_launcher: ^6.1.10 - google_mobile_ads: ^2.3.0 + google_mobile_ads: ^3.0.0 sentry_flutter: ^7.0.0 firebase_core: ^2.7.0 firebase_analytics: ^10.1.4 - firebase_crashlytics: ^3.0.15 + firebase_crashlytics: ^3.3.1 firebase_performance: ^0.9.0+14 + sqflite: ^2.2.8+4 dev_dependencies: flutter_test: