feat : latest News in module page

This commit is contained in:
2025-09-01 10:58:17 +03:30
parent 5af5d63a1e
commit c2f5e36fd7
5 changed files with 44 additions and 35 deletions

View File

@@ -7,6 +7,7 @@ class ModulesLogic extends GetxController {
TokenStorageService tokenService = Get.find<TokenStorageService>();
SliderLogic upSlider = Get.find<SliderLogic>(tag: "up");
SliderLogic downSlider = Get.find<SliderLogic>(tag: "down");
RxnString latestNews = RxnString();
RxBool isLoading = false.obs;
List<ModuleModel> moduleList = [
@@ -125,6 +126,7 @@ class ModulesLogic extends GetxController {
SliderModel sliderModel = SliderModel.fromJson(res.data);
upSlider.onSuccess(sliderModel.up ?? []);
downSlider.onSuccess(sliderModel.down ?? []);
latestNews.value = sliderModel.middle;
}
}
}

View File

@@ -84,15 +84,18 @@ class ModulesPage extends GetView<ModulesLogic> {
height: 1.90,
),
),
Text(
'اخبار مربوط به جوجه ریزی استان از آخرین روند مطلع شوید اخبار مربوط به جوجه ریزی استان از ',
maxLines: 2,
style: AppFonts.yekan12.copyWith(
color: Color(0xFF5B5B5B),
height: 1.5,
overflow: TextOverflow.ellipsis,
ObxValue(
(data) => Text(
data.value ??
'اخبار مربوط به جوجه ریزی استان از آخرین روند مطلع شوید...',
maxLines: 2,
style: AppFonts.yekan12.copyWith(
color: Color(0xFF5B5B5B),
height: 1.5,
overflow: TextOverflow.ellipsis,
),
),
controller.latestNews,
),
],
),