no_bloc_flutter 0.3.11

Flutter Android iOS web

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.

4
likes
100
pub points
48%
popularity

Publisher

muha.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, hive, no_bloc, path, rxdart, synchronized

More

Packages that depend on no_bloc_flutter