diff --git a/.metadata b/.metadata index 07694e7..af897ac 100644 --- a/.metadata +++ b/.metadata @@ -4,7 +4,7 @@ # This file should be version controlled and should not be manually edited. version: - revision: 4d7946a68d26794349189cf21b3f68cc6fe61dcb + revision: b22742018b3edf16c6cadd7b76d9db5e7f9064b5 channel: stable project_type: package diff --git a/CHANGELOG.md b/CHANGELOG.md index 56391ee..24e7877 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 1.0.3 + +- **BREAKING CHANGE**: Updated `cloud_firestore` to version 2 +- Update to Flutter 2.2 + ## 1.0.2 - Fix static analysis warning diff --git a/example/.metadata b/example/.metadata index 140b929..54ec0a8 100644 --- a/example/.metadata +++ b/example/.metadata @@ -4,7 +4,7 @@ # This file should be version controlled and should not be manually edited. version: - revision: 4d7946a68d26794349189cf21b3f68cc6fe61dcb + revision: b22742018b3edf16c6cadd7b76d9db5e7f9064b5 channel: stable project_type: app diff --git a/example/android/build.gradle b/example/android/build.gradle index 2c6d077..a2a4cf4 100644 --- a/example/android/build.gradle +++ b/example/android/build.gradle @@ -8,7 +8,7 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:4.1.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - classpath 'com.google.gms:google-services:4.3.5' + classpath 'com.google.gms:google-services:4.3.8' } } @@ -22,8 +22,6 @@ allprojects { rootProject.buildDir = '../build' subprojects { project.buildDir = "${rootProject.buildDir}/${project.name}" -} -subprojects { project.evaluationDependsOn(':app') } diff --git a/example/ios/.gitignore b/example/ios/.gitignore index e96ef60..151026b 100644 --- a/example/ios/.gitignore +++ b/example/ios/.gitignore @@ -18,6 +18,7 @@ Flutter/App.framework Flutter/Flutter.framework Flutter/Flutter.podspec Flutter/Generated.xcconfig +Flutter/ephemeral/ Flutter/app.flx Flutter/app.zip Flutter/flutter_assets/ diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 81005c2..9941975 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -218,8 +218,8 @@ PODS: - BoringSSL-GRPC/Implementation (0.0.7): - BoringSSL-GRPC/Interface (= 0.0.7) - BoringSSL-GRPC/Interface (0.0.7) - - cloud_firestore (1.0.5): - - Firebase/Firestore (= 7.3.0) + - cloud_firestore (2.2.0): + - Firebase/Firestore (= 8.0.0) - firebase_core - Flutter - DKImagePickerController/Core (4.3.2): @@ -256,43 +256,43 @@ PODS: - file_picker (0.0.1): - DKImagePickerController/PhotoGallery - Flutter - - Firebase/Auth (7.3.0): + - Firebase/Auth (8.0.0): - Firebase/CoreOnly - - FirebaseAuth (~> 7.3.0) - - Firebase/CoreOnly (7.3.0): - - FirebaseCore (= 7.3.0) - - Firebase/Firestore (7.3.0): + - FirebaseAuth (~> 8.0.0) + - Firebase/CoreOnly (8.0.0): + - FirebaseCore (= 8.0.0) + - Firebase/Firestore (8.0.0): - Firebase/CoreOnly - - FirebaseFirestore (~> 7.3.0) - - Firebase/Storage (7.3.0): + - FirebaseFirestore (~> 8.0.0) + - Firebase/Storage (8.0.0): - Firebase/CoreOnly - - FirebaseStorage (~> 7.3.0) - - firebase_auth (1.1.0): - - Firebase/Auth (= 7.3.0) + - FirebaseStorage (~> 8.0.0) + - firebase_auth (1.2.0): + - Firebase/Auth (= 8.0.0) - firebase_core - Flutter - - firebase_core (1.0.3): - - Firebase/CoreOnly (= 7.3.0) + - firebase_core (1.2.0): + - Firebase/CoreOnly (= 8.0.0) - Flutter - - firebase_storage (8.0.3): - - Firebase/Storage (= 7.3.0) + - firebase_storage (8.1.0): + - Firebase/Storage (= 8.0.0) - firebase_core - Flutter - - FirebaseAuth (7.3.0): - - FirebaseCore (~> 7.0) - - GoogleUtilities/AppDelegateSwizzler (~> 7.0) - - GoogleUtilities/Environment (~> 7.0) - - GTMSessionFetcher/Core (~> 1.4) - - FirebaseCore (7.3.0): - - FirebaseCoreDiagnostics (~> 7.0) - - GoogleUtilities/Environment (~> 7.0) - - GoogleUtilities/Logger (~> 7.0) - - FirebaseCoreDiagnostics (7.3.0): - - GoogleDataTransport (~> 8.0) - - GoogleUtilities/Environment (~> 7.0) - - GoogleUtilities/Logger (~> 7.0) - - nanopb (~> 2.30906.0) - - FirebaseFirestore (7.3.0): + - FirebaseAuth (8.0.0): + - FirebaseCore (~> 8.0) + - GoogleUtilities/AppDelegateSwizzler (~> 7.4) + - GoogleUtilities/Environment (~> 7.4) + - GTMSessionFetcher/Core (~> 1.5) + - FirebaseCore (8.0.0): + - FirebaseCoreDiagnostics (~> 8.0) + - GoogleUtilities/Environment (~> 7.4) + - GoogleUtilities/Logger (~> 7.4) + - FirebaseCoreDiagnostics (8.0.0): + - GoogleDataTransport (~> 9.0) + - GoogleUtilities/Environment (~> 7.4) + - GoogleUtilities/Logger (~> 7.4) + - nanopb (~> 2.30908.0) + - FirebaseFirestore (8.0.0): - abseil/algorithm (= 0.20200225.0) - abseil/base (= 0.20200225.0) - abseil/memory (= 0.20200225.0) @@ -300,30 +300,32 @@ PODS: - abseil/strings/strings (= 0.20200225.0) - abseil/time (= 0.20200225.0) - abseil/types (= 0.20200225.0) - - FirebaseCore (~> 7.0) + - FirebaseCore (~> 8.0) - "gRPC-C++ (~> 1.28.0)" - leveldb-library (~> 1.22) - - nanopb (~> 2.30906.0) - - FirebaseStorage (7.3.0): - - FirebaseCore (~> 7.0) - - GTMSessionFetcher/Core (~> 1.4) + - nanopb (~> 2.30908.0) + - FirebaseStorage (8.0.0): + - FirebaseCore (~> 8.0) + - GTMSessionFetcher/Core (~> 1.5) - Flutter (1.0.0) - - GoogleDataTransport (8.1.0): - - nanopb (~> 2.30906.0) - - GoogleUtilities/AppDelegateSwizzler (7.3.1): + - GoogleDataTransport (9.0.0): + - GoogleUtilities/Environment (~> 7.2) + - nanopb (~> 2.30908.0) + - PromisesObjC (~> 1.2) + - GoogleUtilities/AppDelegateSwizzler (7.4.1): - GoogleUtilities/Environment - GoogleUtilities/Logger - GoogleUtilities/Network - - GoogleUtilities/Environment (7.3.1): + - GoogleUtilities/Environment (7.4.1): - PromisesObjC (~> 1.2) - - GoogleUtilities/Logger (7.3.1): + - GoogleUtilities/Logger (7.4.1): - GoogleUtilities/Environment - - GoogleUtilities/Network (7.3.1): + - GoogleUtilities/Network (7.4.1): - GoogleUtilities/Logger - "GoogleUtilities/NSData+zlib" - GoogleUtilities/Reachability - - "GoogleUtilities/NSData+zlib (7.3.1)" - - GoogleUtilities/Reachability (7.3.1): + - "GoogleUtilities/NSData+zlib (7.4.1)" + - GoogleUtilities/Reachability (7.4.1): - GoogleUtilities/Logger - "gRPC-C++ (1.28.2)": - "gRPC-C++/Implementation (= 1.28.2)" @@ -353,19 +355,19 @@ PODS: - image_picker (0.0.1): - Flutter - leveldb-library (1.22.1) - - nanopb (2.30906.0): - - nanopb/decode (= 2.30906.0) - - nanopb/encode (= 2.30906.0) - - nanopb/decode (2.30906.0) - - nanopb/encode (2.30906.0) + - nanopb (2.30908.0): + - nanopb/decode (= 2.30908.0) + - nanopb/encode (= 2.30908.0) + - nanopb/decode (2.30908.0) + - nanopb/encode (2.30908.0) - open_file (0.0.1): - Flutter - path_provider (0.0.1): - Flutter - PromisesObjC (1.2.12) - - SDWebImage (5.10.4): - - SDWebImage/Core (= 5.10.4) - - SDWebImage/Core (5.10.4) + - SDWebImage (5.11.1): + - SDWebImage/Core (= 5.11.1) + - SDWebImage/Core (5.11.1) - SwiftyGif (5.4.0) - url_launcher (0.0.1): - Flutter @@ -430,32 +432,32 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: abseil: 6c8eb7892aefa08d929b39f9bb108e5367e3228f BoringSSL-GRPC: 8edf627ee524575e2f8d19d56f068b448eea3879 - cloud_firestore: 8887a0c9657c09ca73c9273939c5e6bdb5d7aff2 + cloud_firestore: 8ead368e38b40bb2a4c97458b7b99272399f2214 DKImagePickerController: b5eb7f7a388e4643264105d648d01f727110fc3d DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179 file_picker: 3e6c3790de664ccf9b882732d9db5eaf6b8d4eb1 - Firebase: 26223c695fe322633274198cb19dca8cb7e54416 - firebase_auth: d09964a120e218411768f5ca2d3ce938abd319f2 - firebase_core: b5d81dfd4fb2d6f700e67de34d9a633ae325c4e9 - firebase_storage: 2ce2146c1fa764e68330e6998fa386522c95d199 - FirebaseAuth: c224a0cf1afa0949bd5c7bfcf154b4f5ce8ddef2 - FirebaseCore: 4d3c72622ce0e2106aaa07bb4b2935ba2c370972 - FirebaseCoreDiagnostics: d50e11039e5984d92c8a512be2395f13df747350 - FirebaseFirestore: 1906bf163afdb7c432d2e3b5c40ceb9dd2df5820 - FirebaseStorage: 5002b1895bfe74a5ce92ad54f966e6162d0da2e5 + Firebase: 73c3e3b216ec1ecbc54d2ffdd4670c65c749edb1 + firebase_auth: f960df4ddd8cb415859dbc01a02d7859925ddef0 + firebase_core: e4d3efb030a2b2021819f8faa538bb23deb46695 + firebase_storage: 6ea45fdb1976a9a32bf42d1a285a0103a97faaae + FirebaseAuth: b8cd992fca5b53dc6eec09e873a3f375f000c5a1 + FirebaseCore: 3f09591d51292843e2a46f18358d60bf4e996255 + FirebaseCoreDiagnostics: a31d987ba0fe16d59886a5dbadc2f1de871f88c8 + FirebaseFirestore: 7f6576eaca9f821e864c3e917d68aa99f4e6b613 + FirebaseStorage: 61bcd27880fa17362f68be67d3683d04bfd7b1c7 Flutter: 434fef37c0980e73bb6479ef766c45957d4b510c - GoogleDataTransport: 116c84c4bdeb76be2a7a46de51244368f9794eab - GoogleUtilities: e1d9ed4e544fc32a93e00e721400cbc3f377200d + GoogleDataTransport: 11e3a5f2c190327df1a4a5d7e7ae3d4d5b9c9e4c + GoogleUtilities: f8a43108b38a68eebe8b3540e1f4f2d28843ce20 "gRPC-C++": 13d8ccef97d5c3c441b7e3c529ef28ebee86fad2 gRPC-Core: 4afa11bfbedf7cdecd04de535a9e046893404ed5 GTMSessionFetcher: b3503b20a988c4e20cc189aa798fd18220133f52 image_picker: 50e7c7ff960e5f58faa4d1f4af84a771c671bc4a leveldb-library: 50c7b45cbd7bf543c81a468fe557a16ae3db8729 - nanopb: 1bf24dd71191072e120b83dd02d08f3da0d65e53 + nanopb: a0ba3315591a9ae0a16a309ee504766e90db0c96 open_file: 02eb5cb6b21264bd3a696876f5afbfb7ca4f4b7d path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c PromisesObjC: 3113f7f76903778cf4a0586bd1ab89329a0b7b97 - SDWebImage: c666b97e1fa9c64b4909816a903322018f0a9c84 + SDWebImage: a7f831e1a65eb5e285e3fb046a23fcfbf08e696d SwiftyGif: 5d4af95df24caf1c570dbbcb32a3b8a0763bc6d7 url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj index 5e96704..4d66056 100644 --- a/example/ios/Runner.xcodeproj/project.pbxproj +++ b/example/ios/Runner.xcodeproj/project.pbxproj @@ -3,11 +3,11 @@ archiveVersion = 1; classes = { }; - objectVersion = 51; + objectVersion = 46; objects = { /* Begin PBXBuildFile section */ - 13C311292525AA82539146E3 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 59BF978EAC10CBEC6B197AAF /* Pods_Runner.framework */; }; + 00B625C14ED4E164F826FBFC /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AF181D3891E94BFC4A052E57 /* Pods_Runner.framework */; }; 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 */; }; @@ -33,14 +33,12 @@ /* 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 = ""; }; + 2E6F2669B15FE2625C8641B4 /* 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 = ""; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 499744CDA88D02EA555DFA83 /* 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 = ""; }; - 59BF978EAC10CBEC6B197AAF /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 71DF0F04526ACFFEF131EE98 /* 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 = ""; }; + 51B170617547988D1015874C /* 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 = ""; }; - 7CFCA61C4F10AC5C3904A68A /* 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 = ""; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -49,6 +47,8 @@ 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 = ""; }; FA86EB4C2609664000938214 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; + AF181D3891E94BFC4A052E57 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + B9BAE6021323EF97FFDE420C /* 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 = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -56,7 +56,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 13C311292525AA82539146E3 /* Pods_Runner.framework in Frameworks */, + 00B625C14ED4E164F826FBFC /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -80,8 +80,8 @@ 9740EEB11CF90186004384FC /* Flutter */, 97C146F01CF9000F007C117D /* Runner */, 97C146EF1CF9000F007C117D /* Products */, - 9E9606936A70CB833DCBD1B5 /* Pods */, - FBCED761CECB9D08EA44DB4A /* Frameworks */, + E1EBE81A18D569BC67E01071 /* Pods */, + C3B494A0A4CB9FE85641DAF9 /* Frameworks */, ); sourceTree = ""; }; @@ -109,22 +109,23 @@ path = Runner; sourceTree = ""; }; - 9E9606936A70CB833DCBD1B5 /* Pods */ = { + C3B494A0A4CB9FE85641DAF9 /* Frameworks */ = { isa = PBXGroup; children = ( - 71DF0F04526ACFFEF131EE98 /* Pods-Runner.debug.xcconfig */, - 499744CDA88D02EA555DFA83 /* Pods-Runner.release.xcconfig */, - 7CFCA61C4F10AC5C3904A68A /* Pods-Runner.profile.xcconfig */, + AF181D3891E94BFC4A052E57 /* Pods_Runner.framework */, ); - path = Pods; + name = Frameworks; sourceTree = ""; }; - FBCED761CECB9D08EA44DB4A /* Frameworks */ = { + E1EBE81A18D569BC67E01071 /* Pods */ = { isa = PBXGroup; children = ( - 59BF978EAC10CBEC6B197AAF /* Pods_Runner.framework */, + 2E6F2669B15FE2625C8641B4 /* Pods-Runner.debug.xcconfig */, + 51B170617547988D1015874C /* Pods-Runner.release.xcconfig */, + B9BAE6021323EF97FFDE420C /* Pods-Runner.profile.xcconfig */, ); - name = Frameworks; + name = Pods; + path = Pods; sourceTree = ""; }; /* End PBXGroup section */ @@ -134,14 +135,14 @@ isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( - E0D2E90A0E411F4F60FC071D /* [CP] Check Pods Manifest.lock */, + D93C2E236EBAE32FE103D75B /* [CP] Check Pods Manifest.lock */, 9740EEB61CF901F6004384FC /* Run Script */, 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - 932B8E6EAB9753D39C61E6D2 /* [CP] Embed Pods Frameworks */, + 386DFEB32BFEA55376497AB6 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -201,36 +202,36 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + 386DFEB32BFEA55376497AB6 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); - inputPaths = ( + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); - name = "Thin Binary"; - outputPaths = ( + 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 = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; }; - 932B8E6EAB9753D39C61E6D2 /* [CP] Embed Pods Frameworks */ = { + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", + inputPaths = ( ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", + name = "Thin Binary"; + outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; - showEnvVarsInLog = 0; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; @@ -246,7 +247,7 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; }; - E0D2E90A0E411F4F60FC071D /* [CP] Check Pods Manifest.lock */ = { + D93C2E236EBAE32FE103D75B /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -361,10 +362,7 @@ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.example; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; @@ -473,8 +471,7 @@ MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; }; @@ -489,10 +486,7 @@ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.example; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; @@ -511,10 +505,7 @@ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.example; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; diff --git a/example/lib/chat.dart b/example/lib/chat.dart index 4fec3ef..540b30f 100644 --- a/example/lib/chat.dart +++ b/example/lib/chat.dart @@ -69,41 +69,43 @@ class _ChatPageState extends State { ); } - void _onPreviewDataFetched( + void _handleMessageTap(types.Message message) async { + if (message is types.FileMessage) { + var localPath = message.uri; + + if (message.uri.startsWith('http')) { + final client = http.Client(); + final request = await client.get(Uri.parse(message.uri)); + final bytes = request.bodyBytes; + final documentsDir = (await getApplicationDocumentsDirectory()).path; + localPath = '$documentsDir/${message.fileName}'; + + if (!File(localPath).existsSync()) { + final file = File(localPath); + await file.writeAsBytes(bytes); + } + } + + await OpenFile.open(localPath); + } + } + + void _handlePreviewDataFetched( types.TextMessage message, types.PreviewData previewData, ) { - final updatedMessage = message.copyWith(previewData); + final updatedMessage = message.copyWith(previewData: previewData); FirebaseChatCore.instance.updateMessage(updatedMessage, widget.roomId); } - void _onSendPressed(types.PartialText message) { + void _handleSendPressed(types.PartialText message) { FirebaseChatCore.instance.sendMessage( message, widget.roomId, ); } - void _openFile(types.FileMessage message) async { - var localPath = message.uri; - - if (message.uri.startsWith('http')) { - final client = http.Client(); - final request = await client.get(Uri.parse(message.uri)); - final bytes = request.bodyBytes; - final documentsDir = (await getApplicationDocumentsDirectory()).path; - localPath = '$documentsDir/${message.fileName}'; - - if (!File(localPath).existsSync()) { - final file = File(localPath); - await file.writeAsBytes(bytes); - } - } - - await OpenFile.open(localPath); - } - void _setAttachmentUploading(bool uploading) { setState(() { _isAttachmentUploading = uploading; @@ -204,9 +206,9 @@ class _ChatPageState extends State { isAttachmentUploading: _isAttachmentUploading, messages: snapshot.data ?? [], onAttachmentPressed: _handleAtachmentPress, - onFilePressed: _openFile, - onPreviewDataFetched: _onPreviewDataFetched, - onSendPressed: _onSendPressed, + onMessageTap: _handleMessageTap, + onPreviewDataFetched: _handlePreviewDataFetched, + onSendPressed: _handleSendPressed, user: types.User( id: FirebaseChatCore.instance.firebaseUser?.uid ?? '', ), diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 188850a..fd3f403 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -27,19 +27,19 @@ dependencies: # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. - cupertino_icons: ^1.0.2 - faker: ^2.0.0-rc.2 + cupertino_icons: ^1.0.3 + faker: ^2.0.0 file_picker: ^3.0.1 - firebase_auth: ^1.1.0 - firebase_core: ^1.0.3 - firebase_storage: ^8.0.3 - flutter_chat_ui: ^1.0.0 + firebase_auth: ^1.2.0 + firebase_core: ^1.2.0 + firebase_storage: ^8.1.0 + flutter_chat_ui: ^1.0.5 flutter_firebase_chat_core: path: ../ - http: ^0.13.1 - image_picker: ^0.7.4 + http: ^0.13.3 + image_picker: ^0.7.5+2 mime: ^1.0.0 - open_file: ^3.1.0 + open_file: ^3.2.1 path_provider: ^2.0.1 dev_dependencies: diff --git a/example/web/index.html b/example/web/index.html index 80ff3eb..df833e6 100644 --- a/example/web/index.html +++ b/example/web/index.html @@ -8,7 +8,7 @@ The path provided below has to start and end with a slash "/" in order for it to work correctly. - Fore more details: + For more details: * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base --> @@ -23,28 +23,81 @@ - - - example - - - - + + + + - diff --git a/pubspec.yaml b/pubspec.yaml index 4f4eed9..efab66e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -2,7 +2,7 @@ name: flutter_firebase_chat_core description: > Actively maintained, community-driven Firebase BaaS for chat applications with an optional chat UI. -version: 1.0.2 +version: 1.0.3 homepage: https://flyer.chat environment: @@ -12,9 +12,9 @@ environment: dependencies: flutter: sdk: flutter - cloud_firestore: ^1.0.5 - firebase_auth: ^1.1.0 - flutter_chat_types: ^2.0.8 + cloud_firestore: ^2.2.0 + firebase_auth: ^1.2.0 + flutter_chat_types: ^2.1.3 meta: ^1.3.0 dev_dependencies: