From c2e6581ae3ed78f3ee4c9a2f5309ac800a9cadb5 Mon Sep 17 00:00:00 2001 From: Stein Milder Date: Tue, 18 Oct 2022 09:28:25 +0200 Subject: [PATCH] feat: chatsCollectionName as storage path prefix --- .../flutter_community_chat/.flutter-plugins-dependencies | 2 +- packages/flutter_community_chat/pubspec.lock | 8 ++++---- packages/flutter_community_chat/pubspec.yaml | 4 ++-- .../.flutter-plugins-dependencies | 2 +- .../lib/service/firebase_message_service.dart | 3 ++- packages/flutter_community_chat_firebase/pubspec.lock | 4 ++-- packages/flutter_community_chat_firebase/pubspec.yaml | 2 +- packages/flutter_community_chat_view/example/pubspec.lock | 4 ++-- packages/flutter_community_chat_view/pubspec.lock | 4 ++-- packages/flutter_community_chat_view/pubspec.yaml | 2 +- 10 files changed, 18 insertions(+), 17 deletions(-) diff --git a/packages/flutter_community_chat/.flutter-plugins-dependencies b/packages/flutter_community_chat/.flutter-plugins-dependencies index 8bb8309..d6b382a 100644 --- a/packages/flutter_community_chat/.flutter-plugins-dependencies +++ b/packages/flutter_community_chat/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"image_picker_ios","path":"/Users/steinmilder/.pub-cache/hosted/pub.dartlang.org/image_picker_ios-0.8.6+1/","native_build":true,"dependencies":[]}],"android":[{"name":"flutter_plugin_android_lifecycle","path":"/Users/steinmilder/.pub-cache/hosted/pub.dartlang.org/flutter_plugin_android_lifecycle-2.0.7/","native_build":true,"dependencies":[]},{"name":"image_picker_android","path":"/Users/steinmilder/.pub-cache/hosted/pub.dartlang.org/image_picker_android-0.8.5+3/","native_build":true,"dependencies":["flutter_plugin_android_lifecycle"]}],"macos":[],"linux":[],"windows":[],"web":[{"name":"image_picker_for_web","path":"/Users/steinmilder/.pub-cache/hosted/pub.dartlang.org/image_picker_for_web-2.1.10/","dependencies":[]}]},"dependencyGraph":[{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"image_picker","dependencies":["image_picker_android","image_picker_for_web","image_picker_ios"]},{"name":"image_picker_android","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"image_picker_for_web","dependencies":[]},{"name":"image_picker_ios","dependencies":[]}],"date_created":"2022-10-17 16:00:16.734825","version":"3.3.4"} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"image_picker_ios","path":"/Users/steinmilder/.pub-cache/hosted/pub.dartlang.org/image_picker_ios-0.8.6+1/","native_build":true,"dependencies":[]}],"android":[{"name":"flutter_plugin_android_lifecycle","path":"/Users/steinmilder/.pub-cache/hosted/pub.dartlang.org/flutter_plugin_android_lifecycle-2.0.7/","native_build":true,"dependencies":[]},{"name":"image_picker_android","path":"/Users/steinmilder/.pub-cache/hosted/pub.dartlang.org/image_picker_android-0.8.5+3/","native_build":true,"dependencies":["flutter_plugin_android_lifecycle"]}],"macos":[],"linux":[],"windows":[],"web":[{"name":"image_picker_for_web","path":"/Users/steinmilder/.pub-cache/hosted/pub.dartlang.org/image_picker_for_web-2.1.10/","dependencies":[]}]},"dependencyGraph":[{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"image_picker","dependencies":["image_picker_android","image_picker_for_web","image_picker_ios"]},{"name":"image_picker_android","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"image_picker_for_web","dependencies":[]},{"name":"image_picker_ios","dependencies":[]}],"date_created":"2022-10-18 09:32:26.979069","version":"3.3.4"} \ No newline at end of file diff --git a/packages/flutter_community_chat/pubspec.lock b/packages/flutter_community_chat/pubspec.lock index 6202384..6ad53b1 100644 --- a/packages/flutter_community_chat/pubspec.lock +++ b/packages/flutter_community_chat/pubspec.lock @@ -136,8 +136,8 @@ packages: dependency: "direct main" description: path: "packages/flutter_community_chat_interface" - ref: HEAD - resolved-ref: a11de45640cfda9aa1abe32b043d2a31901e70da + ref: "0.0.3" + resolved-ref: "3c88dcd3ce77f6703e9d2f3bb535f8117eb0b33d" url: "https://github.com/Iconica-Development/flutter_community_chat.git" source: git version: "0.0.1" @@ -145,8 +145,8 @@ packages: dependency: "direct main" description: path: "packages/flutter_community_chat_view" - ref: HEAD - resolved-ref: a11de45640cfda9aa1abe32b043d2a31901e70da + ref: "0.0.3" + resolved-ref: "3c88dcd3ce77f6703e9d2f3bb535f8117eb0b33d" url: "https://github.com/Iconica-Development/flutter_community_chat.git" source: git version: "0.0.1" diff --git a/packages/flutter_community_chat/pubspec.yaml b/packages/flutter_community_chat/pubspec.yaml index 520a9cd..14b15ea 100644 --- a/packages/flutter_community_chat/pubspec.yaml +++ b/packages/flutter_community_chat/pubspec.yaml @@ -15,12 +15,12 @@ dependencies: git: url: https://github.com/Iconica-Development/flutter_community_chat.git path: packages/flutter_community_chat_view - ref: 0.0.2 + ref: 0.0.3 flutter_community_chat_interface: git: url: https://github.com/Iconica-Development/flutter_community_chat.git path: packages/flutter_community_chat_interface - ref: 0.0.2 + ref: 0.0.3 flutter_image_picker: git: url: https://github.com/Iconica-Development/flutter_image_picker diff --git a/packages/flutter_community_chat_firebase/.flutter-plugins-dependencies b/packages/flutter_community_chat_firebase/.flutter-plugins-dependencies index 1ec95d0..dda0ef5 100644 --- a/packages/flutter_community_chat_firebase/.flutter-plugins-dependencies +++ b/packages/flutter_community_chat_firebase/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"cloud_firestore","path":"/Users/steinmilder/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.2.0/","native_build":true,"dependencies":["firebase_core"]},{"name":"firebase_auth","path":"/Users/steinmilder/.pub-cache/hosted/pub.dartlang.org/firebase_auth-3.11.2/","native_build":true,"dependencies":["firebase_core"]},{"name":"firebase_core","path":"/Users/steinmilder/.pub-cache/hosted/pub.dartlang.org/firebase_core-1.24.0/","native_build":true,"dependencies":[]},{"name":"firebase_storage","path":"/Users/steinmilder/.pub-cache/hosted/pub.dartlang.org/firebase_storage-10.3.11/","native_build":true,"dependencies":["firebase_core"]}],"android":[{"name":"cloud_firestore","path":"/Users/steinmilder/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.2.0/","native_build":true,"dependencies":["firebase_core"]},{"name":"firebase_auth","path":"/Users/steinmilder/.pub-cache/hosted/pub.dartlang.org/firebase_auth-3.11.2/","native_build":true,"dependencies":["firebase_core"]},{"name":"firebase_core","path":"/Users/steinmilder/.pub-cache/hosted/pub.dartlang.org/firebase_core-1.24.0/","native_build":true,"dependencies":[]},{"name":"firebase_storage","path":"/Users/steinmilder/.pub-cache/hosted/pub.dartlang.org/firebase_storage-10.3.11/","native_build":true,"dependencies":["firebase_core"]}],"macos":[{"name":"cloud_firestore","path":"/Users/steinmilder/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.2.0/","native_build":true,"dependencies":["firebase_core"]},{"name":"firebase_auth","path":"/Users/steinmilder/.pub-cache/hosted/pub.dartlang.org/firebase_auth-3.11.2/","native_build":true,"dependencies":["firebase_core"]},{"name":"firebase_core","path":"/Users/steinmilder/.pub-cache/hosted/pub.dartlang.org/firebase_core-1.24.0/","native_build":true,"dependencies":[]},{"name":"firebase_storage","path":"/Users/steinmilder/.pub-cache/hosted/pub.dartlang.org/firebase_storage-10.3.11/","native_build":true,"dependencies":["firebase_core"]}],"linux":[],"windows":[],"web":[{"name":"cloud_firestore_web","path":"/Users/steinmilder/.pub-cache/hosted/pub.dartlang.org/cloud_firestore_web-2.8.10/","dependencies":["firebase_core_web"]},{"name":"firebase_auth_web","path":"/Users/steinmilder/.pub-cache/hosted/pub.dartlang.org/firebase_auth_web-4.6.1/","dependencies":["firebase_core_web"]},{"name":"firebase_core_web","path":"/Users/steinmilder/.pub-cache/hosted/pub.dartlang.org/firebase_core_web-1.7.3/","dependencies":[]},{"name":"firebase_storage_web","path":"/Users/steinmilder/.pub-cache/hosted/pub.dartlang.org/firebase_storage_web-3.3.9/","dependencies":["firebase_core_web"]}]},"dependencyGraph":[{"name":"cloud_firestore","dependencies":["cloud_firestore_web","firebase_core"]},{"name":"cloud_firestore_web","dependencies":["firebase_core","firebase_core_web"]},{"name":"firebase_auth","dependencies":["firebase_auth_web","firebase_core"]},{"name":"firebase_auth_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"]}],"date_created":"2022-10-17 11:26:15.443138","version":"3.3.4"} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"cloud_firestore","path":"/Users/steinmilder/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.2.0/","native_build":true,"dependencies":["firebase_core"]},{"name":"firebase_auth","path":"/Users/steinmilder/.pub-cache/hosted/pub.dartlang.org/firebase_auth-3.11.2/","native_build":true,"dependencies":["firebase_core"]},{"name":"firebase_core","path":"/Users/steinmilder/.pub-cache/hosted/pub.dartlang.org/firebase_core-1.24.0/","native_build":true,"dependencies":[]},{"name":"firebase_storage","path":"/Users/steinmilder/.pub-cache/hosted/pub.dartlang.org/firebase_storage-10.3.11/","native_build":true,"dependencies":["firebase_core"]}],"android":[{"name":"cloud_firestore","path":"/Users/steinmilder/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.2.0/","native_build":true,"dependencies":["firebase_core"]},{"name":"firebase_auth","path":"/Users/steinmilder/.pub-cache/hosted/pub.dartlang.org/firebase_auth-3.11.2/","native_build":true,"dependencies":["firebase_core"]},{"name":"firebase_core","path":"/Users/steinmilder/.pub-cache/hosted/pub.dartlang.org/firebase_core-1.24.0/","native_build":true,"dependencies":[]},{"name":"firebase_storage","path":"/Users/steinmilder/.pub-cache/hosted/pub.dartlang.org/firebase_storage-10.3.11/","native_build":true,"dependencies":["firebase_core"]}],"macos":[{"name":"cloud_firestore","path":"/Users/steinmilder/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.2.0/","native_build":true,"dependencies":["firebase_core"]},{"name":"firebase_auth","path":"/Users/steinmilder/.pub-cache/hosted/pub.dartlang.org/firebase_auth-3.11.2/","native_build":true,"dependencies":["firebase_core"]},{"name":"firebase_core","path":"/Users/steinmilder/.pub-cache/hosted/pub.dartlang.org/firebase_core-1.24.0/","native_build":true,"dependencies":[]},{"name":"firebase_storage","path":"/Users/steinmilder/.pub-cache/hosted/pub.dartlang.org/firebase_storage-10.3.11/","native_build":true,"dependencies":["firebase_core"]}],"linux":[],"windows":[],"web":[{"name":"cloud_firestore_web","path":"/Users/steinmilder/.pub-cache/hosted/pub.dartlang.org/cloud_firestore_web-2.8.10/","dependencies":["firebase_core_web"]},{"name":"firebase_auth_web","path":"/Users/steinmilder/.pub-cache/hosted/pub.dartlang.org/firebase_auth_web-4.6.1/","dependencies":["firebase_core_web"]},{"name":"firebase_core_web","path":"/Users/steinmilder/.pub-cache/hosted/pub.dartlang.org/firebase_core_web-1.7.3/","dependencies":[]},{"name":"firebase_storage_web","path":"/Users/steinmilder/.pub-cache/hosted/pub.dartlang.org/firebase_storage_web-3.3.9/","dependencies":["firebase_core_web"]}]},"dependencyGraph":[{"name":"cloud_firestore","dependencies":["cloud_firestore_web","firebase_core"]},{"name":"cloud_firestore_web","dependencies":["firebase_core","firebase_core_web"]},{"name":"firebase_auth","dependencies":["firebase_auth_web","firebase_core"]},{"name":"firebase_auth_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"]}],"date_created":"2022-10-18 09:33:20.309805","version":"3.3.4"} \ No newline at end of file diff --git a/packages/flutter_community_chat_firebase/lib/service/firebase_message_service.dart b/packages/flutter_community_chat_firebase/lib/service/firebase_message_service.dart index 6ac2a34..df394b2 100644 --- a/packages/flutter_community_chat_firebase/lib/service/firebase_message_service.dart +++ b/packages/flutter_community_chat_firebase/lib/service/firebase_message_service.dart @@ -26,7 +26,8 @@ class FirebaseMessageService { _sendMessage(chat, {'text': text}); Future sendImageMessage(ChatModel chat, Uint8List image) async { - var ref = storage.ref('chats/${chat.id}/${const Uuid().v4()}'); + var ref = storage + .ref('${options.chatsCollectionName}/${chat.id}/${const Uuid().v4()}'); return ref.putData(image).then( (_) => ref.getDownloadURL().then( diff --git a/packages/flutter_community_chat_firebase/pubspec.lock b/packages/flutter_community_chat_firebase/pubspec.lock index 1447693..275ed4a 100644 --- a/packages/flutter_community_chat_firebase/pubspec.lock +++ b/packages/flutter_community_chat_firebase/pubspec.lock @@ -227,8 +227,8 @@ packages: dependency: "direct main" description: path: "packages/flutter_community_chat_interface" - ref: "0.0.2" - resolved-ref: "475d87a29623df6d9e3842c5ca407e928880ded9" + ref: "0.0.3" + resolved-ref: "3c88dcd3ce77f6703e9d2f3bb535f8117eb0b33d" url: "https://github.com/Iconica-Development/flutter_community_chat.git" source: git version: "0.0.1" diff --git a/packages/flutter_community_chat_firebase/pubspec.yaml b/packages/flutter_community_chat_firebase/pubspec.yaml index c8c23c6..bc0e530 100644 --- a/packages/flutter_community_chat_firebase/pubspec.yaml +++ b/packages/flutter_community_chat_firebase/pubspec.yaml @@ -18,7 +18,7 @@ dependencies: git: url: https://github.com/Iconica-Development/flutter_community_chat.git path: packages/flutter_community_chat_interface - ref: 0.0.2 + ref: 0.0.3 firebase_auth: ^3.11.2 dev_dependencies: diff --git a/packages/flutter_community_chat_view/example/pubspec.lock b/packages/flutter_community_chat_view/example/pubspec.lock index fa8865a..08610c4 100644 --- a/packages/flutter_community_chat_view/example/pubspec.lock +++ b/packages/flutter_community_chat_view/example/pubspec.lock @@ -143,8 +143,8 @@ packages: dependency: transitive description: path: "packages/flutter_community_chat_interface" - ref: HEAD - resolved-ref: a11de45640cfda9aa1abe32b043d2a31901e70da + ref: "0.0.3" + resolved-ref: "3c88dcd3ce77f6703e9d2f3bb535f8117eb0b33d" url: "https://github.com/Iconica-Development/flutter_community_chat.git" source: git version: "0.0.1" diff --git a/packages/flutter_community_chat_view/pubspec.lock b/packages/flutter_community_chat_view/pubspec.lock index 59561ff..09f960e 100644 --- a/packages/flutter_community_chat_view/pubspec.lock +++ b/packages/flutter_community_chat_view/pubspec.lock @@ -136,8 +136,8 @@ packages: dependency: "direct main" description: path: "packages/flutter_community_chat_interface" - ref: HEAD - resolved-ref: a11de45640cfda9aa1abe32b043d2a31901e70da + ref: "0.0.3" + resolved-ref: "3c88dcd3ce77f6703e9d2f3bb535f8117eb0b33d" url: "https://github.com/Iconica-Development/flutter_community_chat.git" source: git version: "0.0.1" diff --git a/packages/flutter_community_chat_view/pubspec.yaml b/packages/flutter_community_chat_view/pubspec.yaml index 234f321..0ff51be 100644 --- a/packages/flutter_community_chat_view/pubspec.yaml +++ b/packages/flutter_community_chat_view/pubspec.yaml @@ -20,7 +20,7 @@ dependencies: git: url: https://github.com/Iconica-Development/flutter_community_chat.git path: packages/flutter_community_chat_interface - ref: 0.0.2 + ref: 0.0.3 dev_dependencies: flutter_test: