Fixed Navigator Bug in new App Layout

Signed-off-by: Andreas Fahrecker <AndreasFahrecker@gmail.com>
This commit is contained in:
Andreas Fahrecker
2021-02-11 15:06:25 +01:00
parent d289cfc4d5
commit fad8d8b49b
3 changed files with 4 additions and 5 deletions

View File

@ -39,7 +39,7 @@ class _ProgressCreationScreenState extends State<ProgressCreationScreen> {
TimeProgress(_nameController.text, pickedStartTime, pickedEndTime);
StoreProvider.of<AppState>(context)
.dispatch(AddTimeProgressAction(tpToCreate));
Navigator.pushNamed(context, HomeScreen.routeName);
Navigator.pop(context);
} on TimeProgressInvalidNameException catch (e) {
setState(() {
_validName = false;
@ -150,7 +150,7 @@ class _ProgressCreationScreenState extends State<ProgressCreationScreen> {
heroTag: "cancelTimeProgressCreationBTN",
child: Icon(Icons.cancel),
onPressed: () {
Navigator.pushNamed(context, HomeScreen.routeName);
Navigator.pop(context);
},
),
)