fixed flutter analyze issues introduced with new flutter version
parent
7cc60b180a
commit
cd07acc3b5
|
@ -20,12 +20,14 @@ class ScannerPage extends StatelessWidget {
|
|||
await loadSettingsFromLocalJSON();
|
||||
settingsModel.initSettings();
|
||||
NotificationService().setAllNotifications();
|
||||
AwesomeDialog(
|
||||
context: context,
|
||||
dialogType: DialogType.success,
|
||||
title: 'Geschafft',
|
||||
desc: 'Die Einstellung wurden erfolgreich gespeichert',
|
||||
).show();
|
||||
if (context.mounted) {
|
||||
AwesomeDialog(
|
||||
context: context,
|
||||
dialogType: DialogType.success,
|
||||
title: 'Geschafft',
|
||||
desc: 'Die Einstellung wurden erfolgreich gespeichert',
|
||||
).show();
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
@ -7,17 +7,19 @@ import '../services/pages_service.dart';
|
|||
|
||||
void showTaskDonePopup(BuildContext context, Pages page) async {
|
||||
Duration duration = await getTimeTill(page);
|
||||
await showDialog(
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return ChangeNotifierProvider(
|
||||
create: (context) => TimerProvider(),
|
||||
child: TaskDonePopup(
|
||||
duration: duration,
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
if (context.mounted) {
|
||||
await showDialog(
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return ChangeNotifierProvider(
|
||||
create: (context) => TimerProvider(),
|
||||
child: TaskDonePopup(
|
||||
duration: duration,
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class TaskDonePopup extends StatelessWidget {
|
||||
|
|
|
@ -17,22 +17,24 @@ class SubmitFormButton extends StatelessWidget {
|
|||
child: ElevatedButton(
|
||||
onPressed: () async {
|
||||
int success = await submitCallback();
|
||||
if (success != 0) {
|
||||
await AwesomeDialog(
|
||||
context: context,
|
||||
dialogType: DialogType.success,
|
||||
title: 'Gespeichert',
|
||||
desc: 'Der Eintrag wurde erfolgreich gespeichert',
|
||||
).show();
|
||||
updateTasks();
|
||||
pageProvider.swap();
|
||||
} else {
|
||||
await AwesomeDialog(
|
||||
context: context,
|
||||
dialogType: DialogType.error,
|
||||
title: 'Fehler',
|
||||
desc: 'Der Eintrag konnte nicht gespeichert werden',
|
||||
).show();
|
||||
if (context.mounted) {
|
||||
if (success != 0) {
|
||||
await AwesomeDialog(
|
||||
context: context,
|
||||
dialogType: DialogType.success,
|
||||
title: 'Gespeichert',
|
||||
desc: 'Der Eintrag wurde erfolgreich gespeichert',
|
||||
).show();
|
||||
updateTasks();
|
||||
pageProvider.swap();
|
||||
} else {
|
||||
await AwesomeDialog(
|
||||
context: context,
|
||||
dialogType: DialogType.error,
|
||||
title: 'Fehler',
|
||||
desc: 'Der Eintrag konnte nicht gespeichert werden',
|
||||
).show();
|
||||
}
|
||||
}
|
||||
},
|
||||
child: const Text('Speichern'),
|
||||
|
|
|
@ -28,13 +28,15 @@ class WorkoutTimerWidget extends StatelessWidget {
|
|||
workoutProvider.saveWorkout();
|
||||
tasksProvider.setTaskDone(Pages.timer);
|
||||
}, 'Motivation nach dem Training');
|
||||
await AwesomeDialog(
|
||||
context: context,
|
||||
dialogType: DialogType.success,
|
||||
title: 'Gespeichert',
|
||||
desc: 'Der Eintrag wurde erfolgreich gespeichert',
|
||||
).show();
|
||||
pageProvider.swap();
|
||||
if (context.mounted) {
|
||||
await AwesomeDialog(
|
||||
context: context,
|
||||
dialogType: DialogType.success,
|
||||
title: 'Gespeichert',
|
||||
desc: 'Der Eintrag wurde erfolgreich gespeichert',
|
||||
).show();
|
||||
pageProvider.swap();
|
||||
}
|
||||
}
|
||||
|
||||
if (workoutProvider.isPhaseComplete && !workoutProvider.isWorkoutComplete) {
|
||||
|
|
Loading…
Reference in New Issue