Skip to main content

clover 4.0.3 copy "clover: ^4.0.3" to clipboard
clover: ^4.0.3 copied to clipboard

A lightweight MVVM framework for Flutter. It provides a ViewModel base class and a ViewModelBinding widget that rebuild views when the view model notifies changes.

example/lib/main.dart

import 'package:clover/clover.dart';
import 'package:material_ui/material_ui.dart';

import 'view_models.dart';
import 'views.dart';

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

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

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Clover',
      theme: ThemeData.light(),
      darkTheme: ThemeData.dark(),
      home: ViewModelBinding(
        viewBuilder: () => const HomeView(),
        viewModelBuilder: () => HomeViewModel(),
      ),
    );
  }
}
3
likes
150
points
209
downloads

Documentation

API reference

Publisher

verified publisherinvictus-dart.dev

Weekly Downloads

A lightweight MVVM framework for Flutter. It provides a ViewModel base class and a ViewModelBinding widget that rebuild views when the view model notifies changes.

Topics

#clover #mvvm

License

MIT (license)

Dependencies

flutter

More

Packages that depend on clover