forked from eatvio/eatvio_app
feat(diary): fix dart analyze, add photo placeholder
This commit is contained in:
8
assets/no_one_image_was_added.svg
Normal file
8
assets/no_one_image_was_added.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 22 KiB |
@@ -7,6 +7,7 @@ import 'package:eatvio_app/theme/theme_helper.dart';
|
||||
import 'package:eatvio_app/widgets/custom_text_form_field.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:flutter_typeahead/flutter_typeahead.dart';
|
||||
import 'package:rive/rive.dart';
|
||||
import 'package:table_calendar/table_calendar.dart';
|
||||
@@ -168,6 +169,11 @@ class _DiaryScreenState extends State<DiaryScreen> {
|
||||
_products(diaryDay.meals[currentSelectedMealNumber - 1].portions, diaryDay),
|
||||
const SizedBox(height: 16),
|
||||
_addProductButton(diaryDay),
|
||||
const SizedBox(height: 24),
|
||||
SvgPicture.asset(
|
||||
width: MediaQuery.of(context).size.width - 32,
|
||||
'assets/no_one_image_was_added.svg',
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -372,11 +378,7 @@ class _DiaryScreenState extends State<DiaryScreen> {
|
||||
keyboardType: TextInputType.number,
|
||||
hintText: selectedGlossary!.grInPortion == 0 ? '100' : '1',
|
||||
autofocus: true,
|
||||
suffixText: selectedGlossary != null
|
||||
? selectedGlossary!.grInPortion == 0
|
||||
? 'гр'
|
||||
: 'шт'
|
||||
: null,
|
||||
suffixText: selectedGlossary!.grInPortion == 0 ? 'гр' : 'шт',
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
@@ -388,7 +390,7 @@ class _DiaryScreenState extends State<DiaryScreen> {
|
||||
diaryCubit.deleteProductFromMeal(
|
||||
diaryId: diaryDay.id,
|
||||
mealId: diaryDay.meals[currentSelectedMealNumber - 1].id,
|
||||
portionId: portionId!,
|
||||
portionId: portionId,
|
||||
date: _selectedDay.toString(),
|
||||
);
|
||||
Navigator.of(context).pop();
|
||||
|
||||
Reference in New Issue
Block a user