symptom checker gender page updated
parent
e025321c71
commit
f03a711dff
Binary file not shown.
|
After Width: | Height: | Size: 23 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
@ -0,0 +1,131 @@
|
|||||||
|
import 'package:diplomaticquarterapp/config/size_config.dart';
|
||||||
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:diplomaticquarterapp/routes.dart';
|
||||||
|
|
||||||
|
class SymptomInfo extends StatefulWidget {
|
||||||
|
@override
|
||||||
|
_SymptomInfo createState() => new _SymptomInfo();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _SymptomInfo extends State<SymptomInfo> {
|
||||||
|
bool checkValue = false;
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return AppScaffold(
|
||||||
|
appBarTitle: TranslationBase.of(context).termsService,
|
||||||
|
isShowAppBar: true,
|
||||||
|
body: Padding(
|
||||||
|
padding: EdgeInsets.all(20),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: <Widget>[
|
||||||
|
AppText(
|
||||||
|
TranslationBase.of(context).beforeUsing,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 14,
|
||||||
|
// textAlign: TextAlign.center,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
width: MediaQuery.of(context).size.width,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(10),
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
padding: EdgeInsets.all(30),
|
||||||
|
margin: EdgeInsets.all(10),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
|
children: [
|
||||||
|
AppText(TranslationBase.of(context).remeberthat,
|
||||||
|
fontSize: 16),
|
||||||
|
SizedBox(
|
||||||
|
height: 10,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
'1. ' + TranslationBase.of(context).checkDiagnosis,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 16,
|
||||||
|
),
|
||||||
|
AppText(TranslationBase.of(context).informational,
|
||||||
|
fontSize: 16),
|
||||||
|
SizedBox(
|
||||||
|
height: 10,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
'2. ' + TranslationBase.of(context).notUseInEmbergency,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 16,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
TranslationBase.of(context).notUseInEmbergencyDetails,
|
||||||
|
fontSize: 16),
|
||||||
|
AppText(
|
||||||
|
TranslationBase.of(context).notUseInEmbergencyCall,
|
||||||
|
underline: true,
|
||||||
|
color: Colors.blue,
|
||||||
|
fontSize: 16),
|
||||||
|
SizedBox(
|
||||||
|
height: 10,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
'3.' + TranslationBase.of(context).dataSafe,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 16,
|
||||||
|
),
|
||||||
|
AppText(TranslationBase.of(context).dataSafeInfo,
|
||||||
|
fontSize: 16),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
flex: 1,
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
|
children: <Widget>[
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.all(10),
|
||||||
|
child: CheckboxListTile(
|
||||||
|
title: AppText(TranslationBase.of(context).accept),
|
||||||
|
value: checkValue,
|
||||||
|
onChanged: (newValue) {
|
||||||
|
setState(() {
|
||||||
|
this.checkValue = newValue;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
controlAffinity: ListTileControlAffinity
|
||||||
|
.leading, // <-- leading Checkbox
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: <Widget>[
|
||||||
|
Expanded(
|
||||||
|
child: DefaultButton(
|
||||||
|
TranslationBase.of(context).next,
|
||||||
|
() => {
|
||||||
|
if (checkValue == true)
|
||||||
|
{
|
||||||
|
Navigator.of(context).pushNamed(
|
||||||
|
SELECT_GENDER,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
color: checkValue == true
|
||||||
|
? Colors.black
|
||||||
|
: Colors.grey,
|
||||||
|
textColor: Colors.white,
|
||||||
|
))
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
))
|
||||||
|
],
|
||||||
|
)));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,124 @@
|
|||||||
|
import 'package:diplomaticquarterapp/config/size_config.dart';
|
||||||
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:diplomaticquarterapp/routes.dart';
|
||||||
|
import 'package:flutter_xlider/flutter_xlider.dart';
|
||||||
|
|
||||||
|
class SelectGender extends StatefulWidget {
|
||||||
|
@override
|
||||||
|
_SelectGender createState() => new _SelectGender();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _SelectGender extends State<SelectGender> {
|
||||||
|
double slider = 22;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return AppScaffold(
|
||||||
|
appBarTitle: TranslationBase.of(context).gender,
|
||||||
|
isShowAppBar: true,
|
||||||
|
body: Padding(
|
||||||
|
padding: EdgeInsets.all(20),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: <Widget>[
|
||||||
|
AppText(
|
||||||
|
//TranslationBase.of(context).beforeUsing,
|
||||||
|
TranslationBase.of(context).selectGender,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 20,
|
||||||
|
// textAlign: TextAlign.center,
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
|
children: [
|
||||||
|
AppText(TranslationBase.of(context).iAma, fontSize: 16),
|
||||||
|
SizedBox(
|
||||||
|
height: 10,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
|
height: 200,
|
||||||
|
width: 150,
|
||||||
|
child: Card(
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(15.0),
|
||||||
|
),
|
||||||
|
shadowColor: Colors.red,
|
||||||
|
child: Image.asset(
|
||||||
|
'assets/images/female_face.png')))),
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
|
height: 200,
|
||||||
|
width: 150,
|
||||||
|
child: Card(
|
||||||
|
shadowColor: Colors.red,
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(15.0),
|
||||||
|
),
|
||||||
|
child: Image.asset(
|
||||||
|
'assets/images/male_face.png'))))
|
||||||
|
],
|
||||||
|
),
|
||||||
|
AppText(TranslationBase.of(context).selectAge,
|
||||||
|
fontSize: 25),
|
||||||
|
SizedBox(
|
||||||
|
height: 10,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
TranslationBase.of(context).iAm +
|
||||||
|
' ' +
|
||||||
|
slider.toString() +
|
||||||
|
' ' +
|
||||||
|
TranslationBase.of(context)
|
||||||
|
.yearOld, //TranslationBase.of(context).remeberthat,
|
||||||
|
fontSize: 16),
|
||||||
|
SizedBox(
|
||||||
|
height: 30,
|
||||||
|
),
|
||||||
|
FlutterSlider(
|
||||||
|
values: [slider],
|
||||||
|
max: 90,
|
||||||
|
min: 14,
|
||||||
|
onDragCompleted: (handlerIndex, lowerValue, upperValue) {
|
||||||
|
print(lowerValue);
|
||||||
|
print(upperValue);
|
||||||
|
setState(() {
|
||||||
|
slider = upperValue;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
flex: 1,
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
|
children: <Widget>[
|
||||||
|
Row(
|
||||||
|
children: <Widget>[
|
||||||
|
Expanded(
|
||||||
|
child: DefaultButton(
|
||||||
|
TranslationBase.of(context).next,
|
||||||
|
() => {
|
||||||
|
Navigator.of(context).pushNamed(
|
||||||
|
SYMPTOM_CHECKER,
|
||||||
|
)
|
||||||
|
},
|
||||||
|
))
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
))
|
||||||
|
],
|
||||||
|
)));
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue