mirror of
https://github.com/dz0ny/meshcore-sar.git
synced 2026-08-15 10:20:33 +00:00
feat: Refactor MaterialApp initialization into a separate method for improved readability
This commit is contained in:
@@ -136,10 +136,16 @@ class _MeshCoreSarAppState extends State<MeshCoreSarApp> {
|
||||
),
|
||||
),
|
||||
],
|
||||
child: Builder(
|
||||
child: _buildMaterialApp(),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildMaterialApp() {
|
||||
return Builder(
|
||||
builder: (context) {
|
||||
final systemBrightness = MediaQuery.platformBrightnessOf(context);
|
||||
return MaterialApp(
|
||||
key: ValueKey<String?>('${_locale?.languageCode ?? 'system'}_${_themeMode.name}'),
|
||||
title: 'MeshCore SAR',
|
||||
debugShowCheckedModeBanner: false,
|
||||
theme: AppTheme.getTheme(_themeMode, systemBrightness),
|
||||
@@ -159,7 +165,6 @@ class _MeshCoreSarAppState extends State<MeshCoreSarApp> {
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user