esm 1.1.0 copy "esm: ^1.1.0" to clipboard
esm: ^1.1.0 copied to clipboard

discontinuedreplaced by: tilde
outdated

A Flutter package to simplify application state management using component.

ESM (Easy State Management) A Flutter package to simplify application state management using component.

Features #

Add this to your flutter app to:

  1. Create widgets with mutable state.
  2. Control widget through his state.
  3. Handle app routing easily.

Usage #

A simple counter component. For full counter app you can refer to the example section.

class Counter extends Component<int> {
  const Counter(super.state, {super.key});

  @override
  Widget render(BuildContext context) {
    return Center(
      child: Column(
        mainAxisAlignment: MainAxisAlignment.center,
        children: <Widget>[
          const Text(
            'You have pushed the button this many times:',
          ),
          Text(
            '${state.value}',
            style: Theme.of(context).textTheme.headlineMedium,
          ),
          ElevatedButton(
            onPressed: () => state.value++,
            child: const Text('Increment'),
          ),
        ],
      ),
    );
  }
}

image

Other examples #

Shopping Cart

image

Todo List

image

0
likes
150
points
1
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter package to simplify application state management using component.

Homepage

Documentation

API reference

License

MIT (license)

Dependencies

event, eventsubscriber, flutter, url_router

More

Packages that depend on esm