Commit c2147834 authored by Nguyễn Minh Nhật's avatar Nguyễn Minh Nhật

Merge branch 'dev/nhat_nm' into 'develop'

nmn update

See merge request !19
parents 4708dbc1 bd3eec99
......@@ -18,7 +18,7 @@ class CacheNetWorkCustom extends StatelessWidget {
decoration: BoxDecoration(
image: DecorationImage(
image: imageProvider,
fit: BoxFit.cover,
fit: BoxFit.fill,
),
),
),
......
......@@ -169,11 +169,11 @@ class DetailMatchesRegionsController extends GetxController {
}
checkHeight() {
if(isVisiablebackgroudYt.value == true){
return 320.h;
return 330.h;
}else if(isVisiable.value == true){
return 360.h;
}else if(isVisiableYt.value == true){
return 320.h;
return 330.h;
}else{
return 150.h;
}
......
......@@ -61,6 +61,31 @@ class FootballPage extends GetView<FootballController> {
padding: EdgeInsets.zero,
physics: const NeverScrollableScrollPhysics(),
itemBuilder: (context, indexMatches) {
return
itemListScore(controller, index, indexMatches);
},)),
index == 0 ?
NativeAdsCustom(height: 130.h,nativeAdManager:controller.nativeAds[0] ,radius: 0.r,) :const SizedBox(),
Visibility(
visible: Platform.isAndroid,
child: index == controller.listMatches.length/2 ?
NativeAdsCustom(height: 120.h,nativeAdManager: controller.nativeAds[1],radius: 0.r,) :const SizedBox()),
Visibility(
visible: Platform.isAndroid,
child: index == controller.listMatches.length -1?
NativeAdsCustom(height: 100.h,nativeAdManager: controller.nativeAds[2],radius: 0.r,):const SizedBox(),)
],
));
},)), onRefresh:() async{
Get.find<HomeController>().onRefreshPressed();
controller. getListMatchesOnDay('',controller.outputDateToDateFormat.format(DateTime.now()),'');
controller.listMatches.refresh();
},)
:const LoadingCustom();
},);
}
InkWell itemListScore(FootballController controller, int index, int indexMatches) {
return InkWell(
onTap: () {
Get.toNamed(Routes.detailMatchesRegions, arguments: controller.listMatches[index].matches![indexMatches]);
......@@ -89,8 +114,6 @@ class FootballPage extends GetView<FootballController> {
),
SizedBox(width: 6.w,),
Text('${controller.listMatches[index].matches![indexMatches].matchTime}\'',style: const TextStyle(color:ColorUtils.PRIMARY_COLOR, fontWeight: FontWeight.bold))
],
),
):
......@@ -109,9 +132,13 @@ class FootballPage extends GetView<FootballController> {
Row(
children: [
SizedBox(
height: 18.h,
height: 20.h,
width:18.h,
child: CacheNetWorkCustom(urlImage: '${controller.listMatches[index].matches![indexMatches].home?.logo}',),
child: CacheNetWorkCustom(urlImage:
controller.listMatches[index].matches![indexMatches].home?.logo!= null ?
'${controller.listMatches[index].matches![indexMatches].home?.logo}':
"https://upload.wikimedia.org/wikipedia/vi/thumb/c/c7/Logo_Real_Madrid.svg/1432px-Logo_Real_Madrid.svg.png"
,),
),
SizedBox(width: 8.w,),
RichText(text: TextSpan(
......@@ -138,9 +165,12 @@ class FootballPage extends GetView<FootballController> {
Row(
children: [
SizedBox(
height: 18.h,
height: 20.h,
width: 18.h,
child: CacheNetWorkCustom(urlImage: '${controller.listMatches[index].matches![indexMatches].away!.logo}',),
child: CacheNetWorkCustom(urlImage:
controller.listMatches[index].matches?[indexMatches].away?.logo!= null ?
'${controller.listMatches[index].matches?[indexMatches].away?.logo}' :
"https://upload.wikimedia.org/wikipedia/vi/thumb/1/1d/Manchester_City_FC_logo.svg/2048px-Manchester_City_FC_logo.svg.png",),
),
SizedBox(width: 6.5.w,),
SizedBox(
......@@ -162,8 +192,7 @@ class FootballPage extends GetView<FootballController> {
],
)
],
),
),
),),
SizedBox(width: 8.w,),
controller.listMatches[index].matches![indexMatches].status =='INIT' ?
InkWell(
......@@ -185,27 +214,5 @@ class FootballPage extends GetView<FootballController> {
),
),
);
},)),
index == 0 ?
NativeAdsCustom(height: 130.h,nativeAdManager:controller.nativeAds[0] ,radius: 0.r,) :const SizedBox(),
Visibility(
visible: Platform.isAndroid,
child: index == controller.listMatches.length/2 ?
NativeAdsCustom(height: 120.h,nativeAdManager: controller.nativeAds[1],radius: 0.r,) :const SizedBox()),
Visibility(
visible: Platform.isAndroid,
child: index == controller.listMatches.length -1?
NativeAdsCustom(height: 100.h,nativeAdManager: controller.nativeAds[2],radius: 0.r,):const SizedBox(),)
],
));
},)), onRefresh:() async{
Get.find<HomeController>().onRefreshPressed();
controller. getListMatchesOnDay('',controller.outputDateToDateFormat.format(DateTime.now()),'');
controller.listMatches.refresh();
},)
:const LoadingCustom();
},);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment