forked from eatvio/eatvio_app
feat(diary): cant fill future day
This commit is contained in:
@@ -278,23 +278,25 @@ class _DiaryScreenState extends State<DiaryScreen> {
|
||||
_mealButton(5),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
_divider(context),
|
||||
const SizedBox(height: 12),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'Время приема пищи',
|
||||
style: TextStyle(
|
||||
color: Color(0xFF323F4B),
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
_selectedDay!.compareTo(today!) == 1 ? const SizedBox.shrink() : const SizedBox(height: 12),
|
||||
_selectedDay!.compareTo(today!) == 1 ? const SizedBox.shrink() : _divider(context),
|
||||
_selectedDay!.compareTo(today!) == 1 ? const SizedBox.shrink() : const SizedBox(height: 12),
|
||||
_selectedDay!.compareTo(today!) == 1
|
||||
? const SizedBox.shrink()
|
||||
: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'Время приема пищи',
|
||||
style: TextStyle(
|
||||
color: Color(0xFF323F4B),
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
_timeOfMeal(time),
|
||||
],
|
||||
),
|
||||
),
|
||||
_timeOfMeal(time),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
_divider(context),
|
||||
const SizedBox(height: 12),
|
||||
@@ -303,21 +305,25 @@ class _DiaryScreenState extends State<DiaryScreen> {
|
||||
_addProductButton(diaryDay),
|
||||
const SizedBox(height: 24),
|
||||
if (diaryDay.meals[currentSelectedMealNumber - 1].photos.isEmpty)
|
||||
GestureDetector(
|
||||
onTap: () => _showImagePicker(diaryDay),
|
||||
child: SvgPicture.asset(
|
||||
width: MediaQuery.of(context).size.width - 32,
|
||||
'assets/no_one_image_was_added.svg',
|
||||
),
|
||||
),
|
||||
_selectedDay!.compareTo(today!) == 1
|
||||
? const SizedBox.shrink()
|
||||
: GestureDetector(
|
||||
onTap: () => _showImagePicker(diaryDay),
|
||||
child: SvgPicture.asset(
|
||||
width: MediaQuery.of(context).size.width - 32,
|
||||
'assets/no_one_image_was_added.svg',
|
||||
),
|
||||
),
|
||||
if (diaryDay.meals[currentSelectedMealNumber - 1].photos.isNotEmpty)
|
||||
_photoGallery(
|
||||
diaryDay.meals[currentSelectedMealNumber - 1].photos,
|
||||
diaryDay,
|
||||
),
|
||||
SatietyRatingWidget(
|
||||
currentSelectedSatietyRating: currentSelectedSatietyRating,
|
||||
),
|
||||
_selectedDay!.compareTo(today!) == 1
|
||||
? const SizedBox.shrink()
|
||||
: SatietyRatingWidget(
|
||||
currentSelectedSatietyRating: currentSelectedSatietyRating,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -1057,6 +1063,7 @@ class _DiaryScreenState extends State<DiaryScreen> {
|
||||
}
|
||||
|
||||
_addProductButton(DiaryDayModel diaryDay) {
|
||||
if (_selectedDay!.compareTo(today!) == 1) return const SizedBox.shrink();
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
|
||||
Reference in New Issue
Block a user