empire 0.8.2 copy "empire: ^0.8.2" to clipboard
empire: ^0.8.2 copied to clipboard

outdated

A simple yet powerful state management library for Flutter.

example/lib/main.dart

import 'package:empire/empire.dart';

import 'package:flutter/material.dart';
import 'package:uuid/uuid.dart';

import 'application_view_model.dart';
import 'counter_page.dart';
import 'counter_view_model.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Empire State Example',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: Empire(
        ApplicationViewModel(),
        onAppStateChanged: () => const Uuid().v1(),
        child: CounterPage(
          viewModel: CounterViewModel(),
        ),
      ),
    );
  }
}
10
likes
0
pub points
47%
popularity

Publisher

verified publisherstrivebusiness.ca

A simple yet powerful state management library for Flutter.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on empire