Commit 4e842043 authored by Wijegunarathna K. P. S. G. G.'s avatar Wijegunarathna K. P. S. G. G.

Merge branch 'IT20244170' into 'master'

Add instructions to the result page.

See merge request !10
parents 6e851c01 ad2f4b26
library Autism.MyStyles; library Autism.MyStyles;
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
Color cWhite = Colors.white; Color cWhite = Colors.white;
Color cPrimary = Color.fromARGB(255, 59, 176, 170); Color cPrimary = Color.fromARGB(255, 59, 176, 170);
...@@ -9,6 +11,7 @@ Color cbtnSuccess = Color.fromARGB(255, 18, 156, 22); ...@@ -9,6 +11,7 @@ Color cbtnSuccess = Color.fromARGB(255, 18, 156, 22);
Color cbtnText = Colors.white; Color cbtnText = Colors.white;
Color ctext = Colors.white; Color ctext = Colors.white;
Color cautiontext = Colors.yellow;
Color cHeading = Colors.black; Color cHeading = Colors.black;
Color cBgHeading = Color.fromARGB(50, 255, 255, 255); Color cBgHeading = Color.fromARGB(50, 255, 255, 255);
...@@ -23,4 +26,4 @@ Color cardBackColor = Colors.white; ...@@ -23,4 +26,4 @@ Color cardBackColor = Colors.white;
Color textPointer = Colors.redAccent; Color textPointer = Colors.redAccent;
Color defaultColor = Colors.blue; Color defaultColor = Colors.blue;
Color secondaryColor = const Color.fromARGB(255, 2, 253, 132); Color secondaryColor = const Color.fromARGB(255, 2, 253, 132);
\ No newline at end of file
import 'package:Autism/pages/Comp1/Comp1Intro.dart'; import 'package:Autism/pages/Comp1/Comp1Intro.dart';
import 'package:Autism/pages/Comp1/Comp1Welcome.dart'; import 'package:Autism/pages/Comp1/Comp1Welcome.dart';
import 'package:Autism/pages/Results.dart';
import 'package:Autism/pages/Comp1/Step1/Comp1Step1First.dart'; import 'package:Autism/pages/Comp1/Step1/Comp1Step1First.dart';
import 'package:Autism/pages/Comp1/Step1/Comp1Step1Second.dart'; import 'package:Autism/pages/Comp1/Step1/Comp1Step1Second.dart';
import 'package:Autism/pages/Comp1/Step1/Comp1Step1Third.dart'; import 'package:Autism/pages/Comp1/Step1/Comp1Step1Third.dart';
...@@ -12,7 +13,7 @@ import 'package:Autism/pages/Comp3/Comp3Page2.dart'; ...@@ -12,7 +13,7 @@ import 'package:Autism/pages/Comp3/Comp3Page2.dart';
import 'package:Autism/pages/Comp3/Comp3Page3.dart'; import 'package:Autism/pages/Comp3/Comp3Page3.dart';
import 'package:Autism/pages/Comp3/Comp3Page4.dart'; import 'package:Autism/pages/Comp3/Comp3Page4.dart';
import 'package:Autism/pages/Home.dart'; import 'package:Autism/pages/Home.dart';
import 'package:Autism/pages/Results.dart'; import 'package:Autism/pages/Comp1/Comp1Results.dart';
import 'package:Autism/pages/Welcome.dart'; import 'package:Autism/pages/Welcome.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:Autism/MyStyles.dart' as MyStyles; import 'package:Autism/MyStyles.dart' as MyStyles;
...@@ -43,43 +44,43 @@ class MyApp extends StatelessWidget { ...@@ -43,43 +44,43 @@ class MyApp extends StatelessWidget {
appbar: false, appbar: false,
), ),
'/home': (context) => MyTemplate( '/home': (context) => MyTemplate(
title: 'කළ යුතු කාර්යය', title: 'මුල්ම පියවර-ආරම්භක පිටුව',
child: Home(), child: Home(),
bg: MyStyles.cPrimary, bg: MyStyles.cPrimary,
appbar: true, appbar: true,
), ),
'/Comp1Welcome': (context) => MyTemplate( '/Comp1Welcome': (context) => MyTemplate(
title: 'පළමු කාර්යය', title: 'මුල්ම පියවර-කථන අසාමාන්‍යතාවයන් හදුනා ගැනීම',
child: Comp1Welcome(), child: Comp1Welcome(),
bg: MyStyles.cPrimary, bg: MyStyles.cPrimary,
appbar: true, appbar: true,
), ),
'/Comp1Intro': (context) => MyTemplate( '/Comp1Intro': (context) => MyTemplate(
title: 'පළමු කාර්යය', title: 'මුල්ම පියවර-කථන අසාමාන්‍යතාවයන් හදුනා ගැනීම',
child: Comp1Intro(), child: Comp1Intro(),
bg: MyStyles.cPrimary, bg: MyStyles.cPrimary,
appbar: true, appbar: true,
), ),
'/Comp1Step1First': (context) => MyTemplate( '/Comp1Step1First': (context) => MyTemplate(
title: 'පළමු කාර්යය', title: 'මුල්ම පියවර-කථන අසාමාන්‍යතාවයන් හදුනා ගැනීම',
child: Comp1Step1First(), child: Comp1Step1First(),
bg: MyStyles.cPrimary, bg: MyStyles.cPrimary,
appbar: true, appbar: true,
), ),
'/Comp1Step1Second': (context) => MyTemplate( '/Comp1Step1Second': (context) => MyTemplate(
title: 'පළමු කාර්යය', title: 'මුල්ම පියවර-කථන අසාමාන්‍යතාවයන් හදුනා ගැනීම',
child: Comp1Step1Second(), child: Comp1Step1Second(),
bg: MyStyles.cPrimary, bg: MyStyles.cPrimary,
appbar: true, appbar: true,
), ),
'/Comp1Step1Third': (context) => MyTemplate( '/Comp1Step1Third': (context) => MyTemplate(
title: 'පළමු කාර්යය', title: 'මුල්ම පියවර-කථන අසාමාන්‍යතාවයන් හදුනා ගැනීම',
child: Comp1Step1Third(), child: Comp1Step1Third(),
bg: MyStyles.cPrimary, bg: MyStyles.cPrimary,
appbar: true, appbar: true,
), ),
'/Comp1Step2': (context) => MyTemplate( '/Comp1Step2': (context) => MyTemplate(
title: 'පළමු කාර්යය', title: 'මුල්ම පියවර-කථන අසාමාන්‍යතාවයන් හදුනා ගැනීම',
child: Comp1Step2(), child: Comp1Step2(),
bg: MyStyles.cPrimary, bg: MyStyles.cPrimary,
appbar: true, appbar: true,
...@@ -132,6 +133,12 @@ class MyApp extends StatelessWidget { ...@@ -132,6 +133,12 @@ class MyApp extends StatelessWidget {
bg: MyStyles.cPrimary, bg: MyStyles.cPrimary,
appbar: true, appbar: true,
), ),
'/Comp1Results': (context) => MyTemplate(
title: 'ප්‍රතීඵලය-කථන අසාමාන්‍යතාවයන් හදුනා ගැනීම',
child: Comp1Results(),
bg: MyStyles.cPrimary,
appbar: true,
),
}); });
} }
} }
......
...@@ -13,23 +13,35 @@ class Comp1Intro extends StatefulWidget { ...@@ -13,23 +13,35 @@ class Comp1Intro extends StatefulWidget {
class _Comp1IntroState extends State<Comp1Intro> { class _Comp1IntroState extends State<Comp1Intro> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
void nextPage(String route) { void nextPage(String route) {
Navigator.pushNamedAndRemoveUntil(context, route,(r) => false, arguments: {}); Navigator.pushNamedAndRemoveUntil(context, route, (r) => false,
arguments: {});
} }
return Column( return Column(
children: [ children: [
SizedBox(height: 20,), SizedBox(
height: 20,
),
Header(title: 'කැමති ක්‍රියාකාරකම තෝරන්න'), Header(title: 'කැමති ක්‍රියාකාරකම තෝරන්න'),
SizedBox(height: 30,), SizedBox(
Button(route: '/Comp1Step1First', title: 'පින්තුරයක් බලා කතන්දර කියවීම', bg: MyStyles.cbtnPrimary), height: 30,
SizedBox(height: 30,), ),
Button(route: '/Comp1Step2', title: 'කැමති කතාවක් කීම', bg: MyStyles.cbtnPrimary), Button(
SizedBox(width: 180,child: route: '/Comp1Step1First',
Image.asset('assets/images/Component 1 - img 02.png') title: 'පින්තුරයක් බලා කතන්දර කියවීම',
bg: MyStyles.cbtnPrimary),
SizedBox(
height: 30,
), ),
Button(
], route: '/Comp1Step2',
title: 'කැමති කතාවක් කීම',
bg: MyStyles.cbtnPrimary),
SizedBox(
width: 180,
child: Image.asset('assets/images/Component 1 - img 02.png')),
],
); );
} }
} }
import 'package:Autism/widgets/ButtonXl.dart';
import 'package:flutter/material.dart';
import 'package:Autism/MyStyles.dart' as MyStyles;
class Comp1Results extends StatefulWidget {
const Comp1Results({super.key});
@override
State<Comp1Results> createState() => _Comp1ResultsState();
}
class _Comp1ResultsState extends State<Comp1Results> {
String color = '';
@override
Widget build(BuildContext context) {
final arg = ModalRoute.of(context)!.settings.arguments as Map;
color = arg['color'];
return Column(
children: [
SizedBox(
height: 20,
),
SizedBox(
width: 300,
child: Container(
decoration: BoxDecoration(
border: Border.all(color: MyStyles.cBgHeading, width: 2),
borderRadius: BorderRadius.all(Radius.circular(15.0)),
color: MyStyles.cBgHeading,
),
child: Column(
children: [
Padding(
padding: EdgeInsets.all(25),
child: Center(
child: Text(
'ඔබගේ ප්‍රතීඵලයට අදාළ වර්ණය වන්නේ',
textAlign: TextAlign.center,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 18,
color: MyStyles.cHeading),
)),
),
Container(
decoration: BoxDecoration(
border: Border.all(color: MyStyles.cBgHeading, width: 2),
borderRadius: BorderRadius.all(Radius.circular(15.0)),
color: color == 'රතු පාට'
? MyStyles.cbtnError
: color == 'කොළ පාට'
? MyStyles.cbtnSuccess
: MyStyles.cWhite,
),
child: Padding(
padding: EdgeInsets.all(40),
child: Center(
child: Text(
color,
textAlign: TextAlign.center,
style: TextStyle(fontSize: 18, color: MyStyles.cbtnText),
)),
),
)
],
),
),
),
SizedBox(
height:
20), // Add some spacing between the container and the text box
Text(
'⚠️ රතු ව‍ර්ණයෙන් ඔටිසම් රෝගී තත්වය සම්බන්ද කථන ආබාධයක් පැවතීමට වැඩි සම්භාවිතාවක් පැවතීමට හැකියාව ඇතිබව පෙන්නුම් කරයි. ප්‍රතිඵලය ලෙස රතු වර්ණය දිස්වුවහොත් වෛද්‍යවරයෙක් ලවා පරීක්ෂා කරවා ගැනීම සුදුසු වේ. කොළ වර්ණයෙන් රෝගී තත්වයක් නොමැති බවත් පෙන්නුම් කරයි.',
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,
color: MyStyles.cautiontext,
),
),
SizedBox(
height:
10), // Add some spacing between the container and the text box
Text(
'⚠️ යම් නිගමනයකට එලඹීමට පෙර අවම තුන්වතාවක්වත් නැවත නැවතත් ක්‍රියාකාරකමේ නියලී ලැබෙන ප්‍රතිඵලය එකම දැයි පරීක්ෂා කර බලන්න.',
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,
color: MyStyles.cautiontext,
),
),
SizedBox(
height:
10), // Add some spacing between the container and the text box
Text(
'⚠️ වෛද්‍යවරයෙක්ගේ පරීක්ෂණයකින් තොරව මෙහි ලැබෙන ප්‍රතිඵලය මත පමණක් එලඹී නිගමනවලට එලඹීමෙන් වලකින්න.',
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,
color: MyStyles.cautiontext,
),
),
SizedBox(
height: 50,
),
ButtonXL(
route: '/home', title: 'ආරම්භක පිටුවට', bg: MyStyles.cbtnPrimary),
],
);
}
}
...@@ -12,18 +12,36 @@ class Comp1Welcome extends StatefulWidget { ...@@ -12,18 +12,36 @@ class Comp1Welcome extends StatefulWidget {
class _Comp1WelcomeState extends State<Comp1Welcome> { class _Comp1WelcomeState extends State<Comp1Welcome> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
void nextPage(String route) { void nextPage(String route) {
Navigator.pushNamedAndRemoveUntil(context, route,(r) => false, arguments: {}); Navigator.pushNamedAndRemoveUntil(context, route, (r) => false,
arguments: {});
} }
return Column( return Column(
children: [ children: [
SizedBox(width: 180,child: Text(
Image.asset('assets/images/Component 1 - img 01.png') 'කථන අසාමාන්‍යතාවයන් හදුනා ගැනීම',
style: TextStyle(
fontSize: 30.0,
fontWeight: FontWeight.bold,
color: MyStyles.cWhite,
),
),
SizedBox(
width: 250,
height: 10,
),
SizedBox(
width: 180,
child: Image.asset('assets/images/Component 1 - img 01.png')),
SizedBox(
height: 30,
), ),
SizedBox(height: 30,), ButtonXL(
ButtonXL(route: '/Comp1Intro', title: 'ආරම්භ කරන්න', bg: MyStyles.cbtnPrimary), route: '/Comp1Intro',
], title: 'ආරම්භ කරන්න',
bg: MyStyles.cbtnPrimary),
],
); );
} }
} }
import 'package:Autism/widgets/Header.dart'; import 'package:Autism/widgets/Header.dart';
import 'package:Autism/widgets/ImageCard.dart'; import 'package:Autism/widgets/ImageCard.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:Autism/MyStyles.dart' as MyStyles;
class Comp1Step1First extends StatefulWidget { class Comp1Step1First extends StatefulWidget {
const Comp1Step1First({super.key}); const Comp1Step1First({super.key});
...@@ -27,14 +28,14 @@ class _Comp1Step1FirstState extends State<Comp1Step1First> { ...@@ -27,14 +28,14 @@ class _Comp1Step1FirstState extends State<Comp1Step1First> {
), ),
InkWell( InkWell(
onTap: () => nextPage( onTap: () => nextPage(
'/Comp1Step1Second', 'assets/images/Component 1 - img 03.png'), '/Comp1Step1Third', 'assets/images/Component 1 - img 03.png'),
child: ImageCard(image: 'assets/images/Component 1 - img 03.png')), child: ImageCard(image: 'assets/images/Component 1 - img 03.png')),
SizedBox( SizedBox(
height: 30, height: 30,
), ),
InkWell( InkWell(
onTap: () => nextPage( onTap: () => nextPage(
'/Comp1Step1Second', 'assets/images/Component 1 - img 04.png'), '/Comp1Step1Third', 'assets/images/Component 1 - img 04.png'),
child: ImageCard(image: 'assets/images/Component 1 - img 04.png')), child: ImageCard(image: 'assets/images/Component 1 - img 04.png')),
], ],
); );
......
...@@ -56,7 +56,7 @@ class _Comp1Step1ThirdState extends State<Comp1Step1Third> { ...@@ -56,7 +56,7 @@ class _Comp1Step1ThirdState extends State<Comp1Step1Third> {
print(response.data); print(response.data);
print(response.data["abnomility-sentiment"]); print(response.data["abnomility-sentiment"]);
print(color); print(color);
nextPage('/Results'); nextPage('/Comp1Results');
} }
} catch (e) { } catch (e) {
print(e); print(e);
...@@ -80,7 +80,8 @@ class _Comp1Step1ThirdState extends State<Comp1Step1Third> { ...@@ -80,7 +80,8 @@ class _Comp1Step1ThirdState extends State<Comp1Step1Third> {
), ),
Instructions( Instructions(
title: 'උපදෙස්', title: 'උපදෙස්',
body: 'පින්තූරය විස්තර කිරීමට දරුවාට කියන්න', body:
'දරුවා පින්තූරය විස්තර කිරීමට ආරම්භ කරන විට 🎙️ලකුණ ඔබන්න. විස්තර කිරීම අවසාන කල පසු නැවත🎙️ලකුණ ඔබන්න. ඉන්පසු > ලකුණ ඔබන්න.',
), ),
SizedBox( SizedBox(
height: 10, height: 10,
......
...@@ -53,7 +53,7 @@ class _Comp1Step2State extends State<Comp1Step2> { ...@@ -53,7 +53,7 @@ class _Comp1Step2State extends State<Comp1Step2> {
print(response.data); print(response.data);
print(response.data["abnomility-sentiment"]); print(response.data["abnomility-sentiment"]);
print(color); print(color);
nextPage('/Results'); nextPage('/Comp1Results');
} }
} catch (e) { } catch (e) {
print(e); print(e);
......
...@@ -62,6 +62,18 @@ class _HomeState extends State<Home> { ...@@ -62,6 +62,18 @@ class _HomeState extends State<Home> {
return Column( return Column(
children: [ children: [
Text(
'කල යුතු කාර්යයන්',
style: TextStyle(
fontSize: 38.0,
fontWeight: FontWeight.bold,
color: MyStyles.cWhite,
),
),
SizedBox(
width: 250,
height: 30,
),
Container( Container(
width: buttonWidth, width: buttonWidth,
height: buttonHeight, height: buttonHeight,
......
...@@ -19,6 +19,18 @@ class _WelcomeState extends State<Welcome> { ...@@ -19,6 +19,18 @@ class _WelcomeState extends State<Welcome> {
return Column( return Column(
children: [ children: [
Text(
'මුල්ම පියවර',
style: TextStyle(
fontSize: 58.0,
fontWeight: FontWeight.bold,
color: MyStyles.cWhite,
),
),
SizedBox(
width: 250,
height: 30,
),
SizedBox( SizedBox(
width: 200, child: Image.asset('assets/images/Home page img.png')), width: 200, child: Image.asset('assets/images/Home page img.png')),
SizedBox( SizedBox(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment