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
4708dbc1
Commit
4708dbc1
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
!18
parents
edd9bda9
cdc60293
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
52 additions
and
26 deletions
+52
-26
fixtures_screen.dart
...ites_view/matches_view/list_fixtures/fixtures_screen.dart
+26
-20
item_fixture_widget.dart
...tches_view/list_fixtures/widgets/item_fixture_widget.dart
+16
-5
fixtures_team_info.dart
...w/matches_view/fixtures_team_info/fixtures_team_info.dart
+1
-0
home_controller.dart
lib/view/mobile/home_page/home_controller.dart
+1
-0
home_page.dart
lib/view/mobile/home_page/home_page.dart
+8
-1
No files found.
lib/view/mobile/favourites_view/matches_view/list_fixtures/fixtures_screen.dart
View file @
4708dbc1
...
...
@@ -9,38 +9,37 @@ import 'package:betting/view/mobile/scores/football/football_controller.dart';
import
'package:flutter/material.dart'
;
import
'package:flutter_screenutil/flutter_screenutil.dart'
;
import
'package:get/get.dart'
;
import
'package:intl/intl.dart'
;
class
FixturesScreen
extends
StatelessWidget
{
FixturesScreen
({
Key
?
key
})
:
super
(
key:
key
);
final
fixtureC
ontroller
=
Get
.
put
(
FixturesController
());
final
c
ontroller
=
Get
.
put
(
FixturesController
());
@override
Widget
build
(
BuildContext
context
)
{
return
GetBuilder
<
FixturesController
>(
builder:
(
controller
)
{
return
RefreshIndicator
(
onRefresh:
()
async
{
fixtureC
ontroller
.
getListMatchesOnTeamFavourite
();
c
ontroller
.
getListMatchesOnTeamFavourite
();
Get
.
find
<
HomeController
>().
onRefreshPressed
();
},
child:
fixtureC
ontroller
.
isLoading
.
value
?
child:
c
ontroller
.
isLoading
.
value
?
Obx
(()
=>
ListView
.
builder
(
shrinkWrap:
true
,
itemCount:
fixtureC
ontroller
.
listMatChesFavourite
.
length
,
itemCount:
c
ontroller
.
listMatChesFavourite
.
length
,
itemBuilder:
(
context
,
index
)
{
return
Column
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
GestureDetector
(
onTap:
()
{
Get
.
toNamed
(
Routes
.
detailTournamentPage
,
arguments:
fixtureC
ontroller
.
listMatChesFavourite
[
index
]);
Get
.
toNamed
(
Routes
.
detailTournamentPage
,
arguments:
c
ontroller
.
listMatChesFavourite
[
index
]);
},
child:
TournamentsWidget
(
logo:
fixtureC
ontroller
.
listMatChesFavourite
[
index
].
logo
??
logo:
c
ontroller
.
listMatChesFavourite
[
index
].
logo
??
'https://upload.wikimedia.org/wikipedia/vi/thumb/5/5c/Chelsea_crest.svg/1200px-Chelsea_crest.svg.png'
,
nameTournaments:
fixtureC
ontroller
.
listMatChesFavourite
[
index
].
name
!,
typeTournaments:
fixtureC
ontroller
.
listMatChesFavourite
[
index
].
name
!,
isFavourite:
fixtureC
ontroller
.
listMatChesFavourite
[
index
].
favourite
,
nameTournaments:
c
ontroller
.
listMatChesFavourite
[
index
].
name
!,
typeTournaments:
c
ontroller
.
listMatChesFavourite
[
index
].
name
!,
isFavourite:
c
ontroller
.
listMatChesFavourite
[
index
].
favourite
,
),
),
SizedBox
(
...
...
@@ -53,21 +52,28 @@ class FixturesScreen extends StatelessWidget {
child:
ListView
.
builder
(
physics:
const
NeverScrollableScrollPhysics
(),
shrinkWrap:
true
,
itemCount:
fixtureC
ontroller
.
listMatChesFavourite
[
index
].
matches
?.
length
,
itemCount:
c
ontroller
.
listMatChesFavourite
[
index
].
matches
?.
length
,
itemBuilder:
(
context
,
indexMatches
)
{
Matches
?
match
=
fixtureC
ontroller
.
listMatChesFavourite
[
index
].
matches
?[
indexMatches
];
Matches
?
match
=
c
ontroller
.
listMatChesFavourite
[
index
].
matches
?[
indexMatches
];
return
GestureDetector
(
onTap:
()
{
Get
.
toNamed
(
Routes
.
detailMatchesRegions
,
arguments:
fixtureC
ontroller
.
listMatChesFavourite
[
index
].
matches
![
indexMatches
]);
Get
.
toNamed
(
Routes
.
detailMatchesRegions
,
arguments:
c
ontroller
.
listMatChesFavourite
[
index
].
matches
![
indexMatches
]);
},
child:
ItemFixtureWidget
(
match:
match
,
funcFavouriteMatch:
()
{
Get
.
find
<
FootballController
>().
deleteCompetitionsFavorites
(
fixtureController
.
listMatChesFavourite
[
index
].
sId
!);
fixtureController
.
listMatChesFavourite
.
refresh
();
},
isFavouriteMatch:
true
,
),
child:
Obx
(()
=>
ItemFixtureWidget
(
isNotification:
Get
.
find
<
HomeController
>().
isNotification
.
value
,
match:
match
,
funcFavouriteMatch:
()
{
Get
.
find
<
HomeController
>().
isNotification
.
value
==
true
?
controller
.
listMatChesFavourite
[
index
].
matches
![
indexMatches
].
favourite
=!
controller
.
listMatChesFavourite
[
index
].
matches
![
indexMatches
].
favourite
!:
Get
.
find
<
FootballController
>().
deleteCompetitionsFavorites
(
controller
.
listMatChesFavourite
[
index
].
sId
!);
controller
.
listMatChesFavourite
.
refresh
();
},
isFavouriteMatch:
Get
.
find
<
HomeController
>().
isNotification
.
value
==
true
?
controller
.
listMatChesFavourite
[
index
].
matches
![
indexMatches
].
favourite
!:
true
,
)),
);
},
),
...
...
lib/view/mobile/favourites_view/matches_view/list_fixtures/widgets/item_fixture_widget.dart
View file @
4708dbc1
...
...
@@ -10,17 +10,21 @@ class ItemFixtureWidget extends StatelessWidget {
const
ItemFixtureWidget
({
Key
?
key
,
required
this
.
isFavouriteMatch
,
required
this
.
isNotification
,
required
this
.
funcFavouriteMatch
,
this
.
match
,
})
:
super
(
key:
key
);
final
bool
isFavouriteMatch
;
final
Function
funcFavouriteMatch
;
final
bool
isNotification
;
final
Matches
?
match
;
@override
Widget
build
(
BuildContext
context
)
{
return
Container
(
return
Container
(
margin:
const
EdgeInsets
.
only
(
bottom:
8
),
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
8
),
decoration:
BoxDecoration
(
...
...
@@ -167,16 +171,23 @@ class ItemFixtureWidget extends StatelessWidget {
],
),
GestureDetector
(
onTap:
()
=>
funcFavouriteMatch
,
onTap:
()
=>
funcFavouriteMatch
()
,
child:
Container
(
margin:
const
EdgeInsets
.
only
(
right:
8
),
child:
Icon
(
isNotification
==
false
?
isFavouriteMatch
==
true
?
Icons
.
star_rounded
:
Icons
.
star_border_rounded
,
color:
isFavouriteMatch
==
true
:
Icons
.
star_border_rounded
:
isFavouriteMatch
==
true
?
Icons
.
notifications
:
Icons
.
notifications_off_outlined
,
color:
isNotification
==
false
?
isFavouriteMatch
==
true
?
ColorUtils
.
PRIMARY_COLOR
:
Colors
.
white
,
:
Colors
.
white
:
ColorUtils
.
PRIMARY_COLOR
,
size:
22
.
sp
,
),
),
...
...
lib/view/mobile/favourites_view/teams/team_info_view/matches_view/fixtures_team_info/fixtures_team_info.dart
View file @
4708dbc1
...
...
@@ -62,6 +62,7 @@ class FixturesTeamInfo extends StatelessWidget {
},
child:
Expanded
(
child:
ItemFixtureWidget
(
isNotification:
false
,
match:
match
,
isFavouriteMatch:
true
,
funcFavouriteMatch:
(){},
),
...
...
lib/view/mobile/home_page/home_controller.dart
View file @
4708dbc1
...
...
@@ -16,6 +16,7 @@ class HomeController extends GetxController with GetSingleTickerProviderStateMix
AnimationController
?
animationController
;
RxInt
indexSport
=
0
.
obs
;
RxBool
isRotating
=
false
.
obs
;
RxBool
isNotification
=
false
.
obs
;
InterstitialAd
?
interstitialAd
;
RewardedAd
?
rewardedAd
;
var
outputDateToDateFormat
=
DateFormat
(
'yyyy-MM-dd'
);
...
...
lib/view/mobile/home_page/home_page.dart
View file @
4708dbc1
...
...
@@ -49,7 +49,14 @@ class _HomePageState extends State<HomePage> {
actions:
[
Visibility
(
visible:
controller
.
currentIndex
.
value
==
1
,
child:
const
Icon
(
Icons
.
notifications_active_outlined
,
color:
Colors
.
white
,)),
child:
InkWell
(
onTap:
(){
controller
.
isNotification
.
value
=!
controller
.
isNotification
.
value
;
},
child:
controller
.
isNotification
.
value
==
false
?
const
Icon
(
Icons
.
notifications
,
color:
Colors
.
white
,)
:
const
Icon
(
Icons
.
notifications
,
color:
ColorUtils
.
PRIMARY_COLOR
,),
)),
SizedBox
(
width:
8
.
w
,),
InkWell
(
highlightColor:
Colors
.
transparent
,
...
...
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