forked from eatvio/eatvio_app
diet creation scrren is done
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import 'dart:developer';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:eatvio_app/core/image_compressing/image_compress_utility.dart';
|
||||
@@ -155,20 +156,25 @@ class DiaryCubit extends Cubit<DiaryState> {
|
||||
await fetchDiary();
|
||||
}
|
||||
|
||||
Future<GlossaryModerationModel> sendProductToModeration({
|
||||
Future<GlossaryModerationModel?> sendProductToModeration({
|
||||
required String name,
|
||||
required double energy,
|
||||
required double proteins,
|
||||
required double fats,
|
||||
required double carbohydrates,
|
||||
}) async {
|
||||
return await diaryRepository.sendProductToModeration(
|
||||
name: name,
|
||||
energy: energy,
|
||||
proteins: proteins,
|
||||
fats: fats,
|
||||
carbohydrates: carbohydrates,
|
||||
);
|
||||
try {
|
||||
return await diaryRepository.sendProductToModeration(
|
||||
name: name,
|
||||
energy: energy,
|
||||
proteins: proteins,
|
||||
fats: fats,
|
||||
carbohydrates: carbohydrates,
|
||||
);
|
||||
} catch (e, stackTrace) {
|
||||
log(e.toString(), stackTrace: stackTrace);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
fillTime({
|
||||
|
||||
@@ -271,7 +271,7 @@ class _GlossaryModerationRequestModalWidgetState extends State<GlossaryModeratio
|
||||
fats: double.parse(fatsController.text),
|
||||
carbohydrates: double.parse(carbohydratesController.text),
|
||||
))
|
||||
.glossary;
|
||||
?.glossary;
|
||||
setState(() {
|
||||
glossaryState = GlossaryState.success;
|
||||
});
|
||||
@@ -279,7 +279,6 @@ class _GlossaryModerationRequestModalWidgetState extends State<GlossaryModeratio
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
child: Ink(
|
||||
padding: EdgeInsets.symmetric(horizontal: 8),
|
||||
width: MediaQuery.of(context).size.width - 16,
|
||||
decoration: BoxDecoration(
|
||||
color: appTheme.blueA400,
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
|
||||
Reference in New Issue
Block a user