Skip to content
This repository has been archived by the owner on Apr 21, 2022. It is now read-only.

Commit

Permalink
1.0.116
Browse files Browse the repository at this point in the history
  • Loading branch information
leomotors committed Oct 30, 2021
1 parent f7f6267 commit 283927e
Show file tree
Hide file tree
Showing 8 changed files with 132 additions and 14 deletions.
3 changes: 2 additions & 1 deletion lib/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,6 @@
"less_calories": "less calories you consumed",
"more_carbon": "more carbon footprint than others",
"more_methane": "more methane produced by using vehicle",
"more_calories": "more calories you consumed"
"more_calories": "more calories you consumed",
"less_than_avg": "less than average"
}
3 changes: 2 additions & 1 deletion lib/l10n/app_th.arb
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,6 @@
"less_calories": "บริโภคแคลเลอรี่น้อยลง",
"more_carbon": "คาร์บอนฟุตปรินท์มากกว่าคนอื่น",
"more_methane": "เกิดมีเทนจากการใช้ยานพาหนะมากขึ้น",
"more_calories": "บริโภคแคลเลอรี่มากขึ้น"
"more_calories": "บริโภคแคลเลอรี่มากขึ้น",
"less_than_avg": "น้อยกว่าค่าเฉลี่ย"
}
3 changes: 3 additions & 0 deletions lib/styles/styles.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,6 @@ const green = Color(0xFF5DC7AB);
const tan = Color(0xFFF4E4D8);
const brown = Color(0xFF533F2C);
const rose = Color(0xFFF1D0C5);

const discordPfp =
"https://external-preview.redd.it/4PE-nlL_PdMD5PrFNLnjurHQ1QKPnCvg368LTDnfM-M.png?auto=webp&s=ff4c3fbc1cce1a1856cff36b5d2a40a6d02cc1c3";
14 changes: 10 additions & 4 deletions lib/views/home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import "package:flutter/material.dart";
import "package:food_busters/components/background.dart";
import "package:food_busters/main.dart";
import "package:food_busters/styles/styles.dart";
import "package:food_busters/views/mission/mission.dart";
import "package:food_busters/views/points/points.dart";
import "package:food_busters/views/record/record.dart";
import "package:food_busters/views/scan/scanportal.dart";
Expand Down Expand Up @@ -115,9 +116,7 @@ class _HomePageState extends State<HomePage> {
shape: BoxShape.circle,
image: DecorationImage(
fit: BoxFit.fill,
image: NetworkImage(
"https://external-preview.redd.it/4PE-nlL_PdMD5PrFNLnjurHQ1QKPnCvg368LTDnfM-M.png?auto=webp&s=ff4c3fbc1cce1a1856cff36b5d2a40a6d02cc1c3",
),
image: NetworkImage(discordPfp),
),
),
),
Expand Down Expand Up @@ -161,7 +160,14 @@ class _HomePageState extends State<HomePage> {
content: text.my_record,
),
smallBtn(
onPressed: () {},
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => const MyMissionPage(),
),
);
},
content: text.mission,
)
],
Expand Down
27 changes: 27 additions & 0 deletions lib/views/mission/mission.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import "package:flutter/material.dart";
import "package:flutter_gen/gen_l10n/app_localizations.dart";
import "package:food_busters/styles/styles.dart";

class MyMissionPage extends StatefulWidget {
const MyMissionPage({Key? key}) : super(key: key);

@override
_MyMissionPageState createState() => _MyMissionPageState();
}

class _MyMissionPageState extends State<MyMissionPage> {
@override
Widget build(BuildContext context) {
final text = AppLocalizations.of(context)!;

return Scaffold(
backgroundColor: tan,
extendBodyBehindAppBar: true,
appBar: AppBar(
title: Text(text.mission),
backgroundColor: Colors.transparent,
elevation: 0,
),
);
}
}
89 changes: 83 additions & 6 deletions lib/views/record/leaderboard.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import "package:flutter/material.dart";
import "package:flutter_gen/gen_l10n/app_localizations.dart";
import "package:food_busters/components/background.dart";
import "package:food_busters/data/dummy_busters.dart";
import 'package:food_busters/models/buster.dart';
import "package:food_busters/models/buster.dart";
import "package:food_busters/styles/styles.dart";

class LeaderboardPage extends StatefulWidget {
Expand Down Expand Up @@ -32,17 +32,79 @@ class _LeaderboardPageState extends State<LeaderboardPage> {
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Padding(
padding: const EdgeInsets.symmetric(
vertical: 8.0,
horizontal: 28,
),
child: Container(
decoration: BoxDecoration(
color: lightGreen,
borderRadius: BorderRadius.circular(16.0),
),
child: Padding(
padding: const EdgeInsets.all(24.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
height: 100,
width: 100,
decoration: const BoxDecoration(
shape: BoxShape.circle,
image: DecorationImage(
fit: BoxFit.fill,
image: NetworkImage(discordPfp),
),
),
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: const [
Text(
"78",
style: TextStyle(
fontSize: 36,
fontWeight: FontWeight.w500,
),
),
Text("th"),
],
),
Text("30% ${text.less_than_avg}"),
],
),
),
),
),
Padding(
padding: const EdgeInsets.all(16.0),
child: Container(
height: 240,
height: 320,
decoration: BoxDecoration(
color: Colors.white,
color: lightGreen,
borderRadius: BorderRadius.circular(16.0),
),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: topBusters(text),
padding: const EdgeInsets.symmetric(
vertical: 8.0,
horizontal: 4.0,
),
child: Column(
children: [
const Text(
"TOP 3 BUSTERS",
style: TextStyle(
fontWeight: FontWeight.w500,
fontSize: 24,
),
),
SizedBox(
height: 240,
child: topBusters(text),
),
],
),
),
),
),
Expand All @@ -66,7 +128,10 @@ class _LeaderboardPageState extends State<LeaderboardPage> {
itemBuilder: (context, index) {
final buster = data[index];
return ListTile(
title: Text(buster.username),
title: Text(
buster.username,
style: const TextStyle(fontSize: 14),
),
leading: Container(
height: 50,
width: 50,
Expand All @@ -80,6 +145,18 @@ class _LeaderboardPageState extends State<LeaderboardPage> {
),
),
),
trailing: Column(
children: [
Text(
"${buster.percentileRank}%",
style: const TextStyle(fontSize: 14),
),
Text(
text.less_than_avg,
style: const TextStyle(fontSize: 8),
),
],
),
);
},
);
Expand Down
5 changes: 4 additions & 1 deletion lib/views/record/record.dart
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,10 @@ class _MyRecordPageState extends State<MyRecordPage> {
backgroundColor: rose,
actions: [
TextButton(
child: Text(text.what_is_premium),
child: Text(
text.what_is_premium,
style: const TextStyle(color: green),
),
onPressed: () {},
),
TextButton(
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.0.112
version: 1.0.116

environment:
sdk: ">=2.12.0 <3.0.0"
Expand Down

0 comments on commit 283927e

Please sign in to comment.