feat(diary): add diary, calendar, meals, products, add product button, modal add product

This commit is contained in:
mso7nueh
2024-10-30 11:44:16 +03:00
parent 1883b93315
commit 784b550673
55 changed files with 867 additions and 1407 deletions

View File

@@ -35,23 +35,17 @@ class SubscribersBloc extends Bloc<SubscribersEvent, SubscribersState> {
'Authorization': 'Bearer ${await TokenStorage.getTokenFromStorage()}',
},
);
print('Got response');
print(response.statusCode);
print(response.body);
if (response.statusCode == 200) {
print('Got 200');
final data = jsonDecode(response.body);
if (data is List<dynamic>) {
print('Got List');
if (state is SubscribersLoadedState) {
print('Got loaded');
var currentState = state as SubscribersLoadedState;
emit((currentState).copyWith(
subscribers: data,
myProfileModelObj: currentState.myProfileModelObj,
));
} else {
print('Got unloaded');
emit(SubscribersLoadedState(
subscribers: data,
));