Created
January 8, 2023 13:04
-
-
Save FlutterWiz/4b92dca9fcb48c1c0ac7e4dbc98907bf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@override | |
Future<void> close() async { | |
await _currentUserChannelsSubscription?.cancel(); | |
super.close(); | |
} | |
void reset() { | |
emit( | |
state.copyWith( | |
isInProgress: false, | |
isChannelCreated: false, | |
isCapturedPhotoSent: false, | |
listOfSelectedUsers: {}, | |
listOfSelectedUserIDs: {}, | |
channelName: "", | |
), | |
); | |
} | |
void channelNameChanged({required String channelName}) { | |
emit(state.copyWith(channelName: channelName)); | |
} | |
void validateChannelName({required bool isChannelNameValid}) { | |
emit( | |
state.copyWith(isChannelNameValid: isChannelNameValid), | |
); | |
} | |
Future<void> _listenCurrentUserChannelsChangeStream(List<Channel> currentUserChannels) async { | |
emit(state.copyWith(currentUserChannels: currentUserChannels)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment