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

Commit

Permalink
1.0.301
Browse files Browse the repository at this point in the history
  • Loading branch information
leomotors committed Nov 6, 2021
1 parent 53436a2 commit e7bcbd3
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 13 deletions.
Binary file added assets/images/motorcycle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/neon_leaf.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions lib/components/green_leaves.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ List<Widget> bigGreenLeaves(int count) {
return widgets;
}

List<Widget> bigNeonLeaves(int count) {
List<Widget> widgets = [];
for (int i = 0; i < count; i++) {
widgets.add(bigNeonLeaf);
}
return widgets;
}

final leaf = Container(
height: 30,
width: 30,
Expand All @@ -39,3 +47,15 @@ final bigLeaf = Container(
),
),
);

final bigNeonLeaf = Container(
height: 60,
width: 60,
decoration: const BoxDecoration(
shape: BoxShape.rectangle,
image: DecorationImage(
fit: BoxFit.cover,
image: AssetImage("assets/images/neon_leaf.png"),
),
),
);
13 changes: 2 additions & 11 deletions lib/views/record/leaderboard.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import "package:flutter/material.dart";
import "package:flutter_gen/gen_l10n/app_localizations.dart";
import "package:flutter_toggle_tab/flutter_toggle_tab.dart";
import "package:food_busters/components/background.dart";
import 'package:food_busters/components/green_leaves.dart';
import "package:food_busters/data/dummy_busters.dart";
import "package:food_busters/models/buster.dart";
import "package:food_busters/styles/styles.dart";
Expand Down Expand Up @@ -64,18 +65,8 @@ class _LeaderboardPageState extends State<LeaderboardPage> {
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: const [
Text(
"78",
style: TextStyle(
fontSize: 36,
fontWeight: FontWeight.w500,
),
),
Text("th"),
],
children: bigNeonLeaves(4),
),
Text("30% ${text.less_than_avg}"),
],
),
),
Expand Down
16 changes: 15 additions & 1 deletion lib/views/scan/scanafter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,11 @@ class _ScanAfterPageState extends State<ScanAfterPage> {
if (snapshot.connectionState == ConnectionState.done) {
final quote = snapshot.data ?? "Internal Flutter Error";
return DefaultTabController(
length: 3,
length: 4,
child: TabBarView(
children: [
tabPageWrapper(infoPage1, context, text, quote),
tabPageWrapper(infoPage1_5, context, text, quote),
tabPageWrapper(infoPage2, context, text, quote),
tabPageWrapper(infoPage3, context, text, quote),
],
Expand Down Expand Up @@ -150,6 +151,19 @@ class _ScanAfterPageState extends State<ScanAfterPage> {
],
);

Widget infoPage1_5(AppLocalizations text, String quote) => Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.asset("assets/images/motorcycle.png", width: 200, height: 200),
Text(
"อาหารจานนี้ผลิต PM 2.5 เท่ากับการดมท่อเด็กแว๊น "
"${((100 - percent) * 0.3).floor()} วินาที",
style: const TextStyle(fontSize: 24, color: green),
textAlign: TextAlign.center,
),
],
);

Widget infoPage2(AppLocalizations text, String quote) => Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
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.300+3000000
version: 1.0.301+3010000

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

0 comments on commit e7bcbd3

Please sign in to comment.