autoclose_bloc

Creator: coderz1093

Last updated:

0 purchases

autoclose_bloc Image
autoclose_bloc Images

Languages

Categories

Add to Cart

Description:

autoclose bloc

AutoClose-Bloc #
This is a part of AutoClose package: You should first visit this link to
become familiar with the key concepts of this library..
This library provides functionality of AutoClose package for Bloc classes.
Getting started #
# required
flutter pub add autoclose
# it is POSSIBLE to use without Flutter. Can't imagine why
flutter pub add autoclose_flutter
# optional, but I insist on giving it a chance
flutter pub add autoclose_lint
# this lib
flutter pub add autoclose_bloc
copied to clipboard
Usage #
class ProfileEditingFormBloc extends Bloc<ProfileEditingFormEvent, ProfileEditingFormState>
// add AutoCloseBloc mixin to your bloc either manualy
// or by closer bloc assist (press `⌘.` in VS Code or `Alt+Enter` in IntelliJ Idea)
with AutoCloseBloc {

final UserRepository userRepository;

ProfileEditingFormBloc({
required this.userRepository,
}) {
on<ProfileFetchRenewedUserData>(_onProfileFetchRenewedUserData);
// ... other events

userRepository.userAuthTokenStream.listen((token) {
add(ProfileFetchRenewedUserData(token: token));
})
// AutoCloseBloc mixin provides `closeWith` functionality for your Bloc classes
.closeWith(this);
}
}
copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.