Skip to content

Commit

Permalink
issue #29 Fix Pixel Overflow Error in Upcoming Match Card (#41)
Browse files Browse the repository at this point in the history
* #36,#34,#32
- Run code
- Update dependencies
- Compatible version up to Flutter 3.24

* - Solved issue - #36,#34,#32
- Run code
- Update dependencies
- Compatible version up to Flutter 3.24

* - issue resolve

* - Pixel Overflow Error in "Upcoming Match Card" issue resolve

* - Pixel Overflow Error in "Upcoming Match Card" issue resolve

* - issue resolve
  • Loading branch information
JayAgola authored Oct 25, 2024
1 parent 7fd6591 commit 9609418
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 49 deletions.
1 change: 1 addition & 0 deletions .github/workflows/flutter_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
- name: Check out code
uses: actions/checkout@v4


- name: Set up Flutter
uses: subosito/flutter-action@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class MyApp extends StatelessWidget {
routes: {
AdminMainPage.routeName: (ctx) => AdminMainPage(),
AuctionHome.routeName: (ctx) => AuctionHome(),
// AuctionPlayer.routeName: (ctx) => AuctionPlayer(),
//AuctionPlayer.routeName: (ctx) => AuctionPlayer(),
AuctionPlayerResell.routeName: (ctx) => AuctionPlayerResell(),
AuctionDetails.routeName: (ctx) => AuctionDetails(),
TeamDetails.routeName: (ctx) => TeamDetails(),
Expand Down
85 changes: 51 additions & 34 deletions lib/screens/player/schedule_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ class UpcomingMatchCard extends StatelessWidget {
);
},
child: Container(
width: MediaQuery.sizeOf(context).width*0.8,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20),
border: Border.all(
Expand Down Expand Up @@ -211,50 +212,66 @@ class UpcomingMatchCard extends StatelessWidget {
),
title: Center(
child: Column(children: [
Text(
"Match " + match.matchId,
style: TextStyle(
fontSize: 22,
fontWeight: FontWeight.bold,
color: Colors.white60),
Container(
child: Text(
"Match " + match.matchId,
style: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.white60),
textScaler: TextScaler.linear(1.5),
),
),
SizedBox(
height: 12,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Text(
teams
.firstWhere((e) => e.teamUid == match.teamId1)
.teamAbbreviation,
// teams.firstWhere((e) => e.teamUid==match.teamId1).teamAbbreviation[1] +
// teams.firstWhere((e) => e.teamUid==match.teamId1).teamAbbreviation[2],
Container(
width: MediaQuery.sizeOf(context).width*0.175,
alignment: Alignment.center,
child: Text(
teams
.firstWhere((e) => e.teamUid == match.teamId1)
.teamAbbreviation,
// teams.firstWhere((e) => e.teamUid==match.teamId1).teamAbbreviation[1] +
// teams.firstWhere((e) => e.teamUid==match.teamId1).teamAbbreviation[2],

// overflow: TextOverflow.visible,
style: TextStyle(
color: Colors.white60,
fontWeight: FontWeight.bold,
fontSize: 18),
// overflow: TextOverflow.visible,
style: TextStyle(
color: Colors.white60,
fontWeight: FontWeight.bold,
),
textScaler: TextScaler.linear(1),
),
),
Text(
" Vs ",
style: TextStyle(
color: Colors.white60,
fontWeight: FontWeight.bold,
fontSize: 18),
Container(
width: MediaQuery.sizeOf(context).width*0.075,
alignment: Alignment.center,
child: Text(
" Vs ",
style: TextStyle(
color: Colors.white60,
fontWeight: FontWeight.bold,
),
textScaler: TextScaler.linear(1),
),
),
Text(
teams
.firstWhere((e) => e.teamUid == match.teamId2)
.teamAbbreviation,
// teams.firstWhere((e) => e.teamUid==match.teamId2).teamAbbreviation[1] +
// teams.firstWhere((e) => e.teamUid==match.teamId2).teamAbbreviation[2],
overflow: TextOverflow.visible,
style: TextStyle(
color: Colors.white60,
fontWeight: FontWeight.bold,
fontSize: 18),
Container(
alignment: Alignment.center,
width: MediaQuery.sizeOf(context).width*0.175,
child: Text(
teams
.firstWhere((e) => e.teamUid == match.teamId2)
.teamAbbreviation,
// teams.firstWhere((e) => e.teamUid==match.teamId2).teamAbbreviation[1] +
// teams.firstWhere((e) => e.teamUid==match.teamId2).teamAbbreviation[2],
// overflow: TextOverflow.ellipsis,
style: TextStyle(
color: Colors.white60,
fontWeight: FontWeight.bold,
),textScaler: TextScaler.linear(1),
),
),
],
),
Expand Down
36 changes: 22 additions & 14 deletions lib/widgets/upcoming_match_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,11 @@ class _UpcomingMatchCardState extends State<UpcomingMatchCard> {
snapshot.data.toString(),
),
);
} else if (snapshot.hasError) {
}
else if (snapshot.hasError) {
return Icon(Icons.image_not_supported_sharp);
} else {
}
else {
return CircleAvatar(
radius: 20,
backgroundColor: CustomColors.primaryColor,
Expand All @@ -80,12 +82,15 @@ class _UpcomingMatchCardState extends State<UpcomingMatchCard> {
},
),
),
Text(
team1.teamAbbreviation,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 15,
color: Colors.white60,
Container(
width: MediaQuery.sizeOf(context).width*0.175,
child: Text(
team1.teamAbbreviation,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 15,
color: Colors.white60,
),
),
),
],
Expand Down Expand Up @@ -168,12 +173,15 @@ class _UpcomingMatchCardState extends State<UpcomingMatchCard> {
},
),
),
Text(
team2.teamAbbreviation,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 15,
color: Colors.white60,
Container(
width: MediaQuery.sizeOf(context).width*0.175,
child: Text(
team2.teamAbbreviation,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 15,
color: Colors.white60,
),
),
),
],
Expand Down

0 comments on commit 9609418

Please sign in to comment.