_handlerBannerData(Response response) {
if (response.code == 0 || response.code == 200) {
List<BannerModel> list = [];
if (response.data is List) {
(response.data as List).map((e) {
print('广告信息123-$e');
PrintUtil.prints('banner data=>$e');
list.add(BannerModel.fromJson(e));
}).toList();
}
if (list.isNotEmpty) {
_bannersListener.value = list;
if(list.length>1){
widget.controller.stopAutoplay();
widget.controller.startAutoplay();
}
}else {
print('广告信息123-为空');
}
}
}
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22