feat: implement social login functionality with Google, Facebook, and Twitter, including API integration and platform-specific configurations.

This commit is contained in:
pradeepkumar
2026-03-26 00:07:31 +05:30
parent ad2d50138a
commit c5f905b4d3
14 changed files with 479 additions and 14 deletions

View File

@@ -423,7 +423,7 @@ class MessagingNotifier extends StateNotifier<MessagingState> {
conversations: updatedConversations,
isSending: false,
);
} catch (_) {
} catch (e) {
final messagesAfterError =
List<ChatMessage>.from(state.messages[conversationId] ?? []);
messagesAfterError.removeWhere((m) => m.id == tempId);
@@ -432,10 +432,15 @@ class MessagingNotifier extends StateNotifier<MessagingState> {
Map<String, List<ChatMessage>>.from(state.messages)
..[conversationId] = messagesAfterError;
// Show specific error for connection-required failures
final errorMsg = e.toString().contains('connection')
? 'You must be connected to send messages'
: 'Failed to send message';
state = state.copyWith(
messages: errorMessages,
isSending: false,
error: 'Failed to send message',
error: errorMsg,
);
}
}