mirror of
https://github.com/MaidFoundation/maid.git
synced 2023-12-01 22:17:36 +03:00
use callback instead of global key
This commit is contained in:
@@ -3,7 +3,6 @@ import 'package:maid/config/theme.dart';
|
||||
import 'package:maid/pages/home_page.dart';
|
||||
|
||||
final maidAppKey = GlobalKey<MaidAppState>();
|
||||
final homePageKey = GlobalKey<MaidHomePageState>();
|
||||
|
||||
void main() {
|
||||
runApp(MaidApp(key: maidAppKey));
|
||||
@@ -38,7 +37,7 @@ class MaidAppState extends State<MaidApp> {
|
||||
debugShowCheckedModeBanner: false,
|
||||
title: 'Maid',
|
||||
theme: MaidTheme.theme,
|
||||
home: MaidHomePage(key: homePageKey, title: 'Maid'),
|
||||
home: const MaidHomePage(title: 'Maid'),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user