Skip to content

Commit

Permalink
leaderboard, app-bar error resolved (OWASP-BLT#419)
Browse files Browse the repository at this point in the history
  • Loading branch information
Uttkarsh-raj authored Jul 11, 2024
1 parent 5173ef5 commit 80dada1
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 14 deletions.
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

0 comments on commit 80dada1

Please sign in to comment.