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

Commit

Permalink
New Mission Draft
Browse files Browse the repository at this point in the history
  • Loading branch information
leomotors committed Nov 5, 2021
1 parent 9b14754 commit b7f8da6
Show file tree
Hide file tree
Showing 4 changed files with 117 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lib/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,6 @@
"less_than_avg": "less than average",
"current_missions": "Current Missions",
"craving_missions": "Craving missions?",
"hard_missions_desc": "Attempt hard missions to get more awesome prices!"
"hard_missions_desc": "Attempt hard missions to get more awesome prices!",
"eat_less": "Eat less..."
}
3 changes: 2 additions & 1 deletion lib/l10n/app_th.arb
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,6 @@
"hard": "ยาก",
"current_missions": "ภารกิจที่กำลังทำอยู่",
"craving_missions": "กำลังมองหาภารกิจ?",
"hard_missions_desc": "ลองทำภารกิจที่ยากๆ เพื่อให้ได้ราคาที่คุ้มค่า!"
"hard_missions_desc": "ลองทำภารกิจที่ยากๆ เพื่อให้ได้ราคาที่คุ้มค่า!",
"eat_less": "กินสิ่งนี้ให้น้อยลง"
}
112 changes: 112 additions & 0 deletions lib/views/mission/new_mission.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ class _NewMissionPageState extends State<NewMissionPage> {
pageLabel = widget.missionType == MissionType.food ? "Food" : "Carbon";
}

int selected = 0;

@override
Widget build(BuildContext context) {
final text = AppLocalizations.of(context)!;
Expand All @@ -42,6 +44,116 @@ class _NewMissionPageState extends State<NewMissionPage> {
body: Stack(
children: [
bgImage("clouds/top_orange.png"),
Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Padding(
padding: const EdgeInsets.all(16.0),
child: Container(
decoration: BoxDecoration(
color: lightOrange,
borderRadius: BorderRadius.circular(12.0),
),
child: Column(
children: [
Text(text.eat_less),
Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(6.0),
),
child: Column(
children: [
Padding(
padding:
const EdgeInsets.symmetric(vertical: 8.0),
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceEvenly,
children: [
ElevatedButton(
onPressed: () {
setState(() {
selected = 0;
});
},
child: Image.asset(
"assets/images/foods/starch.png",
height: 60,
),
style: ElevatedButton.styleFrom(
primary: selected == 0
? lightGreen
: lightOrange,
),
),
ElevatedButton(
onPressed: () {
setState(() {
selected = 1;
});
},
child: Image.asset(
"assets/images/foods/meat.png",
height: 60,
),
style: ElevatedButton.styleFrom(
primary: selected == 1
? lightGreen
: lightOrange,
),
),
ElevatedButton(
onPressed: () {
setState(() {
selected = 2;
});
},
child: Image.asset(
"assets/images/foods/dessert.png",
height: 60,
),
style: ElevatedButton.styleFrom(
primary: selected == 2
? lightGreen
: lightOrange,
),
),
],
),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
decoration: BoxDecoration(
color: lightOrange,
borderRadius: BorderRadius.circular(6.0),
),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Row(
mainAxisAlignment:
MainAxisAlignment.center,
children: const [
Text("within"),
Text("days"),
],
),
),
),
),
],
),
),
),
],
),
),
),
],
),
],
),
);
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.230+2300000
version: 1.0.232+2320000

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

0 comments on commit b7f8da6

Please sign in to comment.