dataflow 1.4.0 dataflow: ^1.4.0 copied to clipboard
A reactive state management library for Flutter with a simple and intuitive API which allows you to build Flutter applications with ease.
// main.dart
import 'package:dataflow/dataflow.dart';
import 'package:example/store.dart';
import 'package:flutter/material.dart';
import 'login_widget.dart';
import 'todo_widget.dart';
void main() {
final store = AppStore();
DataFlow.init(store);
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
final store = DataFlow.getStore<AppStore>();
return MaterialApp(
home: store.isLoggedIn ? TodoScreen() : LoginScreen(),
);
}
}