refactor: add const optimizations for widget constructors
- Add const to genericMap() constructor call in navigation - Add const to LocalizationsDelegate list initialization in firesApp Minor performance optimizations for widget creation.
This commit is contained in:
parent
ea588a9753
commit
debd62e03c
2 changed files with 2 additions and 2 deletions
|
|
@ -285,7 +285,7 @@ class _ActiveFiresPageState extends State<ActiveFiresPage> {
|
|||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute<void>(
|
||||
builder: (BuildContext context) => genericMap()));
|
||||
builder: (BuildContext context) => const genericMap()));
|
||||
}
|
||||
|
||||
void onAddYourLocation(AddYourLocationFunction onAdd) {
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ class _FiresAppState extends State<FiresApp> {
|
|||
store: store,
|
||||
child: MaterialApp(
|
||||
navigatorKey: navigatorKey,
|
||||
localizationsDelegates: <LocalizationsDelegate<dynamic>> [
|
||||
localizationsDelegates: const <LocalizationsDelegate<dynamic>> [
|
||||
S.delegate,
|
||||
GlobalMaterialLocalizations.delegate,
|
||||
GlobalWidgetsLocalizations.delegate,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue