From 1101e4dc6014e8bddebb585896e9d8faee9007af Mon Sep 17 00:00:00 2001 From: Sol Mendiola Date: Fri, 12 Jan 2024 17:59:08 -0300 Subject: [PATCH] added upgrader --- android/app/src/debug/google-services.json | 82 +++++++++++++++++ ios/Podfile.lock | 14 ++- lib/ui/home/home_screen.dart | 11 ++- macos/Flutter/GeneratedPluginRegistrant.swift | 28 ++++++ .../ephemeral/Flutter-Generated.xcconfig | 11 +++ .../ephemeral/flutter_export_environment.sh | 12 +++ macos/Podfile | 43 +++++++++ pubspec.lock | 92 ++++++++++++++----- pubspec.yaml | 7 +- 9 files changed, 270 insertions(+), 30 deletions(-) create mode 100644 android/app/src/debug/google-services.json create mode 100644 macos/Flutter/GeneratedPluginRegistrant.swift create mode 100644 macos/Flutter/ephemeral/Flutter-Generated.xcconfig create mode 100755 macos/Flutter/ephemeral/flutter_export_environment.sh create mode 100644 macos/Podfile diff --git a/android/app/src/debug/google-services.json b/android/app/src/debug/google-services.json new file mode 100644 index 0000000..0b2cc9f --- /dev/null +++ b/android/app/src/debug/google-services.json @@ -0,0 +1,82 @@ +{ + "project_info": { + "project_number": "224717134894", + "project_id": "fluttips", + "storage_bucket": "fluttips.appspot.com" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:224717134894:android:8df4c91ab01909b54c13bf", + "android_client_info": { + "package_name": "com.xmartlabs.fluttips" + } + }, + "oauth_client": [ + { + "client_id": "224717134894-r5f645r3ncndvi9dujq1n6odjic63djh.apps.googleusercontent.com", + "client_type": 3 + } + ], + "api_key": [ + { + "current_key": "AIzaSyALYy8JM2cjNC9mTwlz8PGMUmsVEwaB63o" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [ + { + "client_id": "224717134894-r5f645r3ncndvi9dujq1n6odjic63djh.apps.googleusercontent.com", + "client_type": 3 + }, + { + "client_id": "224717134894-7807qck2frrqla6iaru71r1u31jd7dk1.apps.googleusercontent.com", + "client_type": 2, + "ios_info": { + "bundle_id": "com.xmartlabs.fluttips" + } + } + ] + } + } + }, + { + "client_info": { + "mobilesdk_app_id": "1:224717134894:android:33d7825a902bae2e4c13bf", + "android_client_info": { + "package_name": "com.xmartlabs.fluttips.dev" + } + }, + "oauth_client": [ + { + "client_id": "224717134894-r5f645r3ncndvi9dujq1n6odjic63djh.apps.googleusercontent.com", + "client_type": 3 + } + ], + "api_key": [ + { + "current_key": "AIzaSyALYy8JM2cjNC9mTwlz8PGMUmsVEwaB63o" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [ + { + "client_id": "224717134894-r5f645r3ncndvi9dujq1n6odjic63djh.apps.googleusercontent.com", + "client_type": 3 + }, + { + "client_id": "224717134894-7807qck2frrqla6iaru71r1u31jd7dk1.apps.googleusercontent.com", + "client_type": 2, + "ios_info": { + "bundle_id": "com.xmartlabs.fluttips" + } + } + ] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/ios/Podfile.lock b/ios/Podfile.lock index db321dc..0bab02e 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -3,6 +3,8 @@ PODS: - bugsee_flutter (5.0.2): - Bugsee (= 3.2.1) - Flutter + - device_info_plus (0.0.1): + - Flutter - Firebase/CoreOnly (10.18.0): - FirebaseCore (= 10.18.0) - Firebase/Crashlytics (10.18.0): @@ -91,6 +93,7 @@ PODS: DEPENDENCIES: - bugsee_flutter (from `.symlinks/plugins/bugsee_flutter/ios`) + - device_info_plus (from `.symlinks/plugins/device_info_plus/ios`) - firebase_core (from `.symlinks/plugins/firebase_core/ios`) - firebase_crashlytics (from `.symlinks/plugins/firebase_crashlytics/ios`) - Flutter (from `Flutter`) @@ -99,7 +102,7 @@ DEPENDENCIES: - flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`) - package_info_plus (from `.symlinks/plugins/package_info_plus/ios`) - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) - - 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`) @@ -124,6 +127,8 @@ SPEC REPOS: EXTERNAL SOURCES: bugsee_flutter: :path: ".symlinks/plugins/bugsee_flutter/ios" + device_info_plus: + :path: ".symlinks/plugins/device_info_plus/ios" firebase_core: :path: ".symlinks/plugins/firebase_core/ios" firebase_crashlytics: @@ -141,7 +146,7 @@ EXTERNAL SOURCES: path_provider_foundation: :path: ".symlinks/plugins/path_provider_foundation/darwin" 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: @@ -152,6 +157,7 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: Bugsee: bee7c99744047186669df53f8b7ed77cb50ef2f1 bugsee_flutter: ef54a68c4fa59caf82f8954bbf03156965e7b6c4 + device_info_plus: c6fb39579d0f423935b0c9ce7ee2f44b71b9fce6 Firebase: 414ad272f8d02dfbf12662a9d43f4bba9bec2a06 firebase_core: 0af4a2b24f62071f9bf283691c0ee41556dcb3f5 firebase_crashlytics: 55714f63ae0973c54b3a721c451ae5f815086c1f @@ -173,11 +179,11 @@ SPEC CHECKSUMS: path_provider_foundation: 37748e03f12783f9de2cb2c4eadfaa25fe6d4852 PromisesObjC: c50d2056b5253dadbd6c2bea79b0674bd5a52fa4 PromisesSwift: 28dca69a9c40779916ac2d6985a0192a5cb4a265 - shared_preferences_foundation: 297b3ebca31b34ec92be11acd7fb0ba932c822ca + shared_preferences_foundation: b4c3b4cddf1c21f02770737f147a3f5da9d39695 sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904 url_launcher_ios: ae1517e5e344f5544fb090b079e11f399dfbe4d2 webview_flutter_wkwebview: b7e70ef1ddded7e69c796c7390ee74180182971f -PODFILE CHECKSUM: 4e8f8b2be68aeea4c0d5beb6ff1e79fface1d048 +PODFILE CHECKSUM: 989d81c492c14dc649311e4e03b91db276355942 COCOAPODS: 1.14.3 diff --git a/lib/ui/home/home_screen.dart b/lib/ui/home/home_screen.dart index 788816b..026d711 100644 --- a/lib/ui/home/home_screen.dart +++ b/lib/ui/home/home_screen.dart @@ -9,6 +9,7 @@ import 'package:fluttips/ui/home/home_cubit.dart'; import 'package:fluttips/ui/section/error_handler/error_handler_cubit.dart'; import 'package:fluttips/ui/section/global_ui/global_ui_cubit.dart'; import 'package:fluttips/core/common/config.dart'; +import 'package:upgrader/upgrader.dart'; class HomeScreen extends StatelessWidget { const HomeScreen({ @@ -49,7 +50,15 @@ class _HomeContentScreenState extends State { floatingActionButtonLocation: FloatingActionButtonLocation.startFloat, floatingActionButton: _buildFab(showUIActionComponent), backgroundColor: context.theme.colors.background, - body: SafeArea(child: child), + body: SafeArea( + child: UpgradeAlert( + upgrader: Upgrader( + debugLogging: true, + showIgnore: false, + durationUntilAlertAgain: Duration(milliseconds: 50), + ), + child: child,), + ), drawer: AppDrawer( tabsController: AutoTabsRouter.of(context), action: () => _scaffoldKey.currentState!.closeDrawer(), diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift new file mode 100644 index 0000000..dc38d43 --- /dev/null +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -0,0 +1,28 @@ +// +// Generated file. Do not edit. +// + +import FlutterMacOS +import Foundation + +import device_info_plus +import firebase_core +import firebase_crashlytics +import flutter_secure_storage_macos +import package_info_plus +import path_provider_foundation +import shared_preferences_foundation +import sqflite +import url_launcher_macos + +func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { + DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin")) + FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin")) + FLTFirebaseCrashlyticsPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCrashlyticsPlugin")) + FlutterSecureStoragePlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStoragePlugin")) + FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin")) + PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) + SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) + SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin")) + UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) +} diff --git a/macos/Flutter/ephemeral/Flutter-Generated.xcconfig b/macos/Flutter/ephemeral/Flutter-Generated.xcconfig new file mode 100644 index 0000000..5913d9b --- /dev/null +++ b/macos/Flutter/ephemeral/Flutter-Generated.xcconfig @@ -0,0 +1,11 @@ +// This is a generated file; do not edit or check into version control. +FLUTTER_ROOT=/Users/solmendiola/fvm/versions/3.13.8 +FLUTTER_APPLICATION_PATH=/Users/solmendiola/Documents/fluttipsss/fluttips +COCOAPODS_PARALLEL_CODE_SIGN=true +FLUTTER_BUILD_DIR=build +FLUTTER_BUILD_NAME=1.0.2 +FLUTTER_BUILD_NUMBER=1.0.2 +DART_OBFUSCATION=false +TRACK_WIDGET_CREATION=true +TREE_SHAKE_ICONS=false +PACKAGE_CONFIG=.dart_tool/package_config.json diff --git a/macos/Flutter/ephemeral/flutter_export_environment.sh b/macos/Flutter/ephemeral/flutter_export_environment.sh new file mode 100755 index 0000000..fc63f40 --- /dev/null +++ b/macos/Flutter/ephemeral/flutter_export_environment.sh @@ -0,0 +1,12 @@ +#!/bin/sh +# This is a generated file; do not edit or check into version control. +export "FLUTTER_ROOT=/Users/solmendiola/fvm/versions/3.13.8" +export "FLUTTER_APPLICATION_PATH=/Users/solmendiola/Documents/fluttipsss/fluttips" +export "COCOAPODS_PARALLEL_CODE_SIGN=true" +export "FLUTTER_BUILD_DIR=build" +export "FLUTTER_BUILD_NAME=1.0.2" +export "FLUTTER_BUILD_NUMBER=1.0.2" +export "DART_OBFUSCATION=false" +export "TRACK_WIDGET_CREATION=true" +export "TREE_SHAKE_ICONS=false" +export "PACKAGE_CONFIG=.dart_tool/package_config.json" diff --git a/macos/Podfile b/macos/Podfile new file mode 100644 index 0000000..c795730 --- /dev/null +++ b/macos/Podfile @@ -0,0 +1,43 @@ +platform :osx, '10.14' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\"" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_macos_podfile_setup + +target 'Runner' do + use_frameworks! + use_modular_headers! + + flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__)) + target 'RunnerTests' do + inherit! :search_paths + end +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_macos_build_settings(target) + end +end diff --git a/pubspec.lock b/pubspec.lock index c2747bf..f617f63 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -281,6 +281,22 @@ packages: url: "https://pub.dev" source: hosted version: "0.15.7+1" + device_info_plus: + dependency: transitive + description: + name: device_info_plus + sha256: "0042cb3b2a76413ea5f8a2b40cec2a33e01d0c937e91f0f7c211fde4f7739ba6" + url: "https://pub.dev" + source: hosted + version: "9.1.1" + device_info_plus_platform_interface: + dependency: transitive + description: + name: device_info_plus_platform_interface + sha256: d3b01d5868b50ae571cd1dc6e502fc94d956b665756180f7b16ead09e836fd64 + url: "https://pub.dev" + source: hosted + version: "7.0.0" dio: dependency: "direct main" description: @@ -601,10 +617,10 @@ packages: dependency: transitive description: name: html - sha256: d9793e10dbe0e6c364f4c59bf3e01fb33a9b2a674bc7a1081693dba0614b6269 + sha256: "3a7812d5bcd2894edf53dfaf8cd640876cf6cef50a8f238745c8b8120ea74d3a" url: "https://pub.dev" source: hosted - version: "0.15.1" + version: "0.15.4" http: dependency: transitive description: @@ -781,6 +797,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.1" + os_detect: + dependency: transitive + description: + name: os_detect + sha256: faf3bcf39515e64da8ff76b2f2805b20a6ff47ae515393e535f8579ff91d6b7f + url: "https://pub.dev" + source: hosted + version: "2.0.1" package_config: dependency: transitive description: @@ -873,10 +897,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" photo_view: dependency: "direct main" description: @@ -969,58 +993,58 @@ packages: dependency: "direct main" description: name: shared_preferences - sha256: "95688ad7fc320f8566f28e2ee91b6743c10b433ccc262f6469f3007f2aa62e78" + sha256: "16d3fb6b3692ad244a695c0183fca18cf81fd4b821664394a781de42386bf022" url: "https://pub.dev" source: hosted - version: "2.0.16" + version: "2.1.1" shared_preferences_android: dependency: transitive description: name: shared_preferences_android - sha256: "955e9736a12ba776bdd261cf030232b30eadfcd9c79b32a3250dd4a494e8c8f7" + sha256: "8568a389334b6e83415b6aae55378e158fbc2314e074983362d20c562780fb06" url: "https://pub.dev" source: hosted - version: "2.0.15" + version: "2.2.1" shared_preferences_foundation: dependency: transitive description: name: shared_preferences_foundation - sha256: "1ffa239043ab8baf881ec3094a3c767af9d10399b2839020b9e4d44c0bb23951" + sha256: "7708d83064f38060c7b39db12aefe449cb8cdc031d6062280087bc4cdb988f5c" url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.3.5" shared_preferences_linux: dependency: transitive description: name: shared_preferences_linux - sha256: f8ea038aa6da37090093974ebdcf4397010605fd2ff65c37a66f9d28394cb874 + sha256: "9f2cbcf46d4270ea8be39fa156d86379077c8a5228d9dfdb1164ae0bb93f1faa" url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "2.3.2" shared_preferences_platform_interface: dependency: transitive description: name: shared_preferences_platform_interface - sha256: da9431745ede5ece47bc26d5d73a9d3c6936ef6945c101a5aca46f62e52c1cf3 + sha256: d4ec5fc9ebb2f2e056c617112aa75dcf92fc2e4faaf2ae999caa297473f75d8a url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.3.1" shared_preferences_web: dependency: transitive description: name: shared_preferences_web - sha256: a4b5bc37fe1b368bbc81f953197d55e12f49d0296e7e412dfe2d2d77d6929958 + sha256: d762709c2bbe80626ecc819143013cc820fa49ca5e363620ee20a8b15a3e3daf url: "https://pub.dev" source: hosted - version: "2.0.4" + version: "2.2.1" shared_preferences_windows: dependency: transitive description: name: shared_preferences_windows - sha256: "5eaf05ae77658d3521d0e993ede1af962d4b326cd2153d312df716dc250f00c9" + sha256: "841ad54f3c8381c480d0c9b508b89a34036f512482c407e6df7a9c4aa2ef8f59" url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "2.3.2" shelf: dependency: transitive description: @@ -1282,14 +1306,22 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.4" + upgrader: + dependency: "direct main" + description: + name: upgrader + sha256: d63081e43d1daa1d0e4f8177b56311523985ac77c25519d559040e3c14fb947e + url: "https://pub.dev" + source: hosted + version: "8.4.0" url_launcher: dependency: "direct main" description: name: url_launcher - sha256: "3c92b0efb5e9dcb8f846aefabf9f0f739f91682ed486b991ceda51c288e60896" + sha256: eb1e00ab44303d50dd487aab67ebc575456c146c6af44422f9c13889984c00f3 url: "https://pub.dev" source: hosted - version: "6.1.7" + version: "6.1.11" url_launcher_android: dependency: transitive description: @@ -1362,6 +1394,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" + version: + dependency: transitive + description: + name: version + sha256: "3d4140128e6ea10d83da32fef2fa4003fccbf6852217bb854845802f04191f94" + url: "https://pub.dev" + source: hosted + version: "3.0.2" vm_service: dependency: transitive description: @@ -1450,6 +1490,14 @@ packages: url: "https://pub.dev" source: hosted version: "5.0.3" + win32_registry: + dependency: transitive + description: + name: win32_registry + sha256: e4506d60b7244251bc59df15656a3093501c37fb5af02105a944d73eb95be4c9 + url: "https://pub.dev" + source: hosted + version: "1.1.1" xdg_directories: dependency: transitive description: @@ -1462,10 +1510,10 @@ packages: dependency: transitive description: name: xml - sha256: "979ee37d622dec6365e2efa4d906c37470995871fe9ae080d967e192d88286b5" + sha256: "5bc72e1e45e941d825fd7468b9b4cc3b9327942649aeb6fc5cdbf135f0a86e84" url: "https://pub.dev" source: hosted - version: "6.2.2" + version: "6.3.0" xmlstream: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index d4ddfce..2b7bd5f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ description: Flutter trips and tricks. publish_to: 'none' -version: 1.0.7+7 +version: 1.0.2 environment: sdk: ">=3.0.0 <4.0.0" @@ -47,16 +47,17 @@ dependencies: package_info_plus: 4.2.0 photo_view: 0.14.0 rxdart: 0.27.7 - shared_preferences: 2.0.16 + shared_preferences: 2.1.1 sqflite: 2.2.0+3 sqflite_common_ffi: 2.2.1+1 # Used to provide a custom DatabaseFactory sqflite_common_ffi_web: 0.3.2 # Used to provide a custom DatabaseFactory stack_trace: 1.11.0 stock: 1.0.1 styled_text: 7.0.0 - url_launcher: 6.1.7 + url_launcher: 6.1.11 webview_flutter: 4.0.1 webview_flutter_web: 0.2.1 + upgrader: 8.4.0 dev_dependencies: flutter_test: