forked from eatvio/eatvio_app
added diet complaints and token interceptor for auth handling
This commit is contained in:
@@ -319,9 +319,11 @@ class _ViolenceAndHostilityState extends State<_ViolenceAndHostility> {
|
||||
});
|
||||
},
|
||||
),
|
||||
Text(
|
||||
element.$2,
|
||||
style: TextStyles.textLSemibold.copyWith(color: appTheme.black),
|
||||
Expanded(
|
||||
child: Text(
|
||||
element.$2,
|
||||
style: TextStyles.textLSemibold.copyWith(color: appTheme.black),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
|
||||
@@ -43,8 +43,11 @@ class ComplainingCubit extends Cubit<ComplainingState> {
|
||||
if (category != null && contentType != null) {
|
||||
switch (contentType) {
|
||||
case ComplainedContent.diet:
|
||||
emit(state.copyWith(wasSentSuccessfully: true));
|
||||
return;
|
||||
if (id != null) {
|
||||
await repository.sendDietComplain(id: id, category: category.getValue(), body: state.complainInfo);
|
||||
emit(state.copyWith(wasSentSuccessfully: true));
|
||||
return;
|
||||
}
|
||||
case ComplainedContent.plan:
|
||||
if (slug != null) {
|
||||
await repository.sendPlanComplain(slug: slug, category: category.getValue(), body: state.complainInfo);
|
||||
|
||||
Reference in New Issue
Block a user