refactor: remove unused local and remote data sources, models, and tests for chicken and poultry features to streamline codebase

This commit is contained in:
2025-12-08 16:10:34 +03:30
parent 890be0ded6
commit 455a5a5571
230 changed files with 2812 additions and 3471 deletions

View File

@@ -0,0 +1,8 @@
import 'package:rasadyar_chicken/features/common/data/model/local/widely_used_local_model.dart';
abstract class ChickenLocalDataSource {
Future<void> openBox();
Future<void> initWidleyUsed();
WidelyUsedLocalModel? getAllWidely();
}

View File

@@ -0,0 +1,54 @@
import 'package:rasadyar_chicken/features/common/data/model/local/widely_used_local_model.dart';
import 'package:rasadyar_chicken/features/steward/presentation/routes/routes.dart';
import 'package:rasadyar_core/core.dart';
import 'chicken_local.dart';
class ChickenLocalDataSourceImp implements ChickenLocalDataSource {
HiveLocalStorage local = diCore.get<HiveLocalStorage>();
final String boxName = 'Chicken_Widley_Box';
@override
Future<void> openBox() async {
await local.openBox<WidelyUsedLocalModel>(boxName);
}
@override
Future<void> initWidleyUsed() async {
/* List<WidelyUsedLocalItem> tmpList = [
WidelyUsedLocalItem(
index: 0,
pathId: 0,
title: 'خرید داخل استان',
color: AppColor.greenLightActive.toARGB32(),
iconColor: AppColor.greenNormal.toARGB32(),
iconPath: Assets.vec.cubeSearchSvg.path,
path: StewardRoutes.buysInProvinceSteward,
),
WidelyUsedLocalItem(
index: 1,
pathId: 1,
title: 'فروش داخل استان',
color: AppColor.blueLightActive.toARGB32(),
iconColor: AppColor.blueNormal.toARGB32(),
iconPath: Assets.vec.cubeSvg.path,
path: StewardRoutes.salesInProvinceSteward,
),
WidelyUsedLocalItem(
index: 2,
title: 'قطعه‌بندی',
color: AppColor.blueLightActive.toARGB32(),
iconColor: AppColor.blueNormal.toARGB32(),
iconPath: Assets.vec.cubeRotateSvg.path,
path: StewardRoutes.buysInProvinceSteward,
),
]; */
}
@override
WidelyUsedLocalModel? getAllWidely() {
var res = local.readBox<WidelyUsedLocalModel>(boxName: boxName);
return res?.isNotEmpty == true ? res!.first : null;
}
}