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 '../../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<FormBuilderComponent> {
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<FormBuilderComponent> {
Future.delayed(
const Duration(seconds: 2),
() => Navigator.of(context).pushReplacement(
MaterialPageRoute(
builder: (BuildContext context) =>
const MainPage())));
() => Navigator.of(context).pushNamedAndRemoveUntil('/navigation', (Route<dynamic> route) => false));
},
child: const Text("Eingaben bestätigen"),
)),