Skip to content

Commit

Permalink
Header updates to pages
Browse files Browse the repository at this point in the history
  • Loading branch information
3TTemi committed May 1, 2024
1 parent 0ce92a1 commit 6433153
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 31 deletions.
29 changes: 27 additions & 2 deletions game/lib/achievements/achievements_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,15 @@ class _AchievementsPageState extends State<AchievementsPage> {
List<String> selectedCategories = [];
List<String> selectedLocations = [];
String selectedDifficulty = '';

@override
Widget build(BuildContext context) {
var headerStyle = TextStyle(
color: Color(0xFFFFF8F1),
fontSize: 20,
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
);

return Container(
decoration: BoxDecoration(
color: Color(0xFFED5656),
Expand All @@ -60,7 +66,26 @@ class _AchievementsPageState extends State<AchievementsPage> {
bottom: false,
child: Scaffold(
appBar: AppBar(
title: const Text('Achievements'),
backgroundColor: Color.fromARGB(255, 237, 86, 86),
toolbarHeight: MediaQuery.of(context).size.height * 0.1,
leading: Align(
alignment: Alignment.center,
child: IconButton(
icon: Icon(Icons.navigate_before),
color: Colors.white,
onPressed: () => Navigator.pop(context),
),
),
title: Padding(
padding: EdgeInsets.only(
top: MediaQuery.of(context).size.height * 0.01),
child: Text(
'Achievements',
style: headerStyle,
),
),
centerTitle: true, // Still useful for horizontal centering
actions: [],
),
body: Container(
width: double.infinity,
Expand Down
5 changes: 3 additions & 2 deletions game/lib/global_leaderboard/global_leaderboard_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,13 @@ class _GlobalLeaderboardWidgetState extends State<GlobalLeaderboardWidget> {
key: scaffoldKey,
backgroundColor: Color.fromARGB(255, 255, 248, 241),
appBar: AppBar(
toolbarHeight: 85,
toolbarHeight: MediaQuery.sizeOf(context).height * 0.1,
automaticallyImplyLeading: false,
backgroundColor: Color.fromARGB(255, 237, 86, 86),
flexibleSpace: FlexibleSpaceBar(
title: Padding(
padding: const EdgeInsets.only(bottom: 8),
padding: EdgeInsets.only(
bottom: MediaQuery.sizeOf(context).height * 0.01),
child: Text(
'Leaderboard',
style: leaderboardStyle,
Expand Down
36 changes: 22 additions & 14 deletions game/lib/profile/completed_feed.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,35 @@ import 'package:tuple/tuple.dart';
class CompletedFeedWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
var headerStyle = TextStyle(
color: Color(0xFFFFF8F1),
fontSize: 20,
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
);

return Scaffold(
backgroundColor: Color.fromARGB(255, 255, 248, 241),
appBar: AppBar(
backgroundColor: Color.fromARGB(255, 237, 86, 86),
leading: IconButton(
icon: const Icon(Icons.navigate_before),
color: Colors.white,
onPressed: () {
Navigator.pop(
context,
);
},
),
title: const Text(
'Completed',
style: TextStyle(
toolbarHeight: MediaQuery.of(context).size.height * 0.1,
leading: Align(
alignment: Alignment.center,
child: IconButton(
icon: Icon(Icons.navigate_before),
color: Colors.white,
fontFamily: 'Poppins',
fontWeight: FontWeight.bold,
onPressed: () => Navigator.pop(context),
),
),
title: Padding(
padding:
EdgeInsets.only(top: MediaQuery.of(context).size.height * 0.01),
child: Text(
'Completed',
style: headerStyle,
),
),
centerTitle: true, // Still useful for horizontal centering
actions: [],
),
body: Consumer4<UserModel, EventModel, TrackerModel, ChallengeModel>(
Expand Down
36 changes: 23 additions & 13 deletions game/lib/profile/settings_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,35 @@ class SettingsPage extends StatelessWidget {

@override
Widget build(BuildContext context) {
var headerStyle = TextStyle(
color: Color(0xFFFFF8F1),
fontSize: 20,
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
);

return Scaffold(
backgroundColor: Color.fromARGB(255, 255, 248, 241),
appBar: AppBar(
backgroundColor: Color.fromARGB(255, 237, 86, 86),
// Set widget before appBar title
leading: IconButton(
icon: const Icon(Icons.navigate_before),
color: Colors.white,
onPressed: () {
Navigator.pop(context);
},
toolbarHeight: MediaQuery.of(context).size.height * 0.1,
leading: Align(
alignment: Alignment.center,
child: IconButton(
icon: Icon(Icons.navigate_before),
color: Colors.white,
onPressed: () => Navigator.pop(context),
),
),
title: const Text(
'Settings',
style: TextStyle(
color: Colors.white,
fontFamily: 'Poppins',
fontWeight: FontWeight.bold),
title: Padding(
padding:
EdgeInsets.only(top: MediaQuery.of(context).size.height * 0.01),
child: Text(
'Settings',
style: headerStyle,
),
),
centerTitle: true, // Still useful for horizontal centering
actions: [],
),
body: Center(child: LayoutBuilder(
Expand Down

0 comments on commit 6433153

Please sign in to comment.