diff options
| author | xengineering <me@xengineering.eu> | 2026-01-05 14:48:50 +0100 |
|---|---|---|
| committer | xengineering <me@xengineering.eu> | 2026-01-10 21:29:45 +0100 |
| commit | ee38d5671e0d6b8d0e1d3708a37b43a65682329f (patch) | |
| tree | b26ca93159c46fbe59bb9244d139cdc61fc64758 /lib/main.dart | |
| parent | 14d7ef0101400f531092ee4abfc42e9a0dfd218e (diff) | |
| download | sia-app-ee38d5671e0d6b8d0e1d3708a37b43a65682329f.tar sia-app-ee38d5671e0d6b8d0e1d3708a37b43a65682329f.tar.zst sia-app-ee38d5671e0d6b8d0e1d3708a37b43a65682329f.zip | |
Move state to data.dart
The UI should not store the application logic state.
Diffstat (limited to 'lib/main.dart')
| -rw-r--r-- | lib/main.dart | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/main.dart b/lib/main.dart index 805ef69..1601965 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,7 +1,14 @@ import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; import 'ui.dart'; +import 'data.dart'; void main() { - runApp(const UI()); + runApp( + ChangeNotifierProvider<AppState>( + create: (BuildContext context) => AppState(), + child: const UI(), + ), + ); } |
