From d12c5d034933552c7982243ba91ffe240d0d19b7 Mon Sep 17 00:00:00 2001 From: Lea Date: Sun, 5 Feb 2023 20:54:11 +0100 Subject: [PATCH] make MyApp stateful so the linter fucking shuts up --- lib/main.dart | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index f4fce27..abd6848 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -22,13 +22,18 @@ final api = FeverAPI(); void main() { setupBackgroundTasks(); - runApp(MyApp()); + runApp(const MyApp()); } -class MyApp extends StatelessWidget { - SharedPreferences? prefs; +class MyApp extends StatefulWidget { + const MyApp({super.key}); - MyApp({super.key}); + @override + State createState() => _MyAppState(); +} + +class _MyAppState extends State { + SharedPreferences? prefs; Future _loadPrefs() async { var prefs = await SharedPreferences.getInstance();