Add relapse form
parent
0b57c14e05
commit
a574e7f718
|
@ -1,10 +1,17 @@
|
||||||
import 'package:flutter/material.dart';
|
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 {
|
class RelapsePage extends StatelessWidget {
|
||||||
const RelapsePage({super.key});
|
const RelapsePage({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
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(),
|
||||||
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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'),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue