Skip to content

Instantly share code, notes, and snippets.

@FlutterWiz
Created January 8, 2023 13:02
Show Gist options
  • Save FlutterWiz/d0304c739347296425f6ae0e0fee3dce to your computer and use it in GitHub Desktop.
Save FlutterWiz/d0304c739347296425f6ae0e0fee3dce to your computer and use it in GitHub Desktop.
@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),
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment