no_bloc_flutter 0.13.1 copy "no_bloc_flutter: ^0.13.1" to clipboard
no_bloc_flutter: ^0.13.1 copied to clipboard

discontinuedreplaced by: ezbloc_flutter

Making blocs easy again. A simplified library for the original bloc approach.

Helper widgets to work with no_bloc library

Bloc Builder #

Keeps your UI in sync with the State of your app. It's StatelessWidget widget which only rebuilds the relative child, instead of rebuilding entire page.

BlocBuilder<BlocType, BlocStateType>(
  bloc: bloc
  onUpdate: (context, data) => Text(data.toString()),
  onBusy: (_) => Text('Working'),
  onError: (_, e) => Text('Error Occurred'),
)

Or a simpler version (extension method sugar):

bloc.builder(
  onUpdate: (context, data) => Text(data.toString()),
  onError: (_, e) => Text('Error Occurred: $e'),
)

for details see example

Bloc Container #

A container where you can store all your blocs on app startup, and then access them anywhere in your app independently of the widget tree.

void main() {
  BlocContainer.add((context, args) => CounterBloc(args));
  final counterBloc = BlocContainer.get(arg: 0);
}

see example

Bloc List Builder #

A builder which builds a ListView widget backed by a data source e.g. an infinite scrollable list backed by a rest api example coming soon

Contribution ❤ #

Issues and pull requests are welcome

Please file feature requests and bugs at the issue tracker.

5
likes
130
pub points
0%
popularity

Publisher

verified publishermuha.dev

Making blocs easy again. A simplified library for the original bloc approach.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter, flutter_test, hive, meta, no_bloc, path, pedantic, rxdart, synchronized

More

Packages that depend on no_bloc_flutter