Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
Betting
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nguyễn Minh Nhật
Betting
Commits
c2147834
Commit
c2147834
authored
Sep 11, 2023
by
Nguyễn Minh Nhật
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev/nhat_nm' into 'develop'
nmn update See merge request
!19
parents
4708dbc1
bd3eec99
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
136 additions
and
129 deletions
+136
-129
cache_network_custom.dart
lib/commom/widget/cache_network_custom.dart
+1
-1
detail_matches_regions_controller.dart
...matches_in_regions/detail_matches_regions_controller.dart
+2
-2
football_page.dart
lib/view/mobile/scores/football/football_page.dart
+133
-126
No files found.
lib/commom/widget/cache_network_custom.dart
View file @
c2147834
...
...
@@ -18,7 +18,7 @@ class CacheNetWorkCustom extends StatelessWidget {
decoration:
BoxDecoration
(
image:
DecorationImage
(
image:
imageProvider
,
fit:
BoxFit
.
cover
,
fit:
BoxFit
.
fill
,
),
),
),
...
...
lib/view/mobile/find/detail_matches_in_regions/detail_matches_regions_controller.dart
View file @
c2147834
...
...
@@ -169,11 +169,11 @@ class DetailMatchesRegionsController extends GetxController {
}
checkHeight
()
{
if
(
isVisiablebackgroudYt
.
value
==
true
){
return
3
2
0
.
h
;
return
3
3
0
.
h
;
}
else
if
(
isVisiable
.
value
==
true
){
return
360
.
h
;
}
else
if
(
isVisiableYt
.
value
==
true
){
return
3
2
0
.
h
;
return
3
3
0
.
h
;
}
else
{
return
150
.
h
;
}
...
...
lib/view/mobile/scores/football/football_page.dart
View file @
c2147834
...
...
@@ -61,130 +61,8 @@ class FootballPage extends GetView<FootballController> {
padding:
EdgeInsets
.
zero
,
physics:
const
NeverScrollableScrollPhysics
(),
itemBuilder:
(
context
,
indexMatches
)
{
return
InkWell
(
onTap:
()
{
Get
.
toNamed
(
Routes
.
detailMatchesRegions
,
arguments:
controller
.
listMatches
[
index
].
matches
![
indexMatches
]);
},
child:
Container
(
margin:
EdgeInsets
.
only
(
bottom:
4
.
h
),
padding:
EdgeInsets
.
symmetric
(
vertical:
8
.
h
),
decoration:
BoxDecoration
(
color:
const
Color
.
fromRGBO
(
255
,
255
,
255
,
0.1
),
borderRadius:
BorderRadius
.
circular
(
6
.
r
)
),
child:
Row
(
children:
[
controller
.
listMatches
[
index
].
matches
![
indexMatches
].
status
==
'IN PLAY'
?
SizedBox
(
width:
40
.
w
,
child:
Row
(
children:
[
Container
(
decoration:
const
BoxDecoration
(
borderRadius:
BorderRadius
.
only
(
topRight:
Radius
.
circular
(
6
),
bottomRight:
Radius
.
circular
(
6
)),
color:
ColorUtils
.
PRIMARY_COLOR
,
),
width:
4
.
w
,
height:
40
.
h
,
),
SizedBox
(
width:
6
.
w
,),
Text
(
'
${controller.listMatches[index].matches![indexMatches].matchTime}
\'
'
,
style:
const
TextStyle
(
color:
ColorUtils
.
PRIMARY_COLOR
,
fontWeight:
FontWeight
.
bold
))
],
),
):
Column
(
children:
[
SizedBox
(
width:
40
.
w
,
child:
Text
(
controller
.
getMatchTimeText
(
index
,
indexMatches
),
textAlign:
TextAlign
.
center
,
style:
const
TextStyle
(
color:
Colors
.
white
),),
),
],
),
SizedBox
(
width:
8
.
w
,),
Expanded
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Row
(
children:
[
SizedBox
(
height:
18
.
h
,
width:
18
.
h
,
child:
CacheNetWorkCustom
(
urlImage:
'
${controller.listMatches[index].matches![indexMatches].home?.logo}
'
,),
),
SizedBox
(
width:
8
.
w
,),
RichText
(
text:
TextSpan
(
children:
[
TextSpan
(
text:
"
${controller.listMatches[index].matches![indexMatches].home!.name}
"
,
style:
const
TextStyle
(
color:
Colors
.
white
)),
WidgetSpan
(
child:
controller
.
listMatches
[
index
].
matches
![
indexMatches
].
home
!.
favourite
==
true
?
Container
(
margin:
EdgeInsets
.
only
(
left:
4
.
w
),
child:
const
Icon
(
Icons
.
star
,
color:
Colors
.
grey
,
size:
16
,),):
Container
(),
)
]
)),
SizedBox
(
width:
8
.
w
,),
const
Spacer
(),
controller
.
listMatches
[
index
].
matches
![
indexMatches
].
status
==
'FINISHED'
?
Text
(
controller
.
listMatches
[
index
].
matches
![
indexMatches
].
ftScore
!=
""
?
controller
.
listMatches
[
index
].
matches
![
indexMatches
].
ftScore
!.
substring
(
0
,
1
):
''
,
style:
const
TextStyle
(
color:
Colors
.
white
),):
controller
.
listMatches
[
index
].
matches
![
indexMatches
].
status
==
'IN PLAY'
?
controller
.
listMatches
[
index
].
matches
![
indexMatches
].
score
!=
""
?
Text
(
controller
.
listMatches
[
index
].
matches
![
indexMatches
].
score
!.
substring
(
0
,
1
),
style:
const
TextStyle
(
color:
Colors
.
white
),):
const
Text
(
'0'
,
style:
TextStyle
(
color:
Colors
.
white
)):
const
Text
(
''
),
],
),
SizedBox
(
height:
4
.
h
,),
Row
(
children:
[
SizedBox
(
height:
18
.
h
,
width:
18
.
h
,
child:
CacheNetWorkCustom
(
urlImage:
'
${controller.listMatches[index].matches![indexMatches].away!.logo}
'
,),
),
SizedBox
(
width:
6.5
.
w
,),
SizedBox
(
width:
160
.
w
,
child:
Text
(
"
${controller.listMatches[index].matches![indexMatches].away!.name}
"
,
style:
const
TextStyle
(
color:
Colors
.
white
),),
),
SizedBox
(
width:
6.5
.
w
,),
controller
.
listMatches
[
index
].
matches
![
indexMatches
].
away
!.
favourite
==
true
?
const
Icon
(
Icons
.
star
,
color:
Colors
.
grey
,
size:
16
,):
Container
(),
const
Spacer
(),
controller
.
listMatches
[
index
].
matches
![
indexMatches
].
status
==
'FINISHED'
?
Text
(
controller
.
listMatches
[
index
].
matches
![
indexMatches
].
ftScore
!=
""
?
controller
.
listMatches
[
index
].
matches
![
indexMatches
].
ftScore
!.
substring
(
4
,
5
):
''
,
style:
const
TextStyle
(
color:
Colors
.
white
),):
controller
.
listMatches
[
index
].
matches
![
indexMatches
].
status
==
'IN PLAY'
?
controller
.
listMatches
[
index
].
matches
![
indexMatches
].
score
!=
""
?
Text
(
controller
.
listMatches
[
index
].
matches
![
indexMatches
].
score
!.
substring
(
4
,
5
),
style:
const
TextStyle
(
color:
Colors
.
white
),):
const
Text
(
'0'
,
style:
TextStyle
(
color:
Colors
.
white
)):
const
Text
(
''
),
],
)
],
),
),
SizedBox
(
width:
8
.
w
,),
controller
.
listMatches
[
index
].
matches
![
indexMatches
].
status
==
'INIT'
?
InkWell
(
onTap:
(){
controller
.
listMatches
[
index
].
matches
![
indexMatches
].
favourite
=!
controller
.
listMatches
[
index
].
matches
![
indexMatches
].
favourite
!;
if
(
controller
.
listMatches
[
index
].
matches
![
indexMatches
].
favourite
==
true
){
controller
.
addMatchesFavorites
(
controller
.
listMatches
[
index
].
matches
![
indexMatches
].
sId
!,
index
);
controller
.
listMatches
.
refresh
();
}
else
{
controller
.
deleteCompetitionsFavorites
(
controller
.
listMatches
[
index
].
matches
![
indexMatches
].
sId
!);
}
},
child:
controller
.
listMatches
[
index
].
matches
![
indexMatches
].
favourite
==
true
?
const
Icon
(
Icons
.
star_rounded
,
color:
ColorUtils
.
PRIMARY_COLOR
,)
:
const
Icon
(
Icons
.
star_border_rounded
,
color:
Colors
.
white
,),
)
:
const
Icon
(
Icons
.
star_border_rounded
,
color:
Colors
.
grey
,),
SizedBox
(
width:
8
.
w
,),
],
),
),
);
return
itemListScore
(
controller
,
index
,
indexMatches
);
},)),
index
==
0
?
NativeAdsCustom
(
height:
130
.
h
,
nativeAdManager:
controller
.
nativeAds
[
0
]
,
radius:
0
.
r
,)
:
const
SizedBox
(),
...
...
@@ -202,10 +80,139 @@ class FootballPage extends GetView<FootballController> {
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
]);
},
child:
Container
(
margin:
EdgeInsets
.
only
(
bottom:
4
.
h
),
padding:
EdgeInsets
.
symmetric
(
vertical:
8
.
h
),
decoration:
BoxDecoration
(
color:
const
Color
.
fromRGBO
(
255
,
255
,
255
,
0.1
),
borderRadius:
BorderRadius
.
circular
(
6
.
r
)
),
child:
Row
(
children:
[
controller
.
listMatches
[
index
].
matches
![
indexMatches
].
status
==
'IN PLAY'
?
SizedBox
(
width:
40
.
w
,
child:
Row
(
children:
[
Container
(
decoration:
const
BoxDecoration
(
borderRadius:
BorderRadius
.
only
(
topRight:
Radius
.
circular
(
6
),
bottomRight:
Radius
.
circular
(
6
)),
color:
ColorUtils
.
PRIMARY_COLOR
,
),
width:
4
.
w
,
height:
40
.
h
,
),
SizedBox
(
width:
6
.
w
,),
Text
(
'
${controller.listMatches[index].matches![indexMatches].matchTime}
\'
'
,
style:
const
TextStyle
(
color:
ColorUtils
.
PRIMARY_COLOR
,
fontWeight:
FontWeight
.
bold
))
],
),
):
Column
(
children:
[
SizedBox
(
width:
40
.
w
,
child:
Text
(
controller
.
getMatchTimeText
(
index
,
indexMatches
),
textAlign:
TextAlign
.
center
,
style:
const
TextStyle
(
color:
Colors
.
white
),),
),
],
),
SizedBox
(
width:
8
.
w
,),
Expanded
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Row
(
children:
[
SizedBox
(
height:
20
.
h
,
width:
18
.
h
,
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
(
children:
[
TextSpan
(
text:
"
${controller.listMatches[index].matches![indexMatches].home!.name}
"
,
style:
const
TextStyle
(
color:
Colors
.
white
)),
WidgetSpan
(
child:
controller
.
listMatches
[
index
].
matches
![
indexMatches
].
home
!.
favourite
==
true
?
Container
(
margin:
EdgeInsets
.
only
(
left:
4
.
w
),
child:
const
Icon
(
Icons
.
star
,
color:
Colors
.
grey
,
size:
16
,),):
Container
(),
)
]
)),
SizedBox
(
width:
8
.
w
,),
const
Spacer
(),
controller
.
listMatches
[
index
].
matches
![
indexMatches
].
status
==
'FINISHED'
?
Text
(
controller
.
listMatches
[
index
].
matches
![
indexMatches
].
ftScore
!=
""
?
controller
.
listMatches
[
index
].
matches
![
indexMatches
].
ftScore
!.
substring
(
0
,
1
):
''
,
style:
const
TextStyle
(
color:
Colors
.
white
),):
controller
.
listMatches
[
index
].
matches
![
indexMatches
].
status
==
'IN PLAY'
?
controller
.
listMatches
[
index
].
matches
![
indexMatches
].
score
!=
""
?
Text
(
controller
.
listMatches
[
index
].
matches
![
indexMatches
].
score
!.
substring
(
0
,
1
),
style:
const
TextStyle
(
color:
Colors
.
white
),):
const
Text
(
'0'
,
style:
TextStyle
(
color:
Colors
.
white
)):
const
Text
(
''
),
],
),
SizedBox
(
height:
4
.
h
,),
Row
(
children:
[
SizedBox
(
height:
20
.
h
,
width:
18
.
h
,
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:
160
.
w
,
child:
Text
(
"
${controller.listMatches[index].matches![indexMatches].away!.name}
"
,
style:
const
TextStyle
(
color:
Colors
.
white
),),
),
SizedBox
(
width:
6.5
.
w
,),
controller
.
listMatches
[
index
].
matches
![
indexMatches
].
away
!.
favourite
==
true
?
const
Icon
(
Icons
.
star
,
color:
Colors
.
grey
,
size:
16
,):
Container
(),
const
Spacer
(),
controller
.
listMatches
[
index
].
matches
![
indexMatches
].
status
==
'FINISHED'
?
Text
(
controller
.
listMatches
[
index
].
matches
![
indexMatches
].
ftScore
!=
""
?
controller
.
listMatches
[
index
].
matches
![
indexMatches
].
ftScore
!.
substring
(
4
,
5
):
''
,
style:
const
TextStyle
(
color:
Colors
.
white
),):
controller
.
listMatches
[
index
].
matches
![
indexMatches
].
status
==
'IN PLAY'
?
controller
.
listMatches
[
index
].
matches
![
indexMatches
].
score
!=
""
?
Text
(
controller
.
listMatches
[
index
].
matches
![
indexMatches
].
score
!.
substring
(
4
,
5
),
style:
const
TextStyle
(
color:
Colors
.
white
),):
const
Text
(
'0'
,
style:
TextStyle
(
color:
Colors
.
white
)):
const
Text
(
''
),
],
)
],
),),
SizedBox
(
width:
8
.
w
,),
controller
.
listMatches
[
index
].
matches
![
indexMatches
].
status
==
'INIT'
?
InkWell
(
onTap:
(){
controller
.
listMatches
[
index
].
matches
![
indexMatches
].
favourite
=!
controller
.
listMatches
[
index
].
matches
![
indexMatches
].
favourite
!;
if
(
controller
.
listMatches
[
index
].
matches
![
indexMatches
].
favourite
==
true
){
controller
.
addMatchesFavorites
(
controller
.
listMatches
[
index
].
matches
![
indexMatches
].
sId
!,
index
);
controller
.
listMatches
.
refresh
();
}
else
{
controller
.
deleteCompetitionsFavorites
(
controller
.
listMatches
[
index
].
matches
![
indexMatches
].
sId
!);
}
},
child:
controller
.
listMatches
[
index
].
matches
![
indexMatches
].
favourite
==
true
?
const
Icon
(
Icons
.
star_rounded
,
color:
ColorUtils
.
PRIMARY_COLOR
,)
:
const
Icon
(
Icons
.
star_border_rounded
,
color:
Colors
.
white
,),
)
:
const
Icon
(
Icons
.
star_border_rounded
,
color:
Colors
.
grey
,),
SizedBox
(
width:
8
.
w
,),
],
),
),
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment