fixed some bug
This commit is contained in:
@@ -50,7 +50,7 @@ class TabletHomePage extends StatelessWidget {
|
||||
SizedBox(height: 8.0.h()),
|
||||
//_secondTenderCardsRow(homeViewModel.homeResponse!),
|
||||
SizedBox(height: 32.0.h()),
|
||||
_yourTenderText(),
|
||||
_yourTenderText(homeViewModel),
|
||||
SizedBox(height: 8.0.h()),
|
||||
_bottomListView(homeViewModel),
|
||||
],
|
||||
@@ -192,9 +192,10 @@ class TabletHomePage extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
|
||||
Widget _yourTenderText() {
|
||||
Widget _yourTenderText(HomeViewModel homeViewModel) {
|
||||
final isYourTenders = homeViewModel.data?.data?.isNotEmpty ?? false;
|
||||
return Text(
|
||||
AppStrings.recommendation,
|
||||
isYourTenders ? AppStrings.yourTenders : AppStrings.recommendedTenders,
|
||||
style: TextStyle(
|
||||
fontSize: 18.0.sp(),
|
||||
fontWeight: FontWeight.w700,
|
||||
@@ -206,14 +207,17 @@ class TabletHomePage extends StatelessWidget {
|
||||
Widget _bottomListView(HomeViewModel homeViewModel) {
|
||||
final controller = ScrollController();
|
||||
|
||||
controller.addListener(() {
|
||||
if (controller.position.pixels >=
|
||||
controller.position.maxScrollExtent - 200) {
|
||||
if (!homeViewModel.isLoadingMore && homeViewModel.hasMore) {
|
||||
homeViewModel.getHomeRecommandTenders();
|
||||
}
|
||||
controller.addListener(() {
|
||||
if (homeViewModel.isRecommendedMode) {
|
||||
if (controller.position.pixels >=
|
||||
controller.position.maxScrollExtent - 200) {
|
||||
if (!homeViewModel.isLoadingMore && homeViewModel.hasMore) {
|
||||
homeViewModel.getHomeRecommandTenders();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return SizedBox(
|
||||
width: double.infinity,
|
||||
height: 387.0.h(),
|
||||
|
||||
Reference in New Issue
Block a user