Reworked Commends

main
Parricc35 2023-02-22 13:32:23 +01:00
parent 4700f52646
commit b6c3c2e7a7
2 changed files with 7 additions and 12 deletions

View File

@ -43,9 +43,8 @@ class _IntervalTimerPageState extends State<IntervalTimerPage> {
await showDialog(
context: context,
builder: (BuildContext context) {
return const StartTimerPopup(
return const TimerStartStopPopup(
title: 'Motivation vor dem Training',
text: 'Du gehörst zu Gruppe',
);
},
);
@ -73,9 +72,8 @@ class _IntervalTimerPageState extends State<IntervalTimerPage> {
showDialog(
context: context,
builder: (BuildContext context) {
return const StartTimerPopup(
return const TimerStartStopPopup(
title: 'Motivation nach dem Training',
text: 'Du gehörst zu Gruppe',
);
},
);

View File

@ -3,26 +3,23 @@ import 'package:smoke_cess_app/widgets/slider.dart';
import 'package:smoke_cess_app/widgets/submit_form_button.dart';
import 'package:smoke_cess_app/widgets/text_formfield.dart';
class StartTimerPopup extends StatefulWidget {
class TimerStartStopPopup extends StatefulWidget {
final String title;
final String text;
const StartTimerPopup({Key? key, required this.title, required this.text})
: super(key: key);
const TimerStartStopPopup({Key? key, required this.title}) : super(key: key);
@override
_StartTimerPopupState createState() => _StartTimerPopupState();
TimerStartStopPopupState createState() => TimerStartStopPopupState();
}
class _StartTimerPopupState extends State<StartTimerPopup> {
class TimerStartStopPopupState extends State<TimerStartStopPopup> {
final MySlider slider = const MySlider();
String _textInput = '';
void submitForm(BuildContext context) {
Navigator.of(context).pop();
}
void onFormFieldSave(String? newValue) => _textInput = newValue!;
void onFormFieldSave(String? newValue) => newValue!;
@override
Widget build(BuildContext context) {