mirror of
https://github.com/Iconica-Development/flutter_chat.git
synced 2025-05-19 02:43:50 +02:00
naming fix
This commit is contained in:
parent
942403d1a4
commit
d024a9fad9
10 changed files with 27 additions and 29 deletions
|
@ -179,7 +179,7 @@ packages:
|
||||||
description:
|
description:
|
||||||
path: "packages/flutter_community_chat_interface"
|
path: "packages/flutter_community_chat_interface"
|
||||||
ref: HEAD
|
ref: HEAD
|
||||||
resolved-ref: "3793e853721291dc50655ca4ee7999508fe9e2fe"
|
resolved-ref: "5c4556f800e2b9806605f9e934dc4a5e471214d6"
|
||||||
url: "https://github.com/Iconica-Development/flutter_community_chat.git"
|
url: "https://github.com/Iconica-Development/flutter_community_chat.git"
|
||||||
source: git
|
source: git
|
||||||
version: "0.0.1"
|
version: "0.0.1"
|
||||||
|
@ -188,7 +188,7 @@ packages:
|
||||||
description:
|
description:
|
||||||
path: "packages/flutter_community_chat_view"
|
path: "packages/flutter_community_chat_view"
|
||||||
ref: HEAD
|
ref: HEAD
|
||||||
resolved-ref: "3793e853721291dc50655ca4ee7999508fe9e2fe"
|
resolved-ref: "5c4556f800e2b9806605f9e934dc4a5e471214d6"
|
||||||
url: "https://github.com/Iconica-Development/flutter_community_chat.git"
|
url: "https://github.com/Iconica-Development/flutter_community_chat.git"
|
||||||
source: git
|
source: git
|
||||||
version: "0.0.1"
|
version: "0.0.1"
|
||||||
|
@ -445,14 +445,14 @@ packages:
|
||||||
name: pub_semver
|
name: pub_semver
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.2"
|
version: "2.1.3"
|
||||||
rxdart:
|
rxdart:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: rxdart
|
name: rxdart
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.27.5"
|
version: "0.27.7"
|
||||||
sky_engine:
|
sky_engine:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description: flutter
|
description: flutter
|
||||||
|
@ -541,7 +541,7 @@ packages:
|
||||||
name: uuid
|
name: uuid
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.6"
|
version: "3.0.7"
|
||||||
vector_math:
|
vector_math:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
//
|
//
|
||||||
// SPDX-License-Identifier: BSD-3-Clause
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
class FirebaseChatOptoons {
|
class FirebaseChatOptions {
|
||||||
const FirebaseChatOptoons({
|
const FirebaseChatOptions({
|
||||||
this.chatsCollectionName = 'chats',
|
this.chatsCollectionName = 'chats',
|
||||||
this.messagesCollectionName = 'messages',
|
this.messagesCollectionName = 'messages',
|
||||||
this.usersCollectionName = 'users',
|
this.usersCollectionName = 'users',
|
||||||
|
|
|
@ -20,10 +20,10 @@ class FirebaseCommunityChatDataProvider extends CommunityChatInterface {
|
||||||
late final FirebaseUserService _userService;
|
late final FirebaseUserService _userService;
|
||||||
late final FirebaseMessageService _messageService;
|
late final FirebaseMessageService _messageService;
|
||||||
late final FirebaseChatService _chatService;
|
late final FirebaseChatService _chatService;
|
||||||
final FirebaseChatOptoons firebaseChatOptoons;
|
final FirebaseChatOptions firebaseChatOptions;
|
||||||
|
|
||||||
FirebaseCommunityChatDataProvider({
|
FirebaseCommunityChatDataProvider({
|
||||||
this.firebaseChatOptoons = const FirebaseChatOptoons(),
|
this.firebaseChatOptions = const FirebaseChatOptions(),
|
||||||
FirebaseApp? app,
|
FirebaseApp? app,
|
||||||
}) {
|
}) {
|
||||||
var appInstance = app ?? Firebase.app();
|
var appInstance = app ?? Firebase.app();
|
||||||
|
@ -35,13 +35,13 @@ class FirebaseCommunityChatDataProvider extends CommunityChatInterface {
|
||||||
_userService = FirebaseUserService(
|
_userService = FirebaseUserService(
|
||||||
db: db,
|
db: db,
|
||||||
auth: auth,
|
auth: auth,
|
||||||
options: firebaseChatOptoons,
|
options: firebaseChatOptions,
|
||||||
);
|
);
|
||||||
|
|
||||||
_chatService = FirebaseChatService(
|
_chatService = FirebaseChatService(
|
||||||
db: db,
|
db: db,
|
||||||
userService: _userService,
|
userService: _userService,
|
||||||
options: firebaseChatOptoons,
|
options: firebaseChatOptions,
|
||||||
);
|
);
|
||||||
|
|
||||||
_messageService = FirebaseMessageService(
|
_messageService = FirebaseMessageService(
|
||||||
|
@ -49,7 +49,7 @@ class FirebaseCommunityChatDataProvider extends CommunityChatInterface {
|
||||||
storage: storage,
|
storage: storage,
|
||||||
userService: _userService,
|
userService: _userService,
|
||||||
chatService: _chatService,
|
chatService: _chatService,
|
||||||
options: firebaseChatOptoons,
|
options: firebaseChatOptions,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,12 +3,10 @@
|
||||||
// SPDX-License-Identifier: BSD-3-Clause
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
|
||||||
import 'package:cloud_firestore/cloud_firestore.dart';
|
import 'package:cloud_firestore/cloud_firestore.dart';
|
||||||
import 'package:flutter_community_chat_firebase/config/firebase_chat_options.dart';
|
import 'package:flutter_community_chat_firebase/config/firebase_chat_options.dart';
|
||||||
import 'package:flutter_community_chat_firebase/dto/firebase_chat_document.dart';
|
import 'package:flutter_community_chat_firebase/dto/firebase_chat_document.dart';
|
||||||
import 'package:flutter_community_chat_interface/flutter_community_chat_interface.dart';
|
import 'package:flutter_community_chat_interface/flutter_community_chat_interface.dart';
|
||||||
|
|
||||||
import 'firebase_user_service.dart';
|
import 'firebase_user_service.dart';
|
||||||
|
|
||||||
class FirebaseChatService {
|
class FirebaseChatService {
|
||||||
|
@ -20,7 +18,7 @@ class FirebaseChatService {
|
||||||
|
|
||||||
FirebaseFirestore db;
|
FirebaseFirestore db;
|
||||||
FirebaseUserService userService;
|
FirebaseUserService userService;
|
||||||
FirebaseChatOptoons options;
|
FirebaseChatOptions options;
|
||||||
|
|
||||||
StreamSubscription<QuerySnapshot> _addChatSubscription(
|
StreamSubscription<QuerySnapshot> _addChatSubscription(
|
||||||
List<String> chatIds,
|
List<String> chatIds,
|
||||||
|
|
|
@ -27,7 +27,7 @@ class FirebaseMessageService {
|
||||||
final FirebaseStorage storage;
|
final FirebaseStorage storage;
|
||||||
final FirebaseUserService userService;
|
final FirebaseUserService userService;
|
||||||
final FirebaseChatService chatService;
|
final FirebaseChatService chatService;
|
||||||
FirebaseChatOptoons options;
|
FirebaseChatOptions options;
|
||||||
late StreamController<List<ChatMessageModel>> _controller;
|
late StreamController<List<ChatMessageModel>> _controller;
|
||||||
StreamSubscription<QuerySnapshot>? _subscription;
|
StreamSubscription<QuerySnapshot>? _subscription;
|
||||||
ChatModel? _chat;
|
ChatModel? _chat;
|
||||||
|
|
|
@ -17,7 +17,7 @@ class FirebaseUserService {
|
||||||
|
|
||||||
FirebaseFirestore db;
|
FirebaseFirestore db;
|
||||||
FirebaseAuth auth;
|
FirebaseAuth auth;
|
||||||
FirebaseChatOptoons options;
|
FirebaseChatOptions options;
|
||||||
ChatUserModel? _currentUser;
|
ChatUserModel? _currentUser;
|
||||||
final Map<String, ChatUserModel> _users = {};
|
final Map<String, ChatUserModel> _users = {};
|
||||||
|
|
||||||
|
|
|
@ -228,7 +228,7 @@ packages:
|
||||||
description:
|
description:
|
||||||
path: "packages/flutter_community_chat_interface"
|
path: "packages/flutter_community_chat_interface"
|
||||||
ref: HEAD
|
ref: HEAD
|
||||||
resolved-ref: "3793e853721291dc50655ca4ee7999508fe9e2fe"
|
resolved-ref: "5c4556f800e2b9806605f9e934dc4a5e471214d6"
|
||||||
url: "https://github.com/Iconica-Development/flutter_community_chat.git"
|
url: "https://github.com/Iconica-Development/flutter_community_chat.git"
|
||||||
source: git
|
source: git
|
||||||
version: "0.0.1"
|
version: "0.0.1"
|
||||||
|
@ -362,7 +362,7 @@ packages:
|
||||||
name: pub_semver
|
name: pub_semver
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.2"
|
version: "2.1.3"
|
||||||
sky_engine:
|
sky_engine:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description: flutter
|
description: flutter
|
||||||
|
@ -430,7 +430,7 @@ packages:
|
||||||
name: uuid
|
name: uuid
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.6"
|
version: "3.0.7"
|
||||||
vector_math:
|
vector_math:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
|
@ -203,7 +203,7 @@ packages:
|
||||||
name: pub_semver
|
name: pub_semver
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.2"
|
version: "2.1.3"
|
||||||
sky_engine:
|
sky_engine:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description: flutter
|
description: flutter
|
||||||
|
|
|
@ -186,7 +186,7 @@ packages:
|
||||||
description:
|
description:
|
||||||
path: "packages/flutter_community_chat_interface"
|
path: "packages/flutter_community_chat_interface"
|
||||||
ref: HEAD
|
ref: HEAD
|
||||||
resolved-ref: "3793e853721291dc50655ca4ee7999508fe9e2fe"
|
resolved-ref: "5c4556f800e2b9806605f9e934dc4a5e471214d6"
|
||||||
url: "https://github.com/Iconica-Development/flutter_community_chat.git"
|
url: "https://github.com/Iconica-Development/flutter_community_chat.git"
|
||||||
source: git
|
source: git
|
||||||
version: "0.0.1"
|
version: "0.0.1"
|
||||||
|
@ -392,14 +392,14 @@ packages:
|
||||||
name: pub_semver
|
name: pub_semver
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.2"
|
version: "2.1.3"
|
||||||
rxdart:
|
rxdart:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: rxdart
|
name: rxdart
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.27.5"
|
version: "0.27.7"
|
||||||
sky_engine:
|
sky_engine:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description: flutter
|
description: flutter
|
||||||
|
@ -488,7 +488,7 @@ packages:
|
||||||
name: uuid
|
name: uuid
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.6"
|
version: "3.0.7"
|
||||||
vector_math:
|
vector_math:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
|
@ -179,7 +179,7 @@ packages:
|
||||||
description:
|
description:
|
||||||
path: "packages/flutter_community_chat_interface"
|
path: "packages/flutter_community_chat_interface"
|
||||||
ref: HEAD
|
ref: HEAD
|
||||||
resolved-ref: "3793e853721291dc50655ca4ee7999508fe9e2fe"
|
resolved-ref: "5c4556f800e2b9806605f9e934dc4a5e471214d6"
|
||||||
url: "https://github.com/Iconica-Development/flutter_community_chat.git"
|
url: "https://github.com/Iconica-Development/flutter_community_chat.git"
|
||||||
source: git
|
source: git
|
||||||
version: "0.0.1"
|
version: "0.0.1"
|
||||||
|
@ -378,14 +378,14 @@ packages:
|
||||||
name: pub_semver
|
name: pub_semver
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.2"
|
version: "2.1.3"
|
||||||
rxdart:
|
rxdart:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: rxdart
|
name: rxdart
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.27.5"
|
version: "0.27.7"
|
||||||
sky_engine:
|
sky_engine:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description: flutter
|
description: flutter
|
||||||
|
@ -474,7 +474,7 @@ packages:
|
||||||
name: uuid
|
name: uuid
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.6"
|
version: "3.0.7"
|
||||||
vector_math:
|
vector_math:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
Loading…
Reference in a new issue