-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from BU-Spark/leaderboard
Leaderboard
- Loading branch information
Showing
30 changed files
with
7,015 additions
and
6,403 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
/Users/marcolam/.pub-cache/hosted/pub.dev/cloud_firestore-4.15.6/ | ||
/Users/saisriram/.pub-cache/hosted/pub.dev/cloud_firestore-4.15.6/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
/Users/marcolam/.pub-cache/hosted/pub.dev/firebase_auth-4.17.5/ | ||
/Users/saisriram/.pub-cache/hosted/pub.dev/firebase_auth-4.17.5/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
/Users/marcolam/.pub-cache/hosted/pub.dev/firebase_core-2.27.1/ | ||
/Users/saisriram/.pub-cache/hosted/pub.dev/firebase_core-2.27.1/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
/Users/marcolam/.pub-cache/hosted/pub.dev/firebase_storage-11.6.10/ | ||
/Users/saisriram/.pub-cache/hosted/pub.dev/firebase_storage-11.6.10/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
/Users/marcolam/.pub-cache/hosted/pub.dev/geolocator_apple-2.3.7/ | ||
/Users/saisriram/.pub-cache/hosted/pub.dev/geolocator_apple-2.3.7/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
/Users/marcolam/.pub-cache/hosted/pub.dev/google_maps_flutter_ios-2.5.2/ | ||
/Users/saisriram/.pub-cache/hosted/pub.dev/google_maps_flutter_ios-2.5.2/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
/Users/marcolam/.pub-cache/hosted/pub.dev/image_picker_ios-0.8.9+2/ | ||
/Users/saisriram/.pub-cache/hosted/pub.dev/image_picker_ios-0.8.9+2/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
/Users/marcolam/.pub-cache/hosted/pub.dev/permission_handler_apple-9.4.4/ | ||
/Users/saisriram/.pub-cache/hosted/pub.dev/permission_handler_apple-9.4.4/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
/Users/marcolam/.pub-cache/hosted/pub.dev/url_launcher_ios-6.2.5/ | ||
/Users/saisriram/.pub-cache/hosted/pub.dev/url_launcher_ios-6.2.5/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
#!/bin/sh | ||
# This is a generated file; do not edit or check into version control. | ||
export "FLUTTER_ROOT=/Users/marcolam/flutter" | ||
export "FLUTTER_APPLICATION_PATH=/Users/marcolam/se-bu-passport-arts/bu_passport" | ||
export "FLUTTER_ROOT=/Users/saisriram/development/flutter" | ||
export "FLUTTER_APPLICATION_PATH=/Users/saisriram/Desktop/BUPassport/se-bu-passport-arts/bu_passport" | ||
export "COCOAPODS_PARALLEL_CODE_SIGN=true" | ||
export "FLUTTER_TARGET=/Users/marcolam/se-bu-passport-arts/bu_passport/lib/main.dart" | ||
export "FLUTTER_TARGET=/Users/saisriram/Desktop/BUPassport/se-bu-passport-arts/bu_passport/lib/main.dart" | ||
export "FLUTTER_BUILD_DIR=build" | ||
export "FLUTTER_BUILD_NAME=1.0.0" | ||
export "FLUTTER_BUILD_NUMBER=1" | ||
export "DART_DEFINES=RkxVVFRFUl9XRUJfQVVUT19ERVRFQ1Q9dHJ1ZQ==,RkxVVFRFUl9XRUJfQ0FOVkFTS0lUX1VSTD1odHRwczovL3d3dy5nc3RhdGljLmNvbS9mbHV0dGVyLWNhbnZhc2tpdC8wNDgxN2M5OWM5ZmQ0OTU2ZjI3NTA1MjA0ZjdlMzQ0MzM1ODEwYWVkLw==" | ||
export "DART_OBFUSCATION=false" | ||
export "TRACK_WIDGET_CREATION=true" | ||
export "TREE_SHAKE_ICONS=false" | ||
export "PACKAGE_CONFIG=/Users/marcolam/se-bu-passport-arts/bu_passport/.dart_tool/package_config.json" | ||
export "PACKAGE_CONFIG=/Users/saisriram/Desktop/BUPassport/se-bu-passport-arts/bu_passport/.dart_tool/package_config.json" |
12,892 changes: 6,527 additions & 6,365 deletions
12,892
bu_passport/ios/Pods/Pods.xcodeproj/project.pbxproj
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,25 @@ | ||
class Users { | ||
final String firstName; | ||
final String lastName; | ||
final String profileImageUrl; | ||
final String userBUID; | ||
final String userEmail; | ||
final String userSchool; | ||
final String userUID; | ||
final int userYear; | ||
final int userPoints; | ||
final List<String> userPreferences; | ||
final String userProfileURL; | ||
final Map<String, dynamic> userSavedEvents; | ||
|
||
Users({ | ||
required this.firstName, | ||
required this.lastName, | ||
required this.profileImageUrl, | ||
required this.userBUID, | ||
required this.userEmail, | ||
required this.userSchool, | ||
required this.userUID, | ||
required this.userYear, | ||
required this.userPreferences, | ||
required this.userSavedEvents, | ||
required this.userPoints, | ||
required this.userProfileURL, | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
import 'package:bu_passport/classes/user.dart'; | ||
import 'package:flutter/material.dart'; | ||
|
||
class UserRankWidget extends StatelessWidget { | ||
final int rank; | ||
final Users user; | ||
|
||
const UserRankWidget({Key? key, required this.rank, required this.user}) | ||
: super(key: key); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
double screenWidth = MediaQuery.of(context).size.width; | ||
double screenHeight = MediaQuery.of(context).size.height; | ||
|
||
double sizedBoxHeight = screenHeight * 0.05; | ||
double sizedBoxWidth = screenWidth * 0.02; | ||
|
||
double edgeInsets = (MediaQuery.of(context).size.width * 0.02); | ||
|
||
double imageHeight = screenHeight * 0.05; | ||
double imageWidth = screenWidth * 0.05; | ||
|
||
return Container( | ||
padding: EdgeInsets.all(edgeInsets), | ||
decoration: BoxDecoration( | ||
borderRadius: BorderRadius.circular(10.0), // Set border radius | ||
color: Color.fromARGB(204, 235, 242, 250), // Set background color | ||
), | ||
child: Row( | ||
children: [ | ||
Text( | ||
"$rank", | ||
style: TextStyle( | ||
fontSize: 22.0, | ||
fontWeight: rank <= 3 ? FontWeight.bold : FontWeight.normal, | ||
color: rank <= 3 ? const Color(0xFFCC0000) : Colors.black, | ||
), | ||
), | ||
SizedBox(width: 16), // Adjust spacing between rank and avatar | ||
CircleAvatar( | ||
backgroundImage: NetworkImage(user.userProfileURL), | ||
radius: 30.0, | ||
), | ||
SizedBox(width: 16), // Adjust spacing between avatar and name | ||
Text( | ||
"${user.firstName} ${user.lastName}", | ||
style: TextStyle( | ||
fontSize: 18.0, | ||
fontWeight: rank <= 3 ? FontWeight.bold : FontWeight.normal, | ||
color: rank <= 3 ? const Color(0xFFCC0000) : Colors.black, | ||
), | ||
), | ||
Spacer(), // This pushes the next widget to the right | ||
Image( | ||
image: AssetImage('assets/images/leaderboard/ticket.png'), | ||
width: imageWidth, | ||
height: imageHeight, | ||
), | ||
SizedBox( | ||
width: | ||
sizedBoxWidth), // Adjust spacing between ticket image and text | ||
Text( | ||
// if only 1 ticket, display "1 Ticket" else display "x Tickets" | ||
"${user.userPoints ~/ 100} ${user.userPoints ~/ 100 == 1 ? 'Ticket' : 'Tickets'}", | ||
style: TextStyle( | ||
fontSize: 14.0, | ||
color: const Color(0xFFCC0000), | ||
), | ||
), | ||
], | ||
), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.