flutter_love 0.1.0-beta.8 copy "flutter_love: ^0.1.0-beta.8" to clipboard
flutter_love: ^0.1.0-beta.8 copied to clipboard

outdated

Provide flutter widgets handle common use case with love state management library

flutter_love #

flutter_love provide flutter widgets handle common use case with love state management library.

React Widget #

React Widget is a combination of react operator and widget builder.

It can consume a System with widget builder:


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

class UseReactWidgetPage extends StatefulWidget {

  @override
  createState() => _UseReactWidgetPageState();
}

class _UseReactWidgetPageState extends State<UseReactWidgetPage> {

  late final System<int, CounterEvent> _system;

  @override
  void initState() {
    super.initState();
    _system = createCounterSystem();
  }

  @override
  Widget build(BuildContext context) {
    return ReactState<int, CounterEvent>(
      system: _system,
      builder: (context, state, dispatch) {
        return CounterPage(
          title: 'Use React Widget Page',
          count: state,
          onIncreasePressed: () => dispatch(Increment()),
        );
      }
    );
  }
}

License #

The MIT License (MIT)

0
likes
0
points
26
downloads

Publisher

unverified uploader

Weekly Downloads

Provide flutter widgets handle common use case with love state management library

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, love

More

Packages that depend on flutter_love