Add instructions to the result page.

parent 8e9ad45d
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);
......
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;
...@@ -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,22 +13,34 @@ class Comp1Intro extends StatefulWidget { ...@@ -13,22 +13,34 @@ 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),
SizedBox(width: 180,child:
Image.asset('assets/images/Component 1 - img 02.png')
), ),
Button(
route: '/Comp1Step1First',
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),
],
);
}
}
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});
......
...@@ -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);
......
...@@ -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);
......
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