flutter_love_provider

Last updated:

0 purchases

flutter_love_provider Image
flutter_love_provider Images
Add to Cart

Description:

flutter love provider

flutter_love_provider #



flutter_love_provider provide flutter widgets for supporting solution base on flutter, love and provider.
SystemProviders #
SystemProviders can consume a System then provide state and dispatch to descendant widgets.
Descendant widget can access state and dispatch from context:

System<int, CounterEvent> createCounterSystem() { ... }

class UseSystemProvidersPage extends StatelessWidget {
const UseSystemProvidersPage({ Key? key }) : super(key: key);

@override
Widget build(BuildContext context) {
return SystemProviders(
create: (_) => createCounterSystem(),
builder: (context, _) {
final state = context.watch<int>(); // <- access state
return CounterPage(
title: 'Use System Providers Page',
count: state,
onIncreasePressed: () => context
.dispatch<CounterEvent>(Increment()), // <- access dispatch
);
},
);
}
}

copied to clipboard
License #
The MIT License (MIT)

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.