elCaribe app - customization and branding

This commit is contained in:
2025-12-12 19:09:42 -04:00
parent 9e5d0d8ebf
commit ba7deac9f3
402 changed files with 31833 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:news/data/models/OtherPageModel.dart';
import 'package:news/data/repositories/OtherPages/otherPagesRepository.dart';
abstract class OtherPageState {}
class OtherPageInitial extends OtherPageState {}
class OtherPageFetchInProgress extends OtherPageState {}
class OtherPageFetchSuccess extends OtherPageState {
final List<OtherPageModel> otherPage;
OtherPageFetchSuccess({required this.otherPage});
}
class OtherPageFetchFailure extends OtherPageState {
final String errorMessage;
OtherPageFetchFailure(this.errorMessage);
}
class OtherPageCubit extends Cubit<OtherPageState> {
final OtherPageRepository _otherPageRepository;
OtherPageCubit(this._otherPageRepository) : super(OtherPageInitial());
void getOtherPage({required String langId}) async {
emit(OtherPageFetchInProgress());
try {
final result = await _otherPageRepository.getOtherPage(langId: langId);
emit(OtherPageFetchSuccess(otherPage: result['OtherPage']));
} catch (e) {
emit(OtherPageFetchFailure(e.toString()));
}
}
}