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

nmn update

parent cdc60293
...@@ -18,7 +18,7 @@ class CacheNetWorkCustom extends StatelessWidget { ...@@ -18,7 +18,7 @@ class CacheNetWorkCustom extends StatelessWidget {
decoration: BoxDecoration( decoration: BoxDecoration(
image: DecorationImage( image: DecorationImage(
image: imageProvider, image: imageProvider,
fit: BoxFit.cover, fit: BoxFit.fill,
), ),
), ),
), ),
......
...@@ -169,11 +169,11 @@ class DetailMatchesRegionsController extends GetxController { ...@@ -169,11 +169,11 @@ class DetailMatchesRegionsController extends GetxController {
} }
checkHeight() { checkHeight() {
if(isVisiablebackgroudYt.value == true){ if(isVisiablebackgroudYt.value == true){
return 320.h; return 330.h;
}else if(isVisiable.value == true){ }else if(isVisiable.value == true){
return 360.h; return 360.h;
}else if(isVisiableYt.value == true){ }else if(isVisiableYt.value == true){
return 320.h; return 330.h;
}else{ }else{
return 150.h; return 150.h;
} }
......
...@@ -61,6 +61,31 @@ class FootballPage extends GetView<FootballController> { ...@@ -61,6 +61,31 @@ class FootballPage extends GetView<FootballController> {
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
physics: const NeverScrollableScrollPhysics(), physics: const NeverScrollableScrollPhysics(),
itemBuilder: (context, indexMatches) { 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( return InkWell(
onTap: () { onTap: () {
Get.toNamed(Routes.detailMatchesRegions, arguments: controller.listMatches[index].matches![indexMatches]); Get.toNamed(Routes.detailMatchesRegions, arguments: controller.listMatches[index].matches![indexMatches]);
...@@ -89,8 +114,6 @@ class FootballPage extends GetView<FootballController> { ...@@ -89,8 +114,6 @@ class FootballPage extends GetView<FootballController> {
), ),
SizedBox(width: 6.w,), SizedBox(width: 6.w,),
Text('${controller.listMatches[index].matches![indexMatches].matchTime}\'',style: const TextStyle(color:ColorUtils.PRIMARY_COLOR, fontWeight: FontWeight.bold)) 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> { ...@@ -109,9 +132,13 @@ class FootballPage extends GetView<FootballController> {
Row( Row(
children: [ children: [
SizedBox( SizedBox(
height: 18.h, height: 20.h,
width:18.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,), SizedBox(width: 8.w,),
RichText(text: TextSpan( RichText(text: TextSpan(
...@@ -138,9 +165,12 @@ class FootballPage extends GetView<FootballController> { ...@@ -138,9 +165,12 @@ class FootballPage extends GetView<FootballController> {
Row( Row(
children: [ children: [
SizedBox( SizedBox(
height: 18.h, height: 20.h,
width: 18.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(width: 6.5.w,),
SizedBox( SizedBox(
...@@ -162,8 +192,7 @@ class FootballPage extends GetView<FootballController> { ...@@ -162,8 +192,7 @@ class FootballPage extends GetView<FootballController> {
], ],
) )
], ],
), ),),
),
SizedBox(width: 8.w,), SizedBox(width: 8.w,),
controller.listMatches[index].matches![indexMatches].status =='INIT' ? controller.listMatches[index].matches![indexMatches].status =='INIT' ?
InkWell( InkWell(
...@@ -185,27 +214,5 @@ class FootballPage extends GetView<FootballController> { ...@@ -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