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(
|
Navigator.push(
|
||||||
context,
|
context,
|
||||||
MaterialPageRoute<void>(
|
MaterialPageRoute<void>(
|
||||||
builder: (BuildContext context) => genericMap()));
|
builder: (BuildContext context) => const genericMap()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void onAddYourLocation(AddYourLocationFunction onAdd) {
|
void onAddYourLocation(AddYourLocationFunction onAdd) {
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ class _FiresAppState extends State<FiresApp> {
|
||||||
store: store,
|
store: store,
|
||||||
child: MaterialApp(
|
child: MaterialApp(
|
||||||
navigatorKey: navigatorKey,
|
navigatorKey: navigatorKey,
|
||||||
localizationsDelegates: <LocalizationsDelegate<dynamic>> [
|
localizationsDelegates: const <LocalizationsDelegate<dynamic>> [
|
||||||
S.delegate,
|
S.delegate,
|
||||||
GlobalMaterialLocalizations.delegate,
|
GlobalMaterialLocalizations.delegate,
|
||||||
GlobalWidgetsLocalizations.delegate,
|
GlobalWidgetsLocalizations.delegate,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue