added default meal name
This commit is contained in:
parent
dff45b0ec4
commit
f6e1a08d06
2 changed files with 9 additions and 1 deletions
|
@ -16,6 +16,14 @@ class AddMealScreen extends BasedScreen {
|
|||
class _AddMealScreen extends State<AddMealScreen> {
|
||||
final nameController = TextEditingController();
|
||||
|
||||
@override
|
||||
void initState () {
|
||||
super.initState();
|
||||
setState(() {
|
||||
nameController.text = "Meal ${widget.diary.meals.length}";
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
nameController.dispose();
|
||||
|
|
|
@ -24,7 +24,7 @@ class DiaryWidget extends StatelessWidget {
|
|||
title: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: <Widget>[
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
Text(
|
||||
"${diary.calories.toStringAsFixed(1)} kcal",
|
||||
style: Theme.of(context).textTheme.headlineLarge!.copyWith(
|
||||
|
|
Loading…
Reference in a new issue