Commit c4e8379
Changed files (3)
lib
lib/screens/add_measurement.dart
@@ -209,7 +209,7 @@ class _AddMeasurementPageState extends State<AddMeasurementPage> {
Navigator.of(context).pop();
},
style: ElevatedButton.styleFrom(backgroundColor: Theme.of(context).unselectedWidgetColor),
- child: Text(AppLocalizations.of(context)?.btnCancel ?? "CANCEL")),
+ child: Text(AppLocalizations.of(context)!.btnCancel)),
const Spacer(),
ElevatedButton(
key: const Key('btnSave'),
@@ -221,7 +221,7 @@ class _AddMeasurementPageState extends State<AddMeasurementPage> {
}
},
style: ElevatedButton.styleFrom(backgroundColor: Theme.of(context).primaryColor),
- child: Text(AppLocalizations.of(context)?.btnSave ?? "SAVE"))
+ child: Text(AppLocalizations.of(context)!.btnSave))
],
)
],
lib/screens/settings.dart
@@ -22,7 +22,7 @@ class SettingsPage extends StatelessWidget {
body: Consumer<Settings>(builder: (context, settings, child) {
return ListView(
children: [
- SettingsSection(title: Text(AppLocalizations.of(context)?.layout ?? 'LAYOUT'), children: [
+ SettingsSection(title: Text(AppLocalizations.of(context)!.layout), children: [
SwitchSettingsTile(
key: const Key('allowManualTimeInput'),
initialValue: settings.allowManualTimeInput,
lib/main.dart
@@ -35,7 +35,7 @@ class AppRoot extends StatelessWidget {
return MaterialApp(
title: 'Blood Pressure App',
- onGenerateTitle: (context) => AppLocalizations.of(context)?.title ?? 'BLOOD PRESSURE APP',
+ onGenerateTitle: (context) => AppLocalizations.of(context)!.title,
theme: ThemeData(primaryColor: settings.accentColor),
darkTheme: ThemeData(
brightness: Brightness.dark,