Skip to content

Commit

Permalink
Merge branch 'master' into journeys_page
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianLa0616 committed Feb 12, 2024
2 parents 21c6d40 + b81a19e commit d81a0d5
Show file tree
Hide file tree
Showing 11 changed files with 146 additions and 34 deletions.
1 change: 0 additions & 1 deletion game/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ linter:
# producing the lint.
rules:
# avoid_print: false # Uncomment to disable the `avoid_print` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule

# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
Binary file added game/assets/fonts/Poppins-Medium.ttf
Binary file not shown.
Binary file added game/assets/fonts/Poppins-Regular.ttf
Binary file not shown.
2 changes: 2 additions & 0 deletions game/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ target 'Runner' do
use_modular_headers!
pod 'Firebase'

pod 'Firebase/Analytics'

flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
# target 'RunnerTests' do
# inherit! :search_paths
Expand Down
68 changes: 52 additions & 16 deletions game/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,42 @@ PODS:
- GoogleUtilities/Environment (~> 7.8)
- GoogleUtilities/UserDefaults (~> 7.8)
- PromisesObjC (~> 2.1)
- Firebase/Analytics (10.18.0):
- Firebase/Core
- Firebase/Core (10.18.0):
- Firebase/CoreOnly
- FirebaseAnalytics (~> 10.18.0)
- Firebase/CoreOnly (10.18.0):
- FirebaseCore (= 10.18.0)
- FirebaseAnalytics (10.18.0):
- FirebaseAnalytics/AdIdSupport (= 10.18.0)
- FirebaseCore (~> 10.0)
- FirebaseInstallations (~> 10.0)
- GoogleUtilities/AppDelegateSwizzler (~> 7.11)
- GoogleUtilities/MethodSwizzler (~> 7.11)
- GoogleUtilities/Network (~> 7.11)
- "GoogleUtilities/NSData+zlib (~> 7.11)"
- nanopb (< 2.30910.0, >= 2.30908.0)
- FirebaseAnalytics/AdIdSupport (10.18.0):
- FirebaseCore (~> 10.0)
- FirebaseInstallations (~> 10.0)
- GoogleAppMeasurement (= 10.18.0)
- GoogleUtilities/AppDelegateSwizzler (~> 7.11)
- GoogleUtilities/MethodSwizzler (~> 7.11)
- GoogleUtilities/Network (~> 7.11)
- "GoogleUtilities/NSData+zlib (~> 7.11)"
- nanopb (< 2.30910.0, >= 2.30908.0)
- FirebaseCore (10.18.0):
- FirebaseCoreInternal (~> 10.0)
- GoogleUtilities/Environment (~> 7.12)
- GoogleUtilities/Logger (~> 7.12)
- FirebaseCoreInternal (10.18.0):
- "GoogleUtilities/NSData+zlib (~> 7.8)"
- FirebaseInstallations (10.18.0):
- FirebaseCore (~> 10.0)
- GoogleUtilities/Environment (~> 7.8)
- GoogleUtilities/UserDefaults (~> 7.8)
- PromisesObjC (~> 2.1)
- Flutter (1.0.0)
- flutter_secure_storage (6.0.0):
- Flutter
Expand All @@ -59,21 +95,21 @@ PODS:
- google_sign_in_ios (0.0.1):
- Flutter
- GoogleSignIn (~> 6.2)
- GoogleAppMeasurement (10.17.0):
- GoogleAppMeasurement/AdIdSupport (= 10.17.0)
- GoogleAppMeasurement (10.18.0):
- GoogleAppMeasurement/AdIdSupport (= 10.18.0)
- GoogleUtilities/AppDelegateSwizzler (~> 7.11)
- GoogleUtilities/MethodSwizzler (~> 7.11)
- GoogleUtilities/Network (~> 7.11)
- "GoogleUtilities/NSData+zlib (~> 7.11)"
- nanopb (< 2.30910.0, >= 2.30908.0)
- GoogleAppMeasurement/AdIdSupport (10.17.0):
- GoogleAppMeasurement/WithoutAdIdSupport (= 10.17.0)
- GoogleAppMeasurement/AdIdSupport (10.18.0):
- GoogleAppMeasurement/WithoutAdIdSupport (= 10.18.0)
- GoogleUtilities/AppDelegateSwizzler (~> 7.11)
- GoogleUtilities/MethodSwizzler (~> 7.11)
- GoogleUtilities/Network (~> 7.11)
- "GoogleUtilities/NSData+zlib (~> 7.11)"
- nanopb (< 2.30910.0, >= 2.30908.0)
- GoogleAppMeasurement/WithoutAdIdSupport (10.17.0):
- GoogleAppMeasurement/WithoutAdIdSupport (10.18.0):
- GoogleUtilities/AppDelegateSwizzler (~> 7.11)
- GoogleUtilities/MethodSwizzler (~> 7.11)
- GoogleUtilities/Network (~> 7.11)
Expand Down Expand Up @@ -119,7 +155,7 @@ PODS:
- platform_device_id (0.0.1):
- Flutter
- PromisesObjC (2.3.1)
- sqflite (0.0.2):
- sqflite (0.0.3):
- Flutter
- FMDB (>= 2.7.5)
- Toast (4.0.0)
Expand All @@ -129,7 +165,7 @@ PODS:
DEPENDENCIES:
- device_info (from `.symlinks/plugins/device_info/ios`)
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
- Firebase
- Firebase/Analytics
- Flutter (from `Flutter`)
- flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`)
- fluttertoast (from `.symlinks/plugins/fluttertoast/ios`)
Expand Down Expand Up @@ -189,31 +225,31 @@ SPEC CHECKSUMS:
AppAuth: 3bb1d1cd9340bd09f5ed189fb00b1cc28e1e8570
device_info: d7d233b645a32c40dfdc212de5cf646ca482f175
device_info_plus: c6fb39579d0f423935b0c9ce7ee2f44b71b9fce6
Firebase: f4ac0b02927af9253ae094d23deecf0890da7374
FirebaseAnalytics: b9284f9fff10157a843e0422e908711f7bf3b9f2
FirebaseCore: 534544dd98cabcf4bf8598d88ec683b02319a528
FirebaseCoreInternal: 2cf9202e226e3f78d2bf6d56c472686b935bfb7f
FirebaseInstallations: 9387bf15abfc69a714f54e54f74a251264fdb79b
Firebase: 414ad272f8d02dfbf12662a9d43f4bba9bec2a06
FirebaseAnalytics: 4d310b35c48eaa4a058ddc04bdca6bdb5dc0fe80
FirebaseCore: 2322423314d92f946219c8791674d2f3345b598f
FirebaseCoreInternal: 8eb002e564b533bdcf1ba011f33f2b5c10e2ed4a
FirebaseInstallations: e842042ec6ac1fd2e37d7706363ebe7f662afea4
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
flutter_secure_storage: 23fc622d89d073675f2eaa109381aefbcf5a49be
fluttertoast: 31b00dabfa7fb7bacd9e7dbee580d7a2ff4bf265
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
geolocator_apple: cc556e6844d508c95df1e87e3ea6fa4e58c50401
google_sign_in_ios: 1256ff9d941db546373826966720b0c24804bcdd
GoogleAppMeasurement: 4dcddfc7f102825c1c4e6422cb35567b101881a7
GoogleAppMeasurement: 70ce9aa438cff1cfb31ea3e660bcc67734cb716e
GoogleSignIn: 5651ce3a61e56ca864160e79b484cd9ed3f49b7a
GoogleUtilities: 0759d1a57ebb953965c2dfe0ba4c82e95ccc2e34
GTMAppAuth: 0ff230db599948a9ad7470ca667337803b3fc4dd
GTMSessionFetcher: 3a63d75eecd6aa32c2fc79f578064e1214dfdec2
nanopb: d4d75c12cd1316f4a64e3c6963f879ecd4b5e0d5
path_provider_foundation: c68054786f1b4f3343858c1e1d0caaded73f0be9
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
permission_handler_apple: e76247795d700c14ea09e3a2d8855d41ee80a2e6
platform_device_id: 81b3e2993881f87d0c82ef151dc274df4869aef5
PromisesObjC: c50d2056b5253dadbd6c2bea79b0674bd5a52fa4
sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904
sqflite: 31f7eba61e3074736dff8807a9b41581e4f7f15a
Toast: 91b396c56ee72a5790816f40d3a94dd357abc196
url_launcher_ios: 08a3dfac5fb39e8759aeb0abbd5d9480f30fc8b4

PODFILE CHECKSUM: 4de1d60b2372e041287244d21cde7033f1d1d43c
PODFILE CHECKSUM: 2cc3a9746d44df840e78b57de485ce133b368454

COCOAPODS: 1.14.2
20 changes: 20 additions & 0 deletions game/lib/color_palette.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import 'package:flutter/material.dart';

class ColorPalette {
static const MaterialColor BigRed = const MaterialColor(
0xffed5656, // 0% comes in here, this will be color picked if no shade is selected when defining a Color property which doesn’t require a swatch.
const <int, Color>{
//temporarily have the same color for all gradients
50: const Color(0xffed5656), //10%
100: const Color(0xffed5656), //20%
200: const Color(0xffed5656), //30%
300: const Color(0xffed5656), //40%
400: const Color(0xffed5656), //50%
500: const Color(0xffed5656), //60%
600: const Color(0xffed5656), //70%
700: const Color(0xffed5656), //80%
800: const Color(0xffed5656), //90%
900: const Color(0xffed5656), //100%
},
);
} // you can define define int 500 as the default shade and add your lighter tints above and darker tints below.
2 changes: 1 addition & 1 deletion game/lib/details_page/details_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
import 'package:game/home_page/home_page_widget.dart';
import 'package:game/journeys/journeys_page.dart';
import 'package:game/main.dart';
import 'package:game/navbar.dart';
import 'package:game/navigation_page/bottom_navbar.dart';
import 'package:google_sign_in/google_sign_in.dart';
import 'package:game/utils/utility_functions.dart';

Expand Down
6 changes: 4 additions & 2 deletions game/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ import 'package:game/model/user_model.dart';
import 'package:game/splash_page/splash_page.dart';
import 'package:game/widget/game_widget.dart';
import 'package:provider/provider.dart';
import 'navbar.dart';
import 'package:game/navigation_page/bottom_navbar.dart';
import 'package:game/color_palette.dart';

import 'dart:io' show Platform;

Expand Down Expand Up @@ -78,7 +79,8 @@ class MyApp extends StatelessWidget {
GlobalCupertinoLocalizations.delegate,
],
supportedLocales: const [Locale('en', '')],
theme: ThemeData(primarySwatch: Colors.blue),
theme: ThemeData(
fontFamily: 'Poppins', primarySwatch: ColorPalette.BigRed),
home: SplashPageWidget(),
)));
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import 'package:flutter/material.dart';
import 'package:game/gameplay/gameplay_page.dart';
import 'package:game/global_leaderboard/global_leaderboard_widget.dart';
import 'package:game/journeys/journeys_page.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'home_navbar.dart';

class BottomNavBar extends StatefulWidget {
const BottomNavBar({Key? key}) : super(key: key);
Expand All @@ -16,7 +15,7 @@ class _BottomNavBarState extends State<BottomNavBar> {
static const TextStyle optionStyle =
TextStyle(fontSize: 30, fontWeight: FontWeight.bold);
static const List<Widget> _widgetOptions = <Widget>[
JourneysPage(),
HomeNavBar(),
GlobalLeaderboardWidget(),
Text(
'Profile',
Expand Down
59 changes: 59 additions & 0 deletions game/lib/navigation_page/home_navbar.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import 'package:flutter/src/widgets/framework.dart';
import 'package:flutter/src/widgets/placeholder.dart';
import 'package:flutter/material.dart';
import 'package:game/gameplay/gameplay_page.dart';
import 'package:game/journeys/journeys_page.dart';
import 'package:google_fonts/google_fonts.dart';

class HomeNavBar extends StatefulWidget {
const HomeNavBar({super.key});

@override
State<HomeNavBar> createState() => _HomeNavbarState();
}

/// AnimationControllers can be created with `vsync: this` because of TickerProviderStateMixin.
class _HomeNavbarState extends State<HomeNavBar> with TickerProviderStateMixin {
late TabController _tabController;

@override
void initState() {
super.initState();
_tabController = TabController(length: 2, vsync: this);
}

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: new PreferredSize(
preferredSize: const Size.fromHeight(50.0),
child: AppBar(
backgroundColor: Color(0xFFED5656),
titleTextStyle: TextStyle(fontSize: 25, fontWeight: FontWeight.w500),
bottom: TabBar(
dividerColor: Color.fromARGB(255, 0, 0, 0),
indicatorColor: Color(0xFFFFFFFF),
controller: _tabController,
tabs: const <Widget>[
Tab(text: 'Challenges'),
Tab(
text: 'Journeys',
),
],
),
),
),
body: TabBarView(
controller: _tabController,
children: const <Widget>[
Center(
child: GameplayPage(),
),
Center(
child: JourneysPage(),
),
],
),
);
}
}
17 changes: 6 additions & 11 deletions game/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,12 @@ flutter:
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
# fonts:
# - family: Schyler
# fonts:
# - asset: fonts/Schyler-Regular.ttf
# - asset: fonts/Schyler-Italic.ttf
# style: italic
# - family: Trajan Pro
# fonts:
# - asset: fonts/TrajanPro.ttf
# - asset: fonts/TrajanPro_Bold.ttf
# weight: 700
fonts:
- family: Poppins
fonts:
- asset: assets/fonts/Poppins-Regular.ttf
- asset: assets/fonts/Poppins-Medium.ttf
weight: 500
#
# For details regarding fonts from package dependencies,
# see https://flutter.dev/custom-fonts/#from-packages

0 comments on commit d81a0d5

Please sign in to comment.