voyager_bloc 0.1.0 copy "voyager_bloc: ^0.1.0" to clipboard
voyager_bloc: ^0.1.0 copied to clipboard

outdated

A BLoC plugin for Voyager. Allows describing Bloc's initial state in YAML config.

voyager_bloc #

A new Flutter package project.

Class Hierarchy & Bloc Plugin Builder #

Flutter Dart has no reflection and runtimeType doesn't contain information about parent classes, therefore voyager bloc plugin builder has specific API to address this issue:

If your bloc class (e.g. ParentBloc) is extending directly from Bloc use:

addBaseBloc<ParentBloc>((routeContext, config, repository) {
    return ParentBloc();
})

If your bloc doesn't extend directly from Bloc but e.g. from ParentBloc you will want to use:

addBloc<ChildBloc, ParentBloc>((routeContext, config, repository) {
    return ChildBloc();
})
0
likes
0
pub points
0%
popularity

Publisher

unverified uploader

A BLoC plugin for Voyager. Allows describing Bloc's initial state in YAML config.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

bloc, flutter, flutter_bloc, voyager

More

Packages that depend on voyager_bloc