feat: remove web componetns

main
98spag 2023-06-16 11:46:32 +02:00
parent 29b16918c0
commit 2623e97718
1 changed files with 6 additions and 16 deletions

View File

@ -1,10 +1,7 @@
import 'package:ernaehrung/android/components/form/form_builder_text_field_component.dart'; import 'package:ernaehrung/android/components/form/form_builder_text_field_component.dart';
import 'package:ernaehrung/web/component/today.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_form_builder/flutter_form_builder.dart'; import 'package:flutter_form_builder/flutter_form_builder.dart';
import 'package:hive/hive.dart'; import 'package:hive/hive.dart';
import '../../../web/web_app.dart';
import '../../models/form_builder.dart'; import '../../models/form_builder.dart';
import '../../models/user.dart'; import '../../models/user.dart';
@ -160,19 +157,12 @@ class _FormBuilderComponentState extends State<FormBuilderComponent> {
int.parse(formKey.currentState?.fields['kalorien']?.value) int.parse(formKey.currentState?.fields['kalorien']?.value)
)); ));
} }
if (kIsWeb) {
Navigator.of(context).push(MaterialPageRoute(builder: (BuildContext context) => const HomeScreen()));
}
else{
Future.delayed( Future.delayed(
const Duration(seconds: 2), const Duration(seconds: 2),
() => Navigator.of(context) () => Navigator.of(context)
.pushNamedAndRemoveUntil('/navigation', (Route<dynamic> route) .pushNamedAndRemoveUntil('/navigation', (Route<dynamic> route)
=> false) => false)
); );
}
}, },
child: const Text("Eingaben bestätigen"), child: const Text("Eingaben bestätigen"),
)), )),