flutter_built_bloc 0.3.2 copy "flutter_built_bloc: ^0.3.2" to clipboard
flutter_built_bloc: ^0.3.2 copied to clipboard

outdated

Generates the BLoC boilerplate.

flutter_built_bloc #

Helper widgets for adopting the BLoC pattern in combination with built_bloc

BlocProvider #

Create a BlocProvider and give him your Bloc.

class Example extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return BlocProvider(blocBuilder:(c) => ExampleBloc(), child: ExampleView());
  }
}

You can then access it with the BlocProvider.of method :

class ExampleView extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    final bloc = BlocProvider.of<ExampleBloc>(context);
    // ...
  }
}

Note #

Under the hood, the provider package is used, so you have access to all its APIs.

How to use #

Install #

dependencies:
  flutter_built_bloc:
0
likes
0
pub points
0%
popularity

Publisher

unverified uploader

Generates the BLoC boilerplate.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

built_bloc, flutter, provider

More

Packages that depend on flutter_built_bloc