2023-02-26 23:30:00 +01:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:provider/provider.dart';
|
2023-02-27 02:28:26 +01:00
|
|
|
import 'package:smoke_cess_app/widgets/drop_down.dart';
|
2023-02-26 23:30:00 +01:00
|
|
|
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: [
|
2023-02-27 02:28:26 +01:00
|
|
|
const ElevatedCard(
|
|
|
|
title: 'Rückfallkategorie',
|
|
|
|
child: DropDown(),
|
|
|
|
),
|
2023-02-26 23:30:00 +01:00
|
|
|
const ElevatedCard(
|
|
|
|
title: 'Beschreibe deinen Rückfall',
|
|
|
|
child: MyTextFormField('Beschreibe deinen Rückfall'),
|
|
|
|
),
|
|
|
|
const SizedBox(
|
|
|
|
height: 80,
|
|
|
|
),
|
|
|
|
ElevatedButton(
|
2023-02-27 02:28:26 +01:00
|
|
|
onPressed: () => inputModel.saveRelapse(),
|
2023-02-26 23:30:00 +01:00
|
|
|
child: const Text('Speichern'),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|