Load user preferences at start of app. Manage locations: user is able to add locations by lat and lon to shared preferences

This commit is contained in:
Konstantin Kollar
2022-09-04 22:04:15 +02:00
parent b0c4afe1f3
commit 730634bdb2
6 changed files with 86 additions and 36 deletions
+6 -1
View File
@@ -1,8 +1,13 @@
import 'package:flutter/material.dart';
import 'package:wetter/components/main_menu.dart';
import 'package:wetter/screens/main_weather_view.dart';
import 'package:wetter/services/user_preferences.dart';
void main() => runApp(const MyApp());
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await UserPreferences.init();
runApp(const MyApp());
}
class MyApp extends StatefulWidget {
const MyApp({super.key});