From 949b7f230cebead43ebac3f9ee022765283800a7 Mon Sep 17 00:00:00 2001 From: cp-ishita-g Date: Mon, 22 Jul 2024 17:36:50 +0530 Subject: [PATCH] remove config file --- .../ui/flow/message/chat/chat_view_model.dart | 16 ++++- .../message/chat/chat_view_model.freezed.dart | 66 +++++++++++++------ .../ui/flow/message/thread_list_screen.dart | 6 +- data/.flutter-plugins-dependencies | 2 +- data/lib/api/message/api_message_service.dart | 1 + 5 files changed, 62 insertions(+), 29 deletions(-) diff --git a/app/lib/ui/flow/message/chat/chat_view_model.dart b/app/lib/ui/flow/message/chat/chat_view_model.dart index 4d8b031f..b462b9c8 100644 --- a/app/lib/ui/flow/message/chat/chat_view_model.dart +++ b/app/lib/ui/flow/message/chat/chat_view_model.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:data/api/auth/api_user_service.dart'; import 'package:data/api/auth/auth_models.dart'; import 'package:data/api/message/api_message_service.dart'; @@ -36,6 +38,7 @@ class ChatViewNotifier extends StateNotifier { bool _hasMoreItems = true; bool loadingData = false; + StreamSubscription>? _messageSubscription; ChatViewNotifier(this.threadId, this.messageService, this.apiMessageService, this.userService, this.currentUser) : super(ChatViewState(message: TextEditingController(), currentUserId: currentUser?.id ?? '')); @@ -61,8 +64,10 @@ class ChatViewNotifier extends StateNotifier { void listenThread(String threadId) async { try { if (threadId.isEmpty) return; + if (state.creating) return; + _cancelMessageSubscription(); state = state.copyWith(loading: state.messages.isEmpty); - messageService.getLatestMessages(threadId, limit: 20).listen((messages) { + _messageSubscription = messageService.getLatestMessages(threadId, limit: 20).listen((messages) { state = state.copyWith(messages: messages, loading: false); _hasMoreItems = messages.length == MAX_PAGE_LIMIT; }); @@ -135,6 +140,8 @@ class ChatViewNotifier extends StateNotifier { void createNewThread(String spaceId, String message) async { try { + state = state.copyWith(creating: true); + _cancelMessageSubscription(); List selectedMembers = []; if (!selectedMembers.contains(currentUser?.id) && state.selectedMember.isNotEmpty) { selectedMembers.addAll(state.selectedMember); @@ -148,7 +155,6 @@ class ChatViewNotifier extends StateNotifier { state = state.copyWith(showMemberSelectionView: false, threadId: threadId, isNewThread: true); if (threadId.isNotEmpty) { sendMessage(threadId, message); - getCreatedThread(threadId); } } catch (error, stack) { state = state.copyWith(loading: false, error: error); @@ -160,6 +166,11 @@ class ChatViewNotifier extends StateNotifier { } } + void _cancelMessageSubscription() { + _messageSubscription?.cancel(); + _messageSubscription = null; + } + void getCreatedThread(String threadId) async { try { final thread = await messageService.getThread(threadId); @@ -323,6 +334,7 @@ class ChatViewNotifier extends StateNotifier { class ChatViewState with _$ChatViewState { const factory ChatViewState({ @Default(false) bool loading, + @Default(false) bool creating, @Default(false) bool loadingMessages, @Default(false) bool messageSending, @Default(false) bool allowSend, diff --git a/app/lib/ui/flow/message/chat/chat_view_model.freezed.dart b/app/lib/ui/flow/message/chat/chat_view_model.freezed.dart index 0dd56840..43a0df20 100644 --- a/app/lib/ui/flow/message/chat/chat_view_model.freezed.dart +++ b/app/lib/ui/flow/message/chat/chat_view_model.freezed.dart @@ -17,6 +17,7 @@ final _privateConstructorUsedError = UnsupportedError( /// @nodoc mixin _$ChatViewState { bool get loading => throw _privateConstructorUsedError; + bool get creating => throw _privateConstructorUsedError; bool get loadingMessages => throw _privateConstructorUsedError; bool get messageSending => throw _privateConstructorUsedError; bool get allowSend => throw _privateConstructorUsedError; @@ -48,6 +49,7 @@ abstract class $ChatViewStateCopyWith<$Res> { @useResult $Res call( {bool loading, + bool creating, bool loadingMessages, bool messageSending, bool allowSend, @@ -84,6 +86,7 @@ class _$ChatViewStateCopyWithImpl<$Res, $Val extends ChatViewState> @override $Res call({ Object? loading = null, + Object? creating = null, Object? loadingMessages = null, Object? messageSending = null, Object? allowSend = null, @@ -107,6 +110,10 @@ class _$ChatViewStateCopyWithImpl<$Res, $Val extends ChatViewState> ? _value.loading : loading // ignore: cast_nullable_to_non_nullable as bool, + creating: null == creating + ? _value.creating + : creating // ignore: cast_nullable_to_non_nullable + as bool, loadingMessages: null == loadingMessages ? _value.loadingMessages : loadingMessages // ignore: cast_nullable_to_non_nullable @@ -210,6 +217,7 @@ abstract class _$$ChatViewStateImplCopyWith<$Res> @useResult $Res call( {bool loading, + bool creating, bool loadingMessages, bool messageSending, bool allowSend, @@ -246,6 +254,7 @@ class __$$ChatViewStateImplCopyWithImpl<$Res> @override $Res call({ Object? loading = null, + Object? creating = null, Object? loadingMessages = null, Object? messageSending = null, Object? allowSend = null, @@ -269,6 +278,10 @@ class __$$ChatViewStateImplCopyWithImpl<$Res> ? _value.loading : loading // ignore: cast_nullable_to_non_nullable as bool, + creating: null == creating + ? _value.creating + : creating // ignore: cast_nullable_to_non_nullable + as bool, loadingMessages: null == loadingMessages ? _value.loadingMessages : loadingMessages // ignore: cast_nullable_to_non_nullable @@ -343,6 +356,7 @@ class __$$ChatViewStateImplCopyWithImpl<$Res> class _$ChatViewStateImpl implements _ChatViewState { const _$ChatViewStateImpl( {this.loading = false, + this.creating = false, this.loadingMessages = false, this.messageSending = false, this.allowSend = false, @@ -371,6 +385,9 @@ class _$ChatViewStateImpl implements _ChatViewState { final bool loading; @override @JsonKey() + final bool creating; + @override + @JsonKey() final bool loadingMessages; @override @JsonKey() @@ -447,7 +464,7 @@ class _$ChatViewStateImpl implements _ChatViewState { @override String toString() { - return 'ChatViewState(loading: $loading, loadingMessages: $loadingMessages, messageSending: $messageSending, allowSend: $allowSend, showMemberSelectionView: $showMemberSelectionView, isNewThread: $isNewThread, users: $users, threadId: $threadId, title: $title, message: $message, messages: $messages, sender: $sender, selectedMember: $selectedMember, error: $error, spaceInfo: $spaceInfo, threadInfo: $threadInfo, currentUserId: $currentUserId, threadList: $threadList)'; + return 'ChatViewState(loading: $loading, creating: $creating, loadingMessages: $loadingMessages, messageSending: $messageSending, allowSend: $allowSend, showMemberSelectionView: $showMemberSelectionView, isNewThread: $isNewThread, users: $users, threadId: $threadId, title: $title, message: $message, messages: $messages, sender: $sender, selectedMember: $selectedMember, error: $error, spaceInfo: $spaceInfo, threadInfo: $threadInfo, currentUserId: $currentUserId, threadList: $threadList)'; } @override @@ -456,6 +473,8 @@ class _$ChatViewStateImpl implements _ChatViewState { (other.runtimeType == runtimeType && other is _$ChatViewStateImpl && (identical(other.loading, loading) || other.loading == loading) && + (identical(other.creating, creating) || + other.creating == creating) && (identical(other.loadingMessages, loadingMessages) || other.loadingMessages == loadingMessages) && (identical(other.messageSending, messageSending) || @@ -488,26 +507,28 @@ class _$ChatViewStateImpl implements _ChatViewState { } @override - int get hashCode => Object.hash( - runtimeType, - loading, - loadingMessages, - messageSending, - allowSend, - showMemberSelectionView, - isNewThread, - const DeepCollectionEquality().hash(_users), - threadId, - title, - message, - const DeepCollectionEquality().hash(_messages), - const DeepCollectionEquality().hash(_sender), - const DeepCollectionEquality().hash(_selectedMember), - const DeepCollectionEquality().hash(error), - spaceInfo, - threadInfo, - currentUserId, - const DeepCollectionEquality().hash(_threadList)); + int get hashCode => Object.hashAll([ + runtimeType, + loading, + creating, + loadingMessages, + messageSending, + allowSend, + showMemberSelectionView, + isNewThread, + const DeepCollectionEquality().hash(_users), + threadId, + title, + message, + const DeepCollectionEquality().hash(_messages), + const DeepCollectionEquality().hash(_sender), + const DeepCollectionEquality().hash(_selectedMember), + const DeepCollectionEquality().hash(error), + spaceInfo, + threadInfo, + currentUserId, + const DeepCollectionEquality().hash(_threadList) + ]); @JsonKey(ignore: true) @override @@ -519,6 +540,7 @@ class _$ChatViewStateImpl implements _ChatViewState { abstract class _ChatViewState implements ChatViewState { const factory _ChatViewState( {final bool loading, + final bool creating, final bool loadingMessages, final bool messageSending, final bool allowSend, @@ -540,6 +562,8 @@ abstract class _ChatViewState implements ChatViewState { @override bool get loading; @override + bool get creating; + @override bool get loadingMessages; @override bool get messageSending; diff --git a/app/lib/ui/flow/message/thread_list_screen.dart b/app/lib/ui/flow/message/thread_list_screen.dart index caff9084..28a4bea3 100644 --- a/app/lib/ui/flow/message/thread_list_screen.dart +++ b/app/lib/ui/flow/message/thread_list_screen.dart @@ -16,7 +16,6 @@ import 'package:yourspace_flutter/domain/extenstions/widget_extensions.dart'; import 'package:yourspace_flutter/ui/app_route.dart'; import 'package:yourspace_flutter/ui/components/app_page.dart'; import 'package:yourspace_flutter/ui/components/error_snakebar.dart'; -import 'package:yourspace_flutter/ui/components/resume_detector.dart'; import 'package:yourspace_flutter/ui/flow/message/thread_list_view_model.dart'; import 'package:flutter_slidable/flutter_slidable.dart'; @@ -55,10 +54,7 @@ class _ThreadListScreenState extends ConsumerState { return AppPage( title: widget.spaceInfo.space.name, - body: ResumeDetector( - onResume: () => notifier.listenThreads(widget.spaceInfo.space.id), - child: _body(context, state), - ), + body: _body(context, state), floatingActionButton: widget.spaceInfo.members.length >= 2 ? LargeIconButton( onTap: () { diff --git a/data/.flutter-plugins-dependencies b/data/.flutter-plugins-dependencies index 281790ef..c32719a5 100644 --- a/data/.flutter-plugins-dependencies +++ b/data/.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/ishita/.pub-cache/hosted/pub.dev/cloud_firestore-4.17.5/","native_build":true,"dependencies":["firebase_core"]},{"name":"cloud_functions","path":"/Users/ishita/.pub-cache/hosted/pub.dev/cloud_functions-4.7.6/","native_build":true,"dependencies":["firebase_core"]},{"name":"device_info_plus","path":"/Users/ishita/.pub-cache/hosted/pub.dev/device_info_plus-9.1.2/","native_build":true,"dependencies":[]},{"name":"firebase_auth","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_auth-4.20.0/","native_build":true,"dependencies":["firebase_core"]},{"name":"firebase_core","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_core-2.32.0/","native_build":true,"dependencies":[]},{"name":"firebase_storage","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_storage-11.7.7/","native_build":true,"dependencies":["firebase_core"]},{"name":"flutter_timezone","path":"/Users/ishita/.pub-cache/hosted/pub.dev/flutter_timezone-1.0.8/","native_build":true,"dependencies":[]},{"name":"google_sign_in_ios","path":"/Users/ishita/.pub-cache/hosted/pub.dev/google_sign_in_ios-5.7.6/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"package_info_plus","path":"/Users/ishita/.pub-cache/hosted/pub.dev/package_info_plus-8.0.0/","native_build":true,"dependencies":[]},{"name":"shared_preferences_foundation","path":"/Users/ishita/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.4.0/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"cloud_firestore","path":"/Users/ishita/.pub-cache/hosted/pub.dev/cloud_firestore-4.17.5/","native_build":true,"dependencies":["firebase_core"]},{"name":"cloud_functions","path":"/Users/ishita/.pub-cache/hosted/pub.dev/cloud_functions-4.7.6/","native_build":true,"dependencies":["firebase_core"]},{"name":"device_info_plus","path":"/Users/ishita/.pub-cache/hosted/pub.dev/device_info_plus-9.1.2/","native_build":true,"dependencies":[]},{"name":"firebase_auth","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_auth-4.20.0/","native_build":true,"dependencies":["firebase_core"]},{"name":"firebase_core","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_core-2.32.0/","native_build":true,"dependencies":[]},{"name":"firebase_storage","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_storage-11.7.7/","native_build":true,"dependencies":["firebase_core"]},{"name":"flutter_timezone","path":"/Users/ishita/.pub-cache/hosted/pub.dev/flutter_timezone-1.0.8/","native_build":true,"dependencies":[]},{"name":"google_sign_in_android","path":"/Users/ishita/.pub-cache/hosted/pub.dev/google_sign_in_android-6.1.23/","native_build":true,"dependencies":[]},{"name":"package_info_plus","path":"/Users/ishita/.pub-cache/hosted/pub.dev/package_info_plus-8.0.0/","native_build":true,"dependencies":[]},{"name":"shared_preferences_android","path":"/Users/ishita/.pub-cache/hosted/pub.dev/shared_preferences_android-2.2.2/","native_build":true,"dependencies":[]}],"macos":[{"name":"cloud_firestore","path":"/Users/ishita/.pub-cache/hosted/pub.dev/cloud_firestore-4.17.5/","native_build":true,"dependencies":["firebase_core"]},{"name":"cloud_functions","path":"/Users/ishita/.pub-cache/hosted/pub.dev/cloud_functions-4.7.6/","native_build":true,"dependencies":["firebase_core"]},{"name":"device_info_plus","path":"/Users/ishita/.pub-cache/hosted/pub.dev/device_info_plus-9.1.2/","native_build":true,"dependencies":[]},{"name":"firebase_auth","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_auth-4.20.0/","native_build":true,"dependencies":["firebase_core"]},{"name":"firebase_core","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_core-2.32.0/","native_build":true,"dependencies":[]},{"name":"firebase_storage","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_storage-11.7.7/","native_build":true,"dependencies":["firebase_core"]},{"name":"flutter_timezone","path":"/Users/ishita/.pub-cache/hosted/pub.dev/flutter_timezone-1.0.8/","native_build":true,"dependencies":[]},{"name":"google_sign_in_ios","path":"/Users/ishita/.pub-cache/hosted/pub.dev/google_sign_in_ios-5.7.6/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"package_info_plus","path":"/Users/ishita/.pub-cache/hosted/pub.dev/package_info_plus-8.0.0/","native_build":true,"dependencies":[]},{"name":"shared_preferences_foundation","path":"/Users/ishita/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.4.0/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"device_info_plus","path":"/Users/ishita/.pub-cache/hosted/pub.dev/device_info_plus-9.1.2/","native_build":false,"dependencies":[]},{"name":"package_info_plus","path":"/Users/ishita/.pub-cache/hosted/pub.dev/package_info_plus-8.0.0/","native_build":false,"dependencies":[]},{"name":"path_provider_linux","path":"/Users/ishita/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[]},{"name":"shared_preferences_linux","path":"/Users/ishita/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.3.2/","native_build":false,"dependencies":["path_provider_linux"]}],"windows":[{"name":"cloud_firestore","path":"/Users/ishita/.pub-cache/hosted/pub.dev/cloud_firestore-4.17.5/","native_build":true,"dependencies":["firebase_core"]},{"name":"device_info_plus","path":"/Users/ishita/.pub-cache/hosted/pub.dev/device_info_plus-9.1.2/","native_build":false,"dependencies":[]},{"name":"firebase_auth","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_auth-4.20.0/","native_build":true,"dependencies":["firebase_core"]},{"name":"firebase_core","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_core-2.32.0/","native_build":true,"dependencies":[]},{"name":"firebase_storage","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_storage-11.7.7/","native_build":true,"dependencies":["firebase_core"]},{"name":"package_info_plus","path":"/Users/ishita/.pub-cache/hosted/pub.dev/package_info_plus-8.0.0/","native_build":false,"dependencies":[]},{"name":"path_provider_windows","path":"/Users/ishita/.pub-cache/hosted/pub.dev/path_provider_windows-2.2.1/","native_build":false,"dependencies":[]},{"name":"shared_preferences_windows","path":"/Users/ishita/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.3.2/","native_build":false,"dependencies":["path_provider_windows"]}],"web":[{"name":"cloud_firestore_web","path":"/Users/ishita/.pub-cache/hosted/pub.dev/cloud_firestore_web-3.12.5/","dependencies":["firebase_core_web"]},{"name":"cloud_functions_web","path":"/Users/ishita/.pub-cache/hosted/pub.dev/cloud_functions_web-4.9.6/","dependencies":["firebase_core_web"]},{"name":"device_info_plus","path":"/Users/ishita/.pub-cache/hosted/pub.dev/device_info_plus-9.1.2/","dependencies":[]},{"name":"firebase_auth_web","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_auth_web-5.12.0/","dependencies":["firebase_core_web"]},{"name":"firebase_core_web","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_core_web-2.17.1/","dependencies":[]},{"name":"firebase_storage_web","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_storage_web-3.9.7/","dependencies":["firebase_core_web"]},{"name":"flutter_timezone","path":"/Users/ishita/.pub-cache/hosted/pub.dev/flutter_timezone-1.0.8/","dependencies":[]},{"name":"google_sign_in_web","path":"/Users/ishita/.pub-cache/hosted/pub.dev/google_sign_in_web-0.12.3+3/","dependencies":[]},{"name":"package_info_plus","path":"/Users/ishita/.pub-cache/hosted/pub.dev/package_info_plus-8.0.0/","dependencies":[]},{"name":"shared_preferences_web","path":"/Users/ishita/.pub-cache/hosted/pub.dev/shared_preferences_web-2.3.0/","dependencies":[]}]},"dependencyGraph":[{"name":"cloud_firestore","dependencies":["cloud_firestore_web","firebase_core"]},{"name":"cloud_firestore_web","dependencies":["firebase_core","firebase_core_web"]},{"name":"cloud_functions","dependencies":["cloud_functions_web","firebase_core"]},{"name":"cloud_functions_web","dependencies":["firebase_core","firebase_core_web"]},{"name":"device_info_plus","dependencies":[]},{"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"]},{"name":"flutter_timezone","dependencies":[]},{"name":"google_sign_in","dependencies":["google_sign_in_android","google_sign_in_ios","google_sign_in_web"]},{"name":"google_sign_in_android","dependencies":[]},{"name":"google_sign_in_ios","dependencies":[]},{"name":"google_sign_in_web","dependencies":[]},{"name":"package_info_plus","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2024-06-11 17:20:21.066671","version":"3.22.1"} \ 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/ishita/.pub-cache/hosted/pub.dev/cloud_firestore-4.17.5/","native_build":true,"dependencies":["firebase_core"]},{"name":"cloud_functions","path":"/Users/ishita/.pub-cache/hosted/pub.dev/cloud_functions-4.7.6/","native_build":true,"dependencies":["firebase_core"]},{"name":"device_info_plus","path":"/Users/ishita/.pub-cache/hosted/pub.dev/device_info_plus-9.1.2/","native_build":true,"dependencies":[]},{"name":"firebase_auth","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_auth-4.20.0/","native_build":true,"dependencies":["firebase_core"]},{"name":"firebase_core","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_core-2.32.0/","native_build":true,"dependencies":[]},{"name":"firebase_storage","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_storage-11.7.7/","native_build":true,"dependencies":["firebase_core"]},{"name":"flutter_timezone","path":"/Users/ishita/.pub-cache/hosted/pub.dev/flutter_timezone-1.0.8/","native_build":true,"dependencies":[]},{"name":"google_sign_in_ios","path":"/Users/ishita/.pub-cache/hosted/pub.dev/google_sign_in_ios-5.7.6/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"package_info_plus","path":"/Users/ishita/.pub-cache/hosted/pub.dev/package_info_plus-8.0.0/","native_build":true,"dependencies":[]},{"name":"shared_preferences_foundation","path":"/Users/ishita/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.4.0/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"cloud_firestore","path":"/Users/ishita/.pub-cache/hosted/pub.dev/cloud_firestore-4.17.5/","native_build":true,"dependencies":["firebase_core"]},{"name":"cloud_functions","path":"/Users/ishita/.pub-cache/hosted/pub.dev/cloud_functions-4.7.6/","native_build":true,"dependencies":["firebase_core"]},{"name":"device_info_plus","path":"/Users/ishita/.pub-cache/hosted/pub.dev/device_info_plus-9.1.2/","native_build":true,"dependencies":[]},{"name":"firebase_auth","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_auth-4.20.0/","native_build":true,"dependencies":["firebase_core"]},{"name":"firebase_core","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_core-2.32.0/","native_build":true,"dependencies":[]},{"name":"firebase_storage","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_storage-11.7.7/","native_build":true,"dependencies":["firebase_core"]},{"name":"flutter_timezone","path":"/Users/ishita/.pub-cache/hosted/pub.dev/flutter_timezone-1.0.8/","native_build":true,"dependencies":[]},{"name":"google_sign_in_android","path":"/Users/ishita/.pub-cache/hosted/pub.dev/google_sign_in_android-6.1.23/","native_build":true,"dependencies":[]},{"name":"package_info_plus","path":"/Users/ishita/.pub-cache/hosted/pub.dev/package_info_plus-8.0.0/","native_build":true,"dependencies":[]},{"name":"shared_preferences_android","path":"/Users/ishita/.pub-cache/hosted/pub.dev/shared_preferences_android-2.2.2/","native_build":true,"dependencies":[]}],"macos":[{"name":"cloud_firestore","path":"/Users/ishita/.pub-cache/hosted/pub.dev/cloud_firestore-4.17.5/","native_build":true,"dependencies":["firebase_core"]},{"name":"cloud_functions","path":"/Users/ishita/.pub-cache/hosted/pub.dev/cloud_functions-4.7.6/","native_build":true,"dependencies":["firebase_core"]},{"name":"device_info_plus","path":"/Users/ishita/.pub-cache/hosted/pub.dev/device_info_plus-9.1.2/","native_build":true,"dependencies":[]},{"name":"firebase_auth","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_auth-4.20.0/","native_build":true,"dependencies":["firebase_core"]},{"name":"firebase_core","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_core-2.32.0/","native_build":true,"dependencies":[]},{"name":"firebase_storage","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_storage-11.7.7/","native_build":true,"dependencies":["firebase_core"]},{"name":"flutter_timezone","path":"/Users/ishita/.pub-cache/hosted/pub.dev/flutter_timezone-1.0.8/","native_build":true,"dependencies":[]},{"name":"google_sign_in_ios","path":"/Users/ishita/.pub-cache/hosted/pub.dev/google_sign_in_ios-5.7.6/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"package_info_plus","path":"/Users/ishita/.pub-cache/hosted/pub.dev/package_info_plus-8.0.0/","native_build":true,"dependencies":[]},{"name":"shared_preferences_foundation","path":"/Users/ishita/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.4.0/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"device_info_plus","path":"/Users/ishita/.pub-cache/hosted/pub.dev/device_info_plus-9.1.2/","native_build":false,"dependencies":[]},{"name":"package_info_plus","path":"/Users/ishita/.pub-cache/hosted/pub.dev/package_info_plus-8.0.0/","native_build":false,"dependencies":[]},{"name":"path_provider_linux","path":"/Users/ishita/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[]},{"name":"shared_preferences_linux","path":"/Users/ishita/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.3.2/","native_build":false,"dependencies":["path_provider_linux"]}],"windows":[{"name":"cloud_firestore","path":"/Users/ishita/.pub-cache/hosted/pub.dev/cloud_firestore-4.17.5/","native_build":true,"dependencies":["firebase_core"]},{"name":"device_info_plus","path":"/Users/ishita/.pub-cache/hosted/pub.dev/device_info_plus-9.1.2/","native_build":false,"dependencies":[]},{"name":"firebase_auth","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_auth-4.20.0/","native_build":true,"dependencies":["firebase_core"]},{"name":"firebase_core","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_core-2.32.0/","native_build":true,"dependencies":[]},{"name":"firebase_storage","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_storage-11.7.7/","native_build":true,"dependencies":["firebase_core"]},{"name":"package_info_plus","path":"/Users/ishita/.pub-cache/hosted/pub.dev/package_info_plus-8.0.0/","native_build":false,"dependencies":[]},{"name":"path_provider_windows","path":"/Users/ishita/.pub-cache/hosted/pub.dev/path_provider_windows-2.2.1/","native_build":false,"dependencies":[]},{"name":"shared_preferences_windows","path":"/Users/ishita/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.3.2/","native_build":false,"dependencies":["path_provider_windows"]}],"web":[{"name":"cloud_firestore_web","path":"/Users/ishita/.pub-cache/hosted/pub.dev/cloud_firestore_web-3.12.5/","dependencies":["firebase_core_web"]},{"name":"cloud_functions_web","path":"/Users/ishita/.pub-cache/hosted/pub.dev/cloud_functions_web-4.9.6/","dependencies":["firebase_core_web"]},{"name":"device_info_plus","path":"/Users/ishita/.pub-cache/hosted/pub.dev/device_info_plus-9.1.2/","dependencies":[]},{"name":"firebase_auth_web","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_auth_web-5.12.0/","dependencies":["firebase_core_web"]},{"name":"firebase_core_web","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_core_web-2.17.1/","dependencies":[]},{"name":"firebase_storage_web","path":"/Users/ishita/.pub-cache/hosted/pub.dev/firebase_storage_web-3.9.7/","dependencies":["firebase_core_web"]},{"name":"flutter_timezone","path":"/Users/ishita/.pub-cache/hosted/pub.dev/flutter_timezone-1.0.8/","dependencies":[]},{"name":"google_sign_in_web","path":"/Users/ishita/.pub-cache/hosted/pub.dev/google_sign_in_web-0.12.3+3/","dependencies":[]},{"name":"package_info_plus","path":"/Users/ishita/.pub-cache/hosted/pub.dev/package_info_plus-8.0.0/","dependencies":[]},{"name":"shared_preferences_web","path":"/Users/ishita/.pub-cache/hosted/pub.dev/shared_preferences_web-2.3.0/","dependencies":[]}]},"dependencyGraph":[{"name":"cloud_firestore","dependencies":["cloud_firestore_web","firebase_core"]},{"name":"cloud_firestore_web","dependencies":["firebase_core","firebase_core_web"]},{"name":"cloud_functions","dependencies":["cloud_functions_web","firebase_core"]},{"name":"cloud_functions_web","dependencies":["firebase_core","firebase_core_web"]},{"name":"device_info_plus","dependencies":[]},{"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"]},{"name":"flutter_timezone","dependencies":[]},{"name":"google_sign_in","dependencies":["google_sign_in_android","google_sign_in_ios","google_sign_in_web"]},{"name":"google_sign_in_android","dependencies":[]},{"name":"google_sign_in_ios","dependencies":[]},{"name":"google_sign_in_web","dependencies":[]},{"name":"package_info_plus","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2024-07-22 16:11:30.108199","version":"3.22.2"} \ No newline at end of file diff --git a/data/lib/api/message/api_message_service.dart b/data/lib/api/message/api_message_service.dart index c57d4671..985a41ec 100644 --- a/data/lib/api/message/api_message_service.dart +++ b/data/lib/api/message/api_message_service.dart @@ -59,6 +59,7 @@ class ApiMessageService { } Stream> getLatestMessages(String threadId, {int limit = 20}) { + print('called in api message service file'); return threadMessageRef(threadId) .orderBy("created_at", descending: true) .limit(limit)