Skip to content

Commit 846b47c

Browse files
committed
feat: update PreparationEditForm to include navigation actions in TopBar
1 parent c194405 commit 846b47c

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

lib/presentation/schedule_create/screens/preparation_edit_form.dart

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import 'package:flutter/material.dart';
2+
import 'package:go_router/go_router.dart';
23
import 'package:on_time_front/presentation/onboarding/onboarding_screen.dart';
34
import 'package:on_time_front/presentation/schedule_create/compoenent/preparation_edit_list.dart';
5+
import 'package:on_time_front/presentation/schedule_create/compoenent/top_bar.dart';
46
import 'package:uuid/uuid.dart';
57

68
class PreparationEditForm extends StatefulWidget {
@@ -41,15 +43,17 @@ class _PreparationEditFormState extends State<PreparationEditForm> {
4143

4244
@override
4345
Widget build(BuildContext context) {
44-
return SafeArea(
45-
child: Scaffold(
46-
body: Column(
46+
return Scaffold(
47+
body: SafeArea(
48+
child: Column(
4749
children: [
48-
FilledButton(
49-
onPressed: () {
50-
_formKey.currentState?.save();
50+
TopBar(
51+
onNextPAgeButtonClicked: () {
52+
if (_formKey.currentState!.validate()) {
53+
_formKey.currentState!.save();
54+
}
5155
},
52-
child: Text("Save")),
56+
onPreviousPageButtonClicked: context.pop),
5357
Expanded(
5458
child: PreparationEditList(
5559
formKey: _formKey,

0 commit comments

Comments
 (0)