Skip to content

Commit

Permalink
Merge pull request #23 from Sparsh1212/resolve-leaders-leaderboard
Browse files Browse the repository at this point in the history
Resolve correct medals and border for Leaders
  • Loading branch information
Samuel Rosado committed Apr 15, 2021
2 parents 483b314 + 7cb5d95 commit b057f16
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions lib/pages/leaderboard.dart
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,19 @@ class _LeaderBoardState extends State<LeaderBoard> {
return ListView.builder(
itemCount: list.length,
itemBuilder: (context, index) {
int title = list[index].title;
return Padding(
padding: const EdgeInsets.symmetric(
horizontal: 5.0, vertical: 5.0),
child: InkWell(
child: Container(
decoration: BoxDecoration(
border: Border.all(
color: i == 0
color: title == 3
? Colors.amber
: i == 1
: title == 2
? Colors.grey
: i == 2
: title == 1
? Colors.brown
: Colors.white,
width: 3.0,
Expand Down Expand Up @@ -145,14 +146,14 @@ class _LeaderBoardState extends State<LeaderBoard> {
),
),
Flexible(child: Container()),
i == 0
title == 3
? Text("🥇", style: r)
: i == 1
: title == 2
? Text(
"🥈",
style: r,
)
: i == 2
: title == 1
? Text(
"🥉",
style: r,
Expand Down

0 comments on commit b057f16

Please sign in to comment.