refactor: remove unused local and remote data sources, models, and tests for chicken and poultry features to streamline codebase
This commit is contained in:
@@ -1,7 +1,14 @@
|
||||
import 'package:rasadyar_chicken/features/common/presentation/routes/routes.dart';
|
||||
|
||||
sealed class ChickenRoutes {
|
||||
ChickenRoutes._();
|
||||
|
||||
static const _base = '/chicken';
|
||||
static const auth = CommonRoutes.auth;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//endregion
|
||||
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
import 'package:rasadyar_chicken/data/di/chicken_di.dart';
|
||||
import 'package:rasadyar_chicken/data/repositories/chicken/chicken_repository.dart';
|
||||
import 'package:rasadyar_chicken/features/common/data/repositories/common/common_repository.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
import '../../../data/models/response/user_profile/user_profile.dart';
|
||||
import '../../../features/common/data/model/response/user_profile/user_profile.dart';
|
||||
|
||||
class ChickenBaseLogic extends BasePageLogic {
|
||||
var tokenService = Get.find<TokenStorageService>();
|
||||
ChickenRepository chickenRepository = diChicken.get<ChickenRepository>();
|
||||
CommonRepository commonRepository = diChicken.get<CommonRepository>();
|
||||
|
||||
Rx<Resource<UserProfile>> userProfile = Rx<Resource<UserProfile>>(Resource.loading());
|
||||
Rx<Resource<UserProfile>> userProfile = Rx<Resource<UserProfile>>(
|
||||
Resource.loading(),
|
||||
);
|
||||
|
||||
@override
|
||||
void onInit() {
|
||||
@@ -19,8 +21,9 @@ class ChickenBaseLogic extends BasePageLogic {
|
||||
Future<void> getUserProfile() async {
|
||||
userProfile.value = Resource.loading();
|
||||
await safeCall<UserProfile?>(
|
||||
call: () async =>
|
||||
await chickenRepository.getUserProfile(token: tokenService.accessToken.value!),
|
||||
call: () async => await commonRepository.getUserProfile(
|
||||
token: tokenService.accessToken.value!,
|
||||
),
|
||||
onSuccess: (result) {
|
||||
if (result != null) {
|
||||
userProfile.value = Resource.success(result);
|
||||
|
||||
Reference in New Issue
Block a user