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

nmn update

parent 6cce2fbc
...@@ -172,6 +172,8 @@ class DetailMatchesRegionsController extends GetxController { ...@@ -172,6 +172,8 @@ class DetailMatchesRegionsController extends GetxController {
return 320.h; return 320.h;
}else if(isVisiable.value == true){ }else if(isVisiable.value == true){
return 360.h; return 360.h;
}else if(isVisiableYt.value == true){
return 320.h;
}else{ }else{
return 140.h; return 140.h;
} }
......
...@@ -49,7 +49,88 @@ class DetailMatchesRegionsPage extends GetWidget<DetailMatchesRegionsController> ...@@ -49,7 +49,88 @@ class DetailMatchesRegionsPage extends GetWidget<DetailMatchesRegionsController>
Scaffold( Scaffold(
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
appBar: appBar:
AppBar( MediaQuery.of(context).orientation == Orientation.landscape ?
controller.isVisiableYt.value == true || controller.isVisiablebackgroudYt.value == true?
null: AppBar(
title:
Obx(() => Center(
child:
Visibility(
visible: controller.isHeader.value==false,
child:
Row(
children: [
Expanded(
flex:2,
child: InkWell(
onTap: () {
Get.toNamed(Routes.detailTeams);
},
child:
Image.network('https://upload.wikimedia.org/wikipedia/vi/thumb/a/a1/Man_Utd_FC_.svg/1200px-Man_Utd_FC_.svg.png', width: 24.w, height: 24.h,)
),),
Expanded(
flex: 1,
child:
controller.itemArgument.value.status == 'FINISHED'?
Text('${controller.itemArgument.value.ftScore}',textAlign: TextAlign.center, style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 16.sp),)
: Text(controller.outputTimeFormat.format(DateFormat('HH:mm:ss').parse('${controller.itemArgument.value.time}')),textAlign: TextAlign.center,style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 16.sp),)
,
),
Expanded(
flex:2,
child: InkWell(
onTap: () {
Get.toNamed(Routes.detailTeams);
},
child: Image.network('https://upload.wikimedia.org/wikipedia/vi/thumb/a/a1/Man_Utd_FC_.svg/1200px-Man_Utd_FC_.svg.png', width: 24.w, height: 24.h,)
),),
],
),
),
) ),
centerTitle: true,
backgroundColor: Colors.transparent,
automaticallyImplyLeading: false,
actions: [
Obx(() =>
controller.isHeader.value==false? const SizedBox():
InkWell(
onTap: (){
controller.isVisiablebackgroudYt.value =! controller.isVisiablebackgroudYt.value;
controller.isVisiable.value= false;
controller.isVisiableYt.value= false;
},
child: const Icon(Icons.video_camera_back, color: Colors.white,size: 24,),
),),
SizedBox(width: 30.w,),
InkWell(
onTap: (){
controller.isVisiable.value =! controller.isVisiable.value;
controller.isVisiablebackgroudYt.value= false;
controller.isVisiableYt.value= false;
},
child: Image.asset('assets/images/san.jpg', width: 24, height: 24,),
),
SizedBox(width: 10.h,),
],
leading:InkWell(
onTap: (){
Get.back();
Get.delete<DetailMatchesRegionsController>();
Get.delete<SummaryMatchesRegionsController>();
Get.delete<StatsMatchesRegionsController>();
Get.delete<H2hMatchesRegionsController>();
},
child: const Icon(CupertinoIcons.back, color: Colors.white, size: 24,),
),
) : AppBar(
title: title:
Obx(() => Center( Obx(() => Center(
child: child:
...@@ -142,12 +223,15 @@ class DetailMatchesRegionsPage extends GetWidget<DetailMatchesRegionsController> ...@@ -142,12 +223,15 @@ class DetailMatchesRegionsPage extends GetWidget<DetailMatchesRegionsController>
collapsedHeight:controller.checkHeight(), collapsedHeight:controller.checkHeight(),
flexibleSpace:Column( flexibleSpace:Column(
children: [ children: [
MediaQuery.of(context).orientation == Orientation.landscape ?
controller.isVisiableYt.value == true || controller.isVisiablebackgroudYt.value == true? Container(height: 15,): const SizedBox():const SizedBox(),
bannerDetailMatches(context), bannerDetailMatches(context),
], ],
), ),
)), )),
SliverPersistentHeader( SliverPersistentHeader(
floating: true, floating: false,
delegate: MyDelegate(),pinned: true,), delegate: MyDelegate(),pinned: true,),
]; ];
}, },
...@@ -301,7 +385,7 @@ class DetailMatchesRegionsPage extends GetWidget<DetailMatchesRegionsController> ...@@ -301,7 +385,7 @@ class DetailMatchesRegionsPage extends GetWidget<DetailMatchesRegionsController>
child: child:
SizedBox( SizedBox(
width: double.infinity, width: double.infinity,
height: MediaQuery.of(context).orientation == Orientation.landscape ?Get.height/2*3/2-3: 180.h, height: MediaQuery.of(context).orientation == Orientation.landscape ?Get.height: 180.h,
child: child:
// Chewie( // Chewie(
// controller: controller.chewiwController,) // controller: controller.chewiwController,)
...@@ -324,7 +408,7 @@ class DetailMatchesRegionsPage extends GetWidget<DetailMatchesRegionsController> ...@@ -324,7 +408,7 @@ class DetailMatchesRegionsPage extends GetWidget<DetailMatchesRegionsController>
child: child:
SizedBox( SizedBox(
width: double.infinity, width: double.infinity,
height: MediaQuery.of(context).orientation == Orientation.landscape ?Get.height/2*3/2-19: 180.h, height: MediaQuery.of(context).orientation == Orientation.landscape ?Get.height: 180.h,
child: child:
Stack( Stack(
children: [ children: [
......
...@@ -2,7 +2,6 @@ import 'package:betting/data/base_service/api_response.dart'; ...@@ -2,7 +2,6 @@ import 'package:betting/data/base_service/api_response.dart';
import 'package:betting/data/model/res/infor_team/infor_team.dart'; import 'package:betting/data/model/res/infor_team/infor_team.dart';
import 'package:betting/data/model/res/matches/matches.dart'; import 'package:betting/data/model/res/matches/matches.dart';
import 'package:betting/data/repository/matches/matches_repo.dart'; import 'package:betting/data/repository/matches/matches_repo.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:intl/intl.dart'; import 'package:intl/intl.dart';
......
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