main
Bogdan Kotikov 2023-06-07 00:01:26 +02:00
parent 1b9d8b693f
commit c9d65c04f7
1 changed files with 2 additions and 6 deletions

View File

@ -4,7 +4,6 @@ import 'package:flutter_form_builder/flutter_form_builder.dart';
import 'package:hive/hive.dart'; import 'package:hive/hive.dart';
import '../../models/form_builder.dart'; import '../../models/form_builder.dart';
import '../../models/user.dart'; import '../../models/user.dart';
import '../../pages/nav_pages/main_page.dart';
class FormBuilderComponent extends StatefulWidget { class FormBuilderComponent extends StatefulWidget {
final bool lockTextFields; final bool lockTextFields;
@ -144,7 +143,7 @@ class _FormBuilderComponentState extends State<FormBuilderComponent> {
ScaffoldMessenger.of(context) ScaffoldMessenger.of(context)
.showSnackBar(const SnackBar( .showSnackBar(const SnackBar(
duration: Duration(seconds: 2), duration: Duration(seconds: 2),
content: Text('Eine Beispiel Snackbar'), content: Text('Die Daten wurden erfolgreich gespeichert'),
)); ));
} else { } else {
box.put( box.put(
@ -161,10 +160,7 @@ class _FormBuilderComponentState extends State<FormBuilderComponent> {
Future.delayed( Future.delayed(
const Duration(seconds: 2), const Duration(seconds: 2),
() => Navigator.of(context).pushReplacement( () => Navigator.of(context).pushNamedAndRemoveUntil('/navigation', (Route<dynamic> route) => false));
MaterialPageRoute(
builder: (BuildContext context) =>
const MainPage())));
}, },
child: const Text("Eingaben bestätigen"), child: const Text("Eingaben bestätigen"),
)), )),