Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Leaderboard error resolved #419

Merged
merged 1 commit into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion lib/src/pages/drawer/about.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,19 @@ class AboutPage extends StatelessWidget {
leading: IconButton(
icon: Icon(
Icons.arrow_back_ios_new_rounded,
color: Colors.white,
),
onPressed: () {
Navigator.of(context).pop();
},
),
title: Text(AppLocalizations.of(context)!.aboutUs),
title: Text(
AppLocalizations.of(context)!.aboutUs,
style: TextStyle(
color: Colors.white,
fontSize: 20,
),
),
backgroundColor:
isDarkMode ? Color.fromRGBO(58, 21, 31, 1) : Color(0xFFDC4654),
),
Expand Down
9 changes: 8 additions & 1 deletion lib/src/pages/drawer/legal.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,19 @@ class LegalPage extends StatelessWidget {
leading: IconButton(
icon: Icon(
Icons.arrow_back_ios_new_rounded,
color: Colors.white,
),
onPressed: () {
Navigator.of(context).pop();
},
),
title: Text(AppLocalizations.of(context)!.termsOfService),
title: Text(
AppLocalizations.of(context)!.termsOfService,
style: TextStyle(
color: Colors.white,
fontSize: 20,
),
),
backgroundColor:
isDarkMode ? Color.fromRGBO(58, 21, 31, 1) : Color(0xFFDC4654),
),
Expand Down
9 changes: 8 additions & 1 deletion lib/src/pages/drawer/social.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,19 @@ class _SocialPageState extends ConsumerState<SocialPage> {
leading: IconButton(
icon: Icon(
Icons.arrow_back_ios_new_rounded,
color: Colors.white,
),
onPressed: () {
Navigator.of(context).pop();
},
),
title: Text(AppLocalizations.of(context)!.social),
title: Text(
AppLocalizations.of(context)!.social,
style: TextStyle(
color: Colors.white,
fontSize: 20,
),
),
backgroundColor:
isDarkMode ? Color.fromRGBO(58, 21, 31, 1) : Color(0xFFDC4654),
),
Expand Down
16 changes: 13 additions & 3 deletions lib/src/pages/home/leaderboard.dart
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,9 @@ class _LeaderBoardState extends ConsumerState<LeaderBoard> {
child: Material(
color: Colors.transparent,
child: ListView.builder(
itemCount: 3,
itemCount: (companyData!.length > 3)
? 3
: companyData.length,
itemBuilder: (context, index) {
return ListTile(
shape: RoundedRectangleBorder(
Expand All @@ -631,9 +633,17 @@ class _LeaderBoardState extends ConsumerState<LeaderBoard> {
topLeft: Radius.circular(0),
),
),
tileColor: Color(0xFFE0E0E0),
tileColor: index == 2
? Color(0xFFC9AE5D).withOpacity(0.42)
: index == 1
? Color(0xFFADD8E6)
.withOpacity(0.42)
: index == 0
? Color(0xFFFFD700)
.withOpacity(0.42)
: Colors.white,
leading: buildLogo(
companyData![index].logoLink,
companyData[index].logoLink,
),
title: Text(
companyData[index].companyName,
Expand Down
9 changes: 8 additions & 1 deletion lib/src/pages/issues/issue_detail.dart
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,19 @@ class IssueDetailPage extends StatelessWidget {
leading: IconButton(
icon: Icon(
Icons.arrow_back_ios_new_rounded,
color: Colors.white,
),
onPressed: () {
Navigator.of(context).pop();
},
),
title: Text("${AppLocalizations.of(context)!.issue} #${issue.id}"),
title: Text(
"${AppLocalizations.of(context)!.issue} #${issue.id}",
style: TextStyle(
color: Colors.white,
fontSize: 20,
),
),
actions: [
IssueLikeButton(
issue: issue,
Expand Down
14 changes: 7 additions & 7 deletions lib/src/pages/leaderboards/company_scoreboard.dart
Original file line number Diff line number Diff line change
Expand Up @@ -218,13 +218,13 @@ class CompanyScoreboardPageState extends ConsumerState<CompanyScoreboardPage>
topLeft: Radius.circular(0),
),
),
tileColor: (index == 0)
? Color.fromARGB(255, 248, 207, 85)
: (index == 1)
? Color.fromARGB(255, 191, 189, 189)
: (index == 2)
? Color.fromARGB(255, 224, 142, 112)
: Color(0xFFE0E0E0),
tileColor: index == 2
? Color(0xFFC9AE5D).withOpacity(0.42)
: index == 1
? Color(0xFFADD8E6).withOpacity(0.42)
: index == 0
? Color(0xFFFFD700).withOpacity(0.42)
: Colors.white,
leading: buildLogo(company.logoLink),
title: Text(
company.companyName,
Expand Down
Loading