clover 4.0.2
clover: ^4.0.2 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(),
),
);
}
}