Add relapse form

main
Kai Mannweiler 2023-02-26 23:30:00 +01:00
parent 0b57c14e05
commit a574e7f718
2 changed files with 39 additions and 1 deletions

View File

@ -1,10 +1,17 @@
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:smoke_cess_app/widgets/relapse_form.dart';
import '../providers/input_provider.dart';
class RelapsePage extends StatelessWidget {
const RelapsePage({super.key});
@override
Widget build(BuildContext context) {
return const Center(child: Text('Hier werden Rückfälle dokumentiert'));
return Center(
child: ChangeNotifierProvider(
create: (context) => InputProvider(),
child: const RelapseForm(),
));
}
}

View File

@ -0,0 +1,31 @@
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:smoke_cess_app/widgets/text_formfield.dart';
import '../providers/input_provider.dart';
import 'elevated_card.dart';
class RelapseForm extends StatelessWidget {
const RelapseForm({super.key});
@override
Widget build(BuildContext context) {
var inputModel = context.watch<InputProvider>();
return Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
const ElevatedCard(
title: 'Beschreibe deinen Rückfall',
child: MyTextFormField('Beschreibe deinen Rückfall'),
),
const SizedBox(
height: 80,
),
ElevatedButton(
onPressed: () {},
child: const Text('Speichern'),
)
],
);
}
}