veilidchat/lib/chat/cubits/active_chat_cubit.dart

14 lines
452 B
Dart
Raw Normal View History

2024-01-30 17:03:14 -05:00
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:veilid_support/veilid_support.dart';
class ActiveChatCubit extends Cubit<TypedKey?> {
2024-02-13 22:03:26 -05:00
ActiveChatCubit(super.initialState, this.setHasActiveChat);
2024-01-30 17:03:14 -05:00
2024-02-08 21:05:59 -05:00
void setActiveChat(TypedKey? activeChatRemoteConversationRecordKey) {
2024-02-13 22:03:26 -05:00
setHasActiveChat(activeChatRemoteConversationRecordKey != null);
2024-02-08 21:05:59 -05:00
emit(activeChatRemoteConversationRecordKey);
2024-01-30 17:03:14 -05:00
}
2024-02-13 22:03:26 -05:00
void Function(bool) setHasActiveChat;
2024-01-30 17:03:14 -05:00
}