From c9d65c04f795ee704262a8bcc90115c2e4849cb2 Mon Sep 17 00:00:00 2001 From: bogdan <1926167@stud.hs-mannheim.de> Date: Wed, 7 Jun 2023 00:01:26 +0200 Subject: [PATCH] bug fix --- lib/android/components/form/form_builder.dart | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/android/components/form/form_builder.dart b/lib/android/components/form/form_builder.dart index 486d39f..a3c89e4 100644 --- a/lib/android/components/form/form_builder.dart +++ b/lib/android/components/form/form_builder.dart @@ -4,7 +4,6 @@ import 'package:flutter_form_builder/flutter_form_builder.dart'; import 'package:hive/hive.dart'; import '../../models/form_builder.dart'; import '../../models/user.dart'; -import '../../pages/nav_pages/main_page.dart'; class FormBuilderComponent extends StatefulWidget { final bool lockTextFields; @@ -144,7 +143,7 @@ class _FormBuilderComponentState extends State { ScaffoldMessenger.of(context) .showSnackBar(const SnackBar( duration: Duration(seconds: 2), - content: Text('Eine Beispiel Snackbar'), + content: Text('Die Daten wurden erfolgreich gespeichert'), )); } else { box.put( @@ -161,10 +160,7 @@ class _FormBuilderComponentState extends State { Future.delayed( const Duration(seconds: 2), - () => Navigator.of(context).pushReplacement( - MaterialPageRoute( - builder: (BuildContext context) => - const MainPage()))); + () => Navigator.of(context).pushNamedAndRemoveUntil('/navigation', (Route route) => false)); }, child: const Text("Eingaben bestätigen"), )),