40 lines
1.1 KiB
Dart
40 lines
1.1 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:provider/provider.dart';
|
|
import 'package:smoke_cess_app/models/mood.dart';
|
|
import 'package:smoke_cess_app/services/database_service.dart';
|
|
import 'package:smoke_cess_app/widgets/slider.dart';
|
|
import 'package:smoke_cess_app/widgets/submit_form_button.dart';
|
|
import 'package:smoke_cess_app/widgets/text_formfield.dart';
|
|
|
|
import '../providers/input_provider.dart';
|
|
import 'elevated_card.dart';
|
|
|
|
class MoodForm extends StatelessWidget {
|
|
const MoodForm({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
var inputModel = context.watch<InputProvider>();
|
|
return Column(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: [
|
|
const ElevatedCard(
|
|
title: 'Stimmungsbewertung',
|
|
child: MySlider(),
|
|
),
|
|
const SizedBox(height: 16),
|
|
const ElevatedCard(
|
|
title: 'Beschreibe deine Stimmung',
|
|
child: MyTextFormField('Beschreibe deine Stimmung'),
|
|
),
|
|
const SizedBox(
|
|
height: 80,
|
|
),
|
|
SubmitFormButton(
|
|
submitCallback: inputModel.saveMood,
|
|
)
|
|
],
|
|
);
|
|
}
|
|
}
|