-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
43 changed files
with
1,714 additions
and
1,074 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,32 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:universal_io/io.dart'; | ||
import 'package:provider/provider.dart'; | ||
|
||
import '../l10n/l10ns.dart'; | ||
import 'app_state.dart'; | ||
import 'home_page.dart'; | ||
|
||
class App extends StatefulWidget { | ||
class App extends StatelessWidget { | ||
const App({super.key}); | ||
|
||
@override | ||
State<App> createState() => _AppState(); | ||
} | ||
|
||
class _AppState extends State<App> { | ||
Locale _selectedLocale = Locale(Platform.localeName.split('_')[0]); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return MaterialApp( | ||
title: 'DST Helper', | ||
restorationScopeId: 'restoration_scope_id_dst_helper_0.0.1_0_debug', | ||
locale: _selectedLocale, | ||
localizationsDelegates: L10ns.localizationsDelegates, | ||
supportedLocales: L10ns.supportedLocales, | ||
theme: ThemeData( | ||
colorScheme: ColorScheme.fromSeed(seedColor: Colors.brown.shade800), | ||
useMaterial3: true, | ||
), | ||
home: HomePage( | ||
onSelectedLocale: (locale) { | ||
setState(() { | ||
_selectedLocale = locale; | ||
}); | ||
}, | ||
selectedLocale: _selectedLocale, | ||
), | ||
return ChangeNotifierProvider( | ||
create: (context) => AppState(), | ||
builder: (context, child) { | ||
final appState = context.watch<AppState>(); | ||
return MaterialApp( | ||
title: 'DST Helper', | ||
restorationScopeId: 'restoration_scope_id_dst_helper_0.0.1_0_debug', | ||
locale: appState.currentLocale, | ||
localizationsDelegates: L10ns.localizationsDelegates, | ||
supportedLocales: L10ns.supportedLocales, | ||
theme: ThemeData( | ||
colorScheme: ColorScheme.fromSeed(seedColor: Colors.brown.shade800), | ||
useMaterial3: true, | ||
), | ||
home: const HomePage(), | ||
); | ||
}, | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:universal_io/io.dart'; | ||
|
||
class AppState extends ChangeNotifier { | ||
Locale _currentLocale = Locale(Platform.localeName.split('_')[0]); | ||
Locale get currentLocale => _currentLocale; | ||
set currentLocale(Locale value) { | ||
_currentLocale = value; | ||
notifyListeners(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 7 additions & 12 deletions
19
lib/farm_page/edit_farm_set/components/analysis_view/analysis_view.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
lib/farm_page/edit_farm_set/components/analysis_view/analysis_view_controller.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
156 changes: 0 additions & 156 deletions
156
lib/farm_page/edit_farm_set/components/analysis_view/family_condition.dart
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.