Skip to content

Commit

Permalink
Merge pull request #249 from spe-uob/248-new-feature-changes-based-on…
Browse files Browse the repository at this point in the history
…-clients-feedback

changes based on feedback
  • Loading branch information
1Haixin authored May 9, 2023
2 parents bac5ade + 20f8d61 commit 2e4e28f
Show file tree
Hide file tree
Showing 24 changed files with 226 additions and 154 deletions.
Binary file modified RewardProcessing/assets/images/gi1.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 modified RewardProcessing/assets/images/gi2.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 modified RewardProcessing/assets/images/gi3.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 modified RewardProcessing/assets/images/gi4.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 modified RewardProcessing/assets/images/gi5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
90 changes: 36 additions & 54 deletions RewardProcessing/lib/game/game_instructions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,77 +11,59 @@ class GameInstructions extends StatefulWidget {
}

class _GameInstructionsState extends State<GameInstructions> {
bool _showText = true;

@override
void initState() {
super.initState();
SystemChrome.setPreferredOrientations([
DeviceOrientation.landscapeRight,
DeviceOrientation.landscapeLeft,
]);
Future.delayed(const Duration(seconds: 2), () {
setState(() {
_showText = false;
});
});
}

@override
Widget build(BuildContext context) {
return WillPopScope(
onWillPop: () async {
onWillPop: ()async {
return false; // disable back page
},
child: Scaffold(
backgroundColor: const Color(0xff000000),
body: Stack(
children: [
GestureDetector(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => GameInstructions2(id: widget.id)),
);
},
child: Center(
child: Column(
backgroundColor: const Color(0xFFFFFFFF),
body: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.asset(
'assets/images/gi1.png',
scale: 2.9,
),
],
),
),
),
if (_showText)
Positioned(
bottom: 20,
left: 0,
right: 0,
child: AnimatedContainer(
duration: const Duration(milliseconds: 200),
curve: Curves.easeInOut,
height: 50,
decoration: BoxDecoration(
color: Colors.white.withOpacity(0.4),
),
child: const Center(
child:Text(
'Click anywhere to continue',
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 23,
fontWeight: FontWeight.bold,
),
children: <Widget>[
Image.asset('assets/images/gi1.png',
scale: 3,
),
),
),
),
],
),
ElevatedButton(
onPressed: () {
Navigator.push(
context,
// MaterialPageRoute(builder: (context) => const Questionnaire())
MaterialPageRoute(builder: (context) => GameInstructions2(id: widget.id))
);
},
style: ElevatedButton.styleFrom(
fixedSize: const Size(100, 20),
backgroundColor: const Color(0xFF00A8AF),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(100)),
elevation: 2.0,),
child: const Text(
'Continue',
textAlign: TextAlign.center,
style: TextStyle(color: Colors.white,
fontSize: 15,
fontWeight: FontWeight.w300
)
)
)
]
)
],
)
)
);
}
Expand Down
64 changes: 43 additions & 21 deletions RewardProcessing/lib/game/game_instructions2.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,49 @@ class _GameInstructions2State extends State<GameInstructions2> {

@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: const Color(0xff000000),
body: GestureDetector(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => GameInstructions3(id: widget.id)),
);
return WillPopScope(
onWillPop: ()async {
return false; // disable back page
},
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.asset(
'assets/images/gi2.png',
scale: 2.9,
),
],
),
),
),
child: Scaffold(
backgroundColor: const Color(0xFFFFFFFF),
body: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Image.asset('assets/images/gi2.png',
scale: 3,
),
ElevatedButton(
onPressed: () {
Navigator.push(
context,
// MaterialPageRoute(builder: (context) => const Questionnaire())
MaterialPageRoute(builder: (context) => GameInstructions3(id: widget.id))
);
},
style: ElevatedButton.styleFrom(
fixedSize: const Size(100, 20),
backgroundColor: const Color(0xFF00A8AF),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(100)),
elevation: 2.0,),
child: const Text(
'Continue',
textAlign: TextAlign.center,
style: TextStyle(color: Colors.white,
fontSize: 15,
fontWeight: FontWeight.w300
)
)
)
]
)
],
)
)
);
}
}
}
64 changes: 43 additions & 21 deletions RewardProcessing/lib/game/game_instructions3.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,49 @@ class _GameInstructions3State extends State<GameInstructions3> {

@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: const Color(0xff000000),
body: GestureDetector(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => GameInstructions4(id: widget.id)),
);
return WillPopScope(
onWillPop: ()async {
return false; // disable back page
},
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.asset(
'assets/images/gi3.png',
scale: 2.9,
),
],
),
),
),
child: Scaffold(
backgroundColor: const Color(0xFFFFFFFF),
body: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Image.asset('assets/images/gi3.png',
scale: 3,
),
ElevatedButton(
onPressed: () {
Navigator.push(
context,
// MaterialPageRoute(builder: (context) => const Questionnaire())
MaterialPageRoute(builder: (context) => GameInstructions4(id: widget.id))
);
},
style: ElevatedButton.styleFrom(
fixedSize: const Size(100, 20),
backgroundColor: const Color(0xFF00A8AF),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(100)),
elevation: 2.0,),
child: const Text(
'Continue',
textAlign: TextAlign.center,
style: TextStyle(color: Colors.white,
fontSize: 15,
fontWeight: FontWeight.w300
)
)
)
]
)
],
)
)
);
}
}
}
64 changes: 43 additions & 21 deletions RewardProcessing/lib/game/game_instructions4.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,49 @@ class _GameInstructions4State extends State<GameInstructions4> {

@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: const Color(0xff000000),
body: GestureDetector(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => GameInstructions5(id: widget.id)),
);
return WillPopScope(
onWillPop: ()async {
return false; // disable back page
},
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.asset(
'assets/images/gi4.png',
scale: 2.9,
),
],
),
),
),
child: Scaffold(
backgroundColor: const Color(0xFFFFFFFF),
body: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Image.asset('assets/images/gi4.png',
scale: 3,
),
ElevatedButton(
onPressed: () {
Navigator.push(
context,
// MaterialPageRoute(builder: (context) => const Questionnaire())
MaterialPageRoute(builder: (context) => GameInstructions5(id: widget.id))
);
},
style: ElevatedButton.styleFrom(
fixedSize: const Size(100, 20),
backgroundColor: const Color(0xFF00A8AF),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(100)),
elevation: 2.0,),
child: const Text(
'Continue',
textAlign: TextAlign.center,
style: TextStyle(color: Colors.white,
fontSize: 15,
fontWeight: FontWeight.w300
)
)
)
]
)
],
)
)
);
}
}
}
Loading

0 comments on commit 2e4e28f

Please sign in to comment.