diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies index fcb351a..d31f5df 100644 --- a/.flutter-plugins-dependencies +++ b/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"firebase_core","path":"/Users/vaibhavbhasin/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.5.2/","dependencies":[]},{"name":"firebase_storage","path":"/Users/vaibhavbhasin/.pub-cache/hosted/pub.dartlang.org/firebase_storage-5.0.1/","dependencies":["firebase_core"]},{"name":"path_provider","path":"/Users/vaibhavbhasin/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.24/","dependencies":[]}],"android":[{"name":"firebase_core","path":"/Users/vaibhavbhasin/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.5.2/","dependencies":[]},{"name":"firebase_storage","path":"/Users/vaibhavbhasin/.pub-cache/hosted/pub.dartlang.org/firebase_storage-5.0.1/","dependencies":["firebase_core"]},{"name":"path_provider","path":"/Users/vaibhavbhasin/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.24/","dependencies":[]}],"macos":[{"name":"firebase_core","path":"/Users/vaibhavbhasin/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.5.2/","dependencies":[]},{"name":"firebase_storage","path":"/Users/vaibhavbhasin/.pub-cache/hosted/pub.dartlang.org/firebase_storage-5.0.1/","dependencies":["firebase_core"]},{"name":"path_provider_macos","path":"/Users/vaibhavbhasin/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-0.0.4+6/","dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/Users/vaibhavbhasin/.pub-cache/hosted/pub.dartlang.org/path_provider_linux-0.0.1+2/","dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"/Users/vaibhavbhasin/.pub-cache/hosted/pub.dartlang.org/path_provider_windows-0.0.4+3/","dependencies":[]}],"web":[{"name":"firebase_core_web","path":"/Users/vaibhavbhasin/.pub-cache/hosted/pub.dartlang.org/firebase_core_web-0.2.1/","dependencies":[]}]},"dependencyGraph":[{"name":"firebase_core","dependencies":["firebase_core_web"]},{"name":"firebase_core_web","dependencies":[]},{"name":"firebase_storage","dependencies":["firebase_core"]},{"name":"path_provider","dependencies":["path_provider_macos","path_provider_linux","path_provider_windows"]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_macos","dependencies":[]},{"name":"path_provider_windows","dependencies":[]}],"date_created":"2020-11-12 13:40:10.347145","version":"1.20.3"} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"firebase_core","path":"/Users/jonmountjoy/.pub-cache/hosted/pub.dartlang.org/firebase_core-2.1.0/","native_build":true,"dependencies":[]},{"name":"firebase_storage","path":"/Users/jonmountjoy/.pub-cache/hosted/pub.dartlang.org/firebase_storage-11.0.2/","native_build":true,"dependencies":["firebase_core"]},{"name":"path_provider_ios","path":"/Users/jonmountjoy/.pub-cache/hosted/pub.dartlang.org/path_provider_ios-2.0.9/","native_build":true,"dependencies":[]}],"android":[{"name":"firebase_core","path":"/Users/jonmountjoy/.pub-cache/hosted/pub.dartlang.org/firebase_core-2.1.0/","native_build":true,"dependencies":[]},{"name":"firebase_storage","path":"/Users/jonmountjoy/.pub-cache/hosted/pub.dartlang.org/firebase_storage-11.0.2/","native_build":true,"dependencies":["firebase_core"]},{"name":"path_provider_android","path":"/Users/jonmountjoy/.pub-cache/hosted/pub.dartlang.org/path_provider_android-2.0.14/","native_build":true,"dependencies":[]}],"macos":[{"name":"firebase_core","path":"/Users/jonmountjoy/.pub-cache/hosted/pub.dartlang.org/firebase_core-2.1.0/","native_build":true,"dependencies":[]},{"name":"firebase_storage","path":"/Users/jonmountjoy/.pub-cache/hosted/pub.dartlang.org/firebase_storage-11.0.2/","native_build":true,"dependencies":["firebase_core"]},{"name":"path_provider_macos","path":"/Users/jonmountjoy/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-2.0.6/","native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/Users/jonmountjoy/.pub-cache/hosted/pub.dartlang.org/path_provider_linux-2.1.6/","native_build":false,"dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"/Users/jonmountjoy/.pub-cache/hosted/pub.dartlang.org/path_provider_windows-2.0.6/","native_build":false,"dependencies":[]}],"web":[{"name":"cloud_firestore_web","path":"/Users/jonmountjoy/.pub-cache/hosted/pub.dartlang.org/cloud_firestore_web-3.0.2/","dependencies":["firebase_core_web"]},{"name":"firebase_core_web","path":"/Users/jonmountjoy/.pub-cache/hosted/pub.dartlang.org/firebase_core_web-2.0.0/","dependencies":[]},{"name":"firebase_storage_web","path":"/Users/jonmountjoy/.pub-cache/hosted/pub.dartlang.org/firebase_storage_web-3.3.12/","dependencies":["firebase_core_web"]}]},"dependencyGraph":[{"name":"cloud_firestore_web","dependencies":["firebase_core","firebase_core_web"]},{"name":"firebase_core","dependencies":["firebase_core_web"]},{"name":"firebase_core_web","dependencies":[]},{"name":"firebase_storage","dependencies":["firebase_core","firebase_storage_web"]},{"name":"firebase_storage_web","dependencies":["firebase_core","firebase_core_web"]},{"name":"path_provider","dependencies":["path_provider_android","path_provider_ios","path_provider_linux","path_provider_macos","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_ios","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_macos","dependencies":[]},{"name":"path_provider_windows","dependencies":[]}],"date_created":"2022-10-27 13:22:52.529310","version":"3.3.5"} \ No newline at end of file diff --git a/example/flutter_app/assets/placeholder.png b/example/flutter_app/assets/placeholder.png new file mode 100644 index 0000000..309dead Binary files /dev/null and b/example/flutter_app/assets/placeholder.png differ diff --git a/example/flutter_app/ios/Podfile b/example/flutter_app/ios/Podfile index 1e8c3c9..9411102 100644 --- a/example/flutter_app/ios/Podfile +++ b/example/flutter_app/ios/Podfile @@ -1,5 +1,5 @@ # Uncomment this line to define a global platform for your project -# platform :ios, '9.0' +platform :ios, '10.0' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' diff --git a/example/flutter_app/ios/Podfile.lock b/example/flutter_app/ios/Podfile.lock new file mode 100644 index 0000000..047ce6b --- /dev/null +++ b/example/flutter_app/ios/Podfile.lock @@ -0,0 +1,88 @@ +PODS: + - Firebase/CoreOnly (7.3.0): + - FirebaseCore (= 7.3.0) + - Firebase/Storage (7.3.0): + - Firebase/CoreOnly + - FirebaseStorage (~> 7.3.0) + - firebase_core (1.0.2): + - Firebase/CoreOnly (= 7.3.0) + - Flutter + - firebase_storage (8.0.1): + - Firebase/Storage (= 7.3.0) + - firebase_core + - Flutter + - FirebaseCore (7.3.0): + - FirebaseCoreDiagnostics (~> 7.0) + - GoogleUtilities/Environment (~> 7.0) + - GoogleUtilities/Logger (~> 7.0) + - FirebaseCoreDiagnostics (7.8.0): + - GoogleDataTransport (~> 8.0) + - GoogleUtilities/Environment (~> 7.0) + - GoogleUtilities/Logger (~> 7.0) + - nanopb (~> 2.30907.0) + - FirebaseStorage (7.3.0): + - FirebaseCore (~> 7.0) + - GTMSessionFetcher/Core (~> 1.4) + - Flutter (1.0.0) + - GoogleDataTransport (8.2.0): + - nanopb (~> 2.30907.0) + - GoogleUtilities/Environment (7.2.2): + - PromisesObjC (~> 1.2) + - GoogleUtilities/Logger (7.2.2): + - GoogleUtilities/Environment + - GTMSessionFetcher/Core (1.5.0) + - nanopb (2.30907.0): + - nanopb/decode (= 2.30907.0) + - nanopb/encode (= 2.30907.0) + - nanopb/decode (2.30907.0) + - nanopb/encode (2.30907.0) + - path_provider (0.0.1): + - Flutter + - PromisesObjC (1.2.12) + +DEPENDENCIES: + - firebase_core (from `.symlinks/plugins/firebase_core/ios`) + - firebase_storage (from `.symlinks/plugins/firebase_storage/ios`) + - Flutter (from `Flutter`) + - path_provider (from `.symlinks/plugins/path_provider/ios`) + +SPEC REPOS: + trunk: + - Firebase + - FirebaseCore + - FirebaseCoreDiagnostics + - FirebaseStorage + - GoogleDataTransport + - GoogleUtilities + - GTMSessionFetcher + - nanopb + - PromisesObjC + +EXTERNAL SOURCES: + firebase_core: + :path: ".symlinks/plugins/firebase_core/ios" + firebase_storage: + :path: ".symlinks/plugins/firebase_storage/ios" + Flutter: + :path: Flutter + path_provider: + :path: ".symlinks/plugins/path_provider/ios" + +SPEC CHECKSUMS: + Firebase: 26223c695fe322633274198cb19dca8cb7e54416 + firebase_core: e6cbb0d1f7091edfcae31559e58224bfc1e455dc + firebase_storage: 8b44822d4aa2dc43bde4b0755e00f06e76188380 + FirebaseCore: 4d3c72622ce0e2106aaa07bb4b2935ba2c370972 + FirebaseCoreDiagnostics: 066f996579cf097bdad3d7dc9a918d6b9e129c50 + FirebaseStorage: 5002b1895bfe74a5ce92ad54f966e6162d0da2e5 + Flutter: 434fef37c0980e73bb6479ef766c45957d4b510c + GoogleDataTransport: 1024b1a4dfbd7a0e92cb20d7e0a6f1fb66b449a4 + GoogleUtilities: 31c5b01f978a70c6cff2afc6272b3f1921614b43 + GTMSessionFetcher: b3503b20a988c4e20cc189aa798fd18220133f52 + nanopb: 59221d7f958fb711001e6a449489542d92ae113e + path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c + PromisesObjC: 3113f7f76903778cf4a0586bd1ab89329a0b7b97 + +PODFILE CHECKSUM: fe0e1ee7f3d1f7d00b11b474b62dd62134535aea + +COCOAPODS: 1.10.1 diff --git a/example/flutter_app/ios/Runner.xcodeproj/project.pbxproj b/example/flutter_app/ios/Runner.xcodeproj/project.pbxproj index 926b44e..2c80171 100644 --- a/example/flutter_app/ios/Runner.xcodeproj/project.pbxproj +++ b/example/flutter_app/ios/Runner.xcodeproj/project.pbxproj @@ -10,6 +10,7 @@ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 805CE2A0B33A35AFBFAB075A /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EA4174B99B0023F6470A88DF /* Pods_Runner.framework */; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; @@ -31,7 +32,9 @@ /* Begin PBXFileReference section */ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 1B5DBA8F0F7AB90C4B587728 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 48D89A8F18C2C438C83EAC68 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; @@ -42,6 +45,8 @@ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + A8A5BE5753495BC639EF8686 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; + EA4174B99B0023F6470A88DF /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -49,12 +54,21 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 805CE2A0B33A35AFBFAB075A /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 7CBC5C45987096D13B6E4457 /* Frameworks */ = { + isa = PBXGroup; + children = ( + EA4174B99B0023F6470A88DF /* Pods_Runner.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; 9740EEB11CF90186004384FC /* Flutter */ = { isa = PBXGroup; children = ( @@ -72,6 +86,8 @@ 9740EEB11CF90186004384FC /* Flutter */, 97C146F01CF9000F007C117D /* Runner */, 97C146EF1CF9000F007C117D /* Products */, + E22D22C3B2534677BCCC99CF /* Pods */, + 7CBC5C45987096D13B6E4457 /* Frameworks */, ); sourceTree = ""; }; @@ -98,6 +114,17 @@ path = Runner; sourceTree = ""; }; + E22D22C3B2534677BCCC99CF /* Pods */ = { + isa = PBXGroup; + children = ( + A8A5BE5753495BC639EF8686 /* Pods-Runner.debug.xcconfig */, + 48D89A8F18C2C438C83EAC68 /* Pods-Runner.release.xcconfig */, + 1B5DBA8F0F7AB90C4B587728 /* Pods-Runner.profile.xcconfig */, + ); + name = Pods; + path = Pods; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -105,12 +132,14 @@ isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( + 8CF51205BFD5C7F5D15AB8F8 /* [CP] Check Pods Manifest.lock */, 9740EEB61CF901F6004384FC /* Run Script */, 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + 54D66864A177ED9E4A9DD9BE /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -183,6 +212,45 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; }; + 54D66864A177ED9E4A9DD9BE /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + 8CF51205BFD5C7F5D15AB8F8 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; diff --git a/example/flutter_app/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/example/flutter_app/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata index 1d526a1..919434a 100644 --- a/example/flutter_app/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/example/flutter_app/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -2,6 +2,6 @@ + location = "self:"> diff --git a/example/flutter_app/ios/Runner.xcworkspace/contents.xcworkspacedata b/example/flutter_app/ios/Runner.xcworkspace/contents.xcworkspacedata index 1d526a1..21a3cc1 100644 --- a/example/flutter_app/ios/Runner.xcworkspace/contents.xcworkspacedata +++ b/example/flutter_app/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -4,4 +4,7 @@ + + diff --git a/example/flutter_app/lib/main.dart b/example/flutter_app/lib/main.dart index 6dee469..77622ad 100644 --- a/example/flutter_app/lib/main.dart +++ b/example/flutter_app/lib/main.dart @@ -32,7 +32,7 @@ class MyApp extends StatelessWidget { } class MyHomePage extends StatefulWidget { - MyHomePage({Key key, this.title}) : super(key: key); + MyHomePage({Key? key, this.title}) : super(key: key); // This widget is the home page of your application. It is stateful, meaning // that it has a State object (defined below) that contains fields that affect @@ -43,7 +43,7 @@ class MyHomePage extends StatefulWidget { // used by the build method of the State. Fields in a Widget subclass are // always marked "final". - final String title; + final String? title; @override _MyHomePageState createState() => _MyHomePageState(); @@ -76,7 +76,7 @@ class _MyHomePageState extends State { // Here we take the value from the MyHomePage object that was created by // the App.build method, and use it to set our appbar title. title: Text( - widget.title, + widget.title!, style: TextStyle(color: CupertinoColors.black), ), ), diff --git a/example/flutter_app/pubspec.lock b/example/flutter_app/pubspec.lock index e8fe1b2..31d7c61 100644 --- a/example/flutter_app/pubspec.lock +++ b/example/flutter_app/pubspec.lock @@ -7,42 +7,42 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.4.2" + version: "2.8.2" boolean_selector: dependency: transitive description: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.1.0" characters: dependency: transitive description: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.2.0" charcode: dependency: transitive description: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.1.3" + version: "1.3.1" clock: dependency: transitive description: name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.0.1" + version: "1.1.0" collection: dependency: transitive description: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.14.13" + version: "1.16.0" cupertino_icons: dependency: "direct main" description: @@ -56,56 +56,63 @@ packages: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.3.0" ffi: dependency: transitive description: name: ffi url: "https://pub.dartlang.org" source: hosted - version: "0.1.3" + version: "1.0.0" file: dependency: transitive description: name: file url: "https://pub.dartlang.org" source: hosted - version: "5.2.1" + version: "6.1.0" firebase_core: dependency: transitive description: name: firebase_core url: "https://pub.dartlang.org" source: hosted - version: "0.5.2" + version: "1.5.0" firebase_core_platform_interface: dependency: transitive description: name: firebase_core_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "4.0.1" firebase_core_web: dependency: transitive description: name: firebase_core_web url: "https://pub.dartlang.org" source: hosted - version: "0.2.1" + version: "1.1.0" firebase_storage: dependency: transitive description: name: firebase_storage url: "https://pub.dartlang.org" source: hosted - version: "5.0.1" + version: "10.0.2" firebase_storage_platform_interface: dependency: transitive description: name: firebase_storage_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "1.0.1" + version: "4.0.1" + firebase_storage_web: + dependency: transitive + description: + name: firebase_storage_web + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.1" flutter: dependency: "direct main" description: flutter @@ -121,104 +128,118 @@ packages: description: flutter source: sdk version: "0.0.0" - intl: + http: + dependency: transitive + description: + name: http + url: "https://pub.dartlang.org" + source: hosted + version: "0.13.1" + http_parser: dependency: transitive description: - name: intl + name: http_parser url: "https://pub.dartlang.org" source: hosted - version: "0.16.1" + version: "4.0.0" js: dependency: transitive description: name: js url: "https://pub.dartlang.org" source: hosted - version: "0.6.2" + version: "0.6.4" matcher: dependency: transitive description: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.8" + version: "0.12.11" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.4" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.1.8" + version: "1.7.0" path: dependency: transitive description: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.7.0" + version: "1.8.1" path_provider: dependency: "direct main" description: name: path_provider url: "https://pub.dartlang.org" source: hosted - version: "1.6.24" + version: "2.0.2" path_provider_linux: dependency: transitive description: name: path_provider_linux url: "https://pub.dartlang.org" source: hosted - version: "0.0.1+2" + version: "2.0.0" path_provider_macos: dependency: transitive description: name: path_provider_macos url: "https://pub.dartlang.org" source: hosted - version: "0.0.4+6" + version: "2.0.0" path_provider_platform_interface: dependency: transitive description: name: path_provider_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "1.0.4" + version: "2.0.1" path_provider_windows: dependency: transitive description: name: path_provider_windows url: "https://pub.dartlang.org" source: hosted - version: "0.0.4+3" + version: "2.0.0" + pedantic: + dependency: transitive + description: + name: pedantic + url: "https://pub.dartlang.org" + source: hosted + version: "1.11.0" platform: dependency: transitive description: name: platform url: "https://pub.dartlang.org" source: hosted - version: "2.2.1" + version: "3.0.0" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "1.0.3" + version: "2.0.0" process: dependency: transitive description: name: process url: "https://pub.dartlang.org" source: hosted - version: "3.0.13" - quiver: - dependency: transitive - description: - name: quiver - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.5" + version: "4.2.1" sky_engine: dependency: transitive description: flutter @@ -230,77 +251,77 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.7.0" + version: "1.8.2" stack_trace: dependency: transitive description: name: stack_trace url: "https://pub.dartlang.org" source: hosted - version: "1.9.5" + version: "1.10.0" stream_channel: dependency: transitive description: name: stream_channel url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.1.0" string_scanner: dependency: transitive description: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.0.5" + version: "1.1.0" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.2.0" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.17" + version: "0.4.9" typed_data: dependency: transitive description: name: typed_data url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.3.0" vb_image_cache: dependency: "direct main" description: path: "../.." relative: true source: path - version: "1.0.0" + version: "2.0.1" vector_math: dependency: transitive description: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.0.8" + version: "2.1.2" win32: dependency: transitive description: name: win32 url: "https://pub.dartlang.org" source: hosted - version: "1.7.3" + version: "2.0.5" xdg_directories: dependency: transitive description: name: xdg_directories url: "https://pub.dartlang.org" source: hosted - version: "0.1.0" + version: "0.2.0" sdks: - dart: ">=2.9.0-14.0.dev <3.0.0" - flutter: ">=1.17.0 <2.0.0" + dart: ">=2.17.0-0 <3.0.0" + flutter: ">=1.20.0" diff --git a/example/flutter_app/pubspec.yaml b/example/flutter_app/pubspec.yaml index a80ca3e..08f54f4 100644 --- a/example/flutter_app/pubspec.yaml +++ b/example/flutter_app/pubspec.yaml @@ -15,16 +15,16 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.0.0+1 +version: 1.0.0+2 environment: - sdk: ">=2.7.0 <3.0.0" + sdk: '>=2.12.0 <3.0.0' dependencies: flutter: sdk: flutter - path_provider: ^1.6.24 + path_provider: ^2.0.2 vb_image_cache: path: ../../ @@ -48,9 +48,8 @@ flutter: uses-material-design: true # To add assets to your application, add an assets section, like this: - # assets: - # - images/a_dot_burr.jpeg - # - images/a_dot_ham.jpeg + assets: + - assets/placeholder.png # An image asset can refer to one or more resolution-specific "variants", see # https://flutter.dev/assets-and-images/#resolution-aware. diff --git a/lib/vb_image_cache.dart b/lib/vb_image_cache.dart index 7b99cd1..1b998b0 100644 --- a/lib/vb_image_cache.dart +++ b/lib/vb_image_cache.dart @@ -8,7 +8,6 @@ */ import 'dart:async'; -import 'dart:typed_data'; import 'dart:ui'; import 'package:flutter/cupertino.dart'; @@ -25,7 +24,8 @@ class VBCacheImage extends ImageProvider { this.durationMultiplier = 1.5, this.durationExpiration = const Duration(seconds: 10), }) : assert(url != null), - _resource = VBResource(url, duration, durationMultiplier, durationExpiration); + _resource = + VBResource(url, duration, durationMultiplier, durationExpiration); /// The scale to place in the [ImageInfo] object of the image. final double scale; @@ -45,7 +45,7 @@ class VBCacheImage extends ImageProvider { VBResource _resource; Future _fetchImage() async { - Uint8List file; + Uint8List? file; await _resource.init(); final bool check = await _resource.checkFile(); if (check) { @@ -53,10 +53,10 @@ class VBCacheImage extends ImageProvider { } else { file = await _resource.storeFile(); } - if (file.length > 0) { + if (file!.length > 0) { return PaintingBinding.instance.instantiateImageCodec(file); } - return null; + throw Error; } @override @@ -70,7 +70,8 @@ class VBCacheImage extends ImageProvider { codec: key._fetchImage(), scale: key.scale, informationCollector: () sync* { - yield DiagnosticsProperty('Image provider: $this \n Image key: $key', this, + yield DiagnosticsProperty( + 'Image provider: $this \n Image key: $key', this, style: DiagnosticsTreeStyle.errorProperty); }); } diff --git a/lib/vb_resource.dart b/lib/vb_resource.dart index e6342a3..d9fd37d 100644 --- a/lib/vb_resource.dart +++ b/lib/vb_resource.dart @@ -8,7 +8,6 @@ */ import 'dart:io'; -import 'dart:typed_data'; import 'package:firebase_storage/firebase_storage.dart'; import 'package:flutter/foundation.dart'; @@ -20,14 +19,14 @@ class VBResource { final double durationMultiplier; final Duration durationExpiration; - Uri _temp; - Uri _local; - Uri _remote; + late Uri _temp; + late Uri _local; + late Uri _remote; Duration _retry; - VBResource(this.uri, this.duration, this.durationMultiplier, this.durationExpiration) - : assert(uri != null), - _retry = duration; + VBResource( + this.uri, this.duration, this.durationMultiplier, this.durationExpiration) + : _retry = duration; Uri get remote => _remote; Uri get temp => _temp; @@ -58,7 +57,7 @@ class VBResource { return false; } - Future getFile() async { + Future getFile() async { final File file = File(_local.path); if (file.existsSync() && file.lengthSync() > 0) { return file.readAsBytesSync(); @@ -81,8 +80,9 @@ class VBResource { HttpClient httpClient = new HttpClient(); final HttpClientRequest request = await httpClient.getUrl(_remote); final HttpClientResponse response = await request.close(); - final Uint8List bytes = - await consolidateHttpClientResponseBytes(response, autoUncompress: false); + final Uint8List bytes = await consolidateHttpClientResponseBytes( + response, + autoUncompress: false); file = await file.writeAsBytes(bytes); } catch (err) { _retry += _retry * this.durationMultiplier; diff --git a/pubspec.lock b/pubspec.lock index 32058aa..69e1bab 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1,104 +1,132 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: + _flutterfire_internals: + dependency: transitive + description: + name: _flutterfire_internals + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.5" async: dependency: transitive description: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.4.2" + version: "2.9.0" boolean_selector: dependency: transitive description: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.1.0" characters: dependency: transitive description: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.2.1" charcode: dependency: transitive description: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.1.3" + version: "1.3.1" clock: dependency: transitive description: name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.0.1" + version: "1.1.1" + cloud_firestore_platform_interface: + dependency: transitive + description: + name: cloud_firestore_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "5.8.2" + cloud_firestore_web: + dependency: transitive + description: + name: cloud_firestore_web + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.2" collection: dependency: transitive description: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.14.13" + version: "1.16.0" fake_async: dependency: transitive description: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.3.1" ffi: dependency: transitive description: name: ffi url: "https://pub.dartlang.org" source: hosted - version: "0.1.3" + version: "1.2.1" file: dependency: transitive description: name: file url: "https://pub.dartlang.org" source: hosted - version: "5.2.1" + version: "6.1.2" firebase_core: dependency: transitive description: name: firebase_core url: "https://pub.dartlang.org" source: hosted - version: "0.5.2" + version: "2.1.0" firebase_core_platform_interface: dependency: transitive description: name: firebase_core_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "4.5.1" firebase_core_web: dependency: transitive description: name: firebase_core_web url: "https://pub.dartlang.org" source: hosted - version: "0.2.1" + version: "2.0.0" firebase_storage: dependency: "direct main" description: name: firebase_storage url: "https://pub.dartlang.org" source: hosted - version: "5.0.1" + version: "11.0.2" firebase_storage_platform_interface: dependency: transitive description: name: firebase_storage_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "1.0.1" + version: "4.1.21" + firebase_storage_web: + dependency: transitive + description: + name: firebase_storage_web + url: "https://pub.dartlang.org" + source: hosted + version: "3.3.12" flutter: dependency: "direct main" description: flutter @@ -114,104 +142,125 @@ packages: description: flutter source: sdk version: "0.0.0" - intl: + http: + dependency: transitive + description: + name: http + url: "https://pub.dartlang.org" + source: hosted + version: "0.13.4" + http_parser: dependency: transitive description: - name: intl + name: http_parser url: "https://pub.dartlang.org" source: hosted - version: "0.16.1" + version: "4.0.0" js: dependency: transitive description: name: js url: "https://pub.dartlang.org" source: hosted - version: "0.6.2" + version: "0.6.4" matcher: dependency: transitive description: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.8" + version: "0.12.12" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.5" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.1.8" + version: "1.8.0" path: dependency: transitive description: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.7.0" + version: "1.8.2" path_provider: dependency: "direct main" description: name: path_provider url: "https://pub.dartlang.org" source: hosted - version: "1.6.24" + version: "2.0.11" + path_provider_android: + dependency: transitive + description: + name: path_provider_android + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.14" + path_provider_ios: + dependency: transitive + description: + name: path_provider_ios + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.9" path_provider_linux: dependency: transitive description: name: path_provider_linux url: "https://pub.dartlang.org" source: hosted - version: "0.0.1+2" + version: "2.1.6" path_provider_macos: dependency: transitive description: name: path_provider_macos url: "https://pub.dartlang.org" source: hosted - version: "0.0.4+6" + version: "2.0.6" path_provider_platform_interface: dependency: transitive description: name: path_provider_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "1.0.4" + version: "2.0.4" path_provider_windows: dependency: transitive description: name: path_provider_windows url: "https://pub.dartlang.org" source: hosted - version: "0.0.4+3" + version: "2.0.6" platform: dependency: transitive description: name: platform url: "https://pub.dartlang.org" source: hosted - version: "2.2.1" + version: "3.1.0" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "1.0.3" + version: "2.1.2" process: dependency: transitive description: name: process url: "https://pub.dartlang.org" source: hosted - version: "3.0.13" - quiver: - dependency: transitive - description: - name: quiver - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.5" + version: "4.2.4" sky_engine: dependency: transitive description: flutter @@ -223,70 +272,70 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.7.0" + version: "1.9.0" stack_trace: dependency: transitive description: name: stack_trace url: "https://pub.dartlang.org" source: hosted - version: "1.9.5" + version: "1.10.0" stream_channel: dependency: transitive description: name: stream_channel url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.1.0" string_scanner: dependency: transitive description: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.0.5" + version: "1.1.1" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.2.1" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.17" + version: "0.4.12" typed_data: dependency: transitive description: name: typed_data url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.3.1" vector_math: dependency: transitive description: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.0.8" + version: "2.1.2" win32: dependency: transitive description: name: win32 url: "https://pub.dartlang.org" source: hosted - version: "1.7.3" + version: "2.6.1" xdg_directories: dependency: transitive description: name: xdg_directories url: "https://pub.dartlang.org" source: hosted - version: "0.1.0" + version: "0.2.0+1" sdks: - dart: ">=2.9.0-14.0.dev <3.0.0" - flutter: ">=1.17.0 <2.0.0" + dart: ">=2.17.0 <3.0.0" + flutter: ">=2.8.1" diff --git a/pubspec.yaml b/pubspec.yaml index 7c417a4..991a2c4 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,20 +1,17 @@ name: vb_image_cache description: A new Flutter package for caching images -version: 1.0.0 -author: Vaibhav Bhasin +version: 2.1.1 homepage: https://github.com/Root-vb/VBCacheImage environment: - sdk: ">=2.7.0 <3.0.0" - flutter: ">=1.17.0 <2.0.0" + sdk: '>=3.2.2 <4.0.0' dependencies: flutter: sdk: flutter - - firebase_storage: ^5.0.1 - path_provider: ^1.6.24 + firebase_storage: ^11.0.2 + path_provider: ^2.1.1 dev_dependencies: flutter_test: