|
|
|
|
@ -27,7 +27,7 @@ class _RegisterInfo extends State<RegisterInfo> {
|
|
|
|
|
final sharedPref = new AppSharedPreferences();
|
|
|
|
|
RegisterInfoResponse registerInfo;
|
|
|
|
|
bool isLoading;
|
|
|
|
|
|
|
|
|
|
int page = 1;
|
|
|
|
|
@override
|
|
|
|
|
void initState() {
|
|
|
|
|
getRegisterInfo();
|
|
|
|
|
@ -52,55 +52,71 @@ class _RegisterInfo extends State<RegisterInfo> {
|
|
|
|
|
fontSize: SizeConfig.textMultiplier * 3,
|
|
|
|
|
textAlign: TextAlign.left,
|
|
|
|
|
)),
|
|
|
|
|
registerInfo != null
|
|
|
|
|
? Expanded(
|
|
|
|
|
flex: 4,
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Container(
|
|
|
|
|
child: TextFields(
|
|
|
|
|
hintText: registerInfo.idNumber,
|
|
|
|
|
prefixIcon:
|
|
|
|
|
Icon(Icons.chrome_reader_mode, color: Colors.red),
|
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
|
top: 20, bottom: 20, left: 10, right: 10),
|
|
|
|
|
readOnly: true,
|
|
|
|
|
)),
|
|
|
|
|
Container(
|
|
|
|
|
child: TextFields(
|
|
|
|
|
hintText: registerInfo.firstNameEn +
|
|
|
|
|
' ' +
|
|
|
|
|
registerInfo.lastNameEn,
|
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
|
top: 20, bottom: 20, left: 10, right: 10),
|
|
|
|
|
readOnly: true,
|
|
|
|
|
)),
|
|
|
|
|
Container(
|
|
|
|
|
child: TextFields(
|
|
|
|
|
hintText: registerInfo.maritalStatusCode,
|
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
|
top: 20, bottom: 20, left: 10, right: 10),
|
|
|
|
|
readOnly: true,
|
|
|
|
|
)),
|
|
|
|
|
Container(
|
|
|
|
|
child: TextFields(
|
|
|
|
|
prefixIcon:
|
|
|
|
|
Icon(Icons.chrome_reader_mode, color: Colors.red),
|
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
|
top: 20, bottom: 20, left: 10, right: 10),
|
|
|
|
|
hintText: TranslationBase.of(context).nationalID,
|
|
|
|
|
)),
|
|
|
|
|
Container(
|
|
|
|
|
child: TextFields(
|
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
|
top: 20, bottom: 20, left: 10, right: 10),
|
|
|
|
|
hintText: TranslationBase.of(context).nationalID,
|
|
|
|
|
)),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
registerInfo != null && page == 1
|
|
|
|
|
? Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText('National ID'),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(bottom: 10),
|
|
|
|
|
child: TextFields(
|
|
|
|
|
hintText: registerInfo.idNumber,
|
|
|
|
|
prefixIcon: Icon(Icons.chrome_reader_mode,
|
|
|
|
|
color: Colors.red),
|
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
|
top: 20, bottom: 20, left: 10, right: 10),
|
|
|
|
|
readOnly: true,
|
|
|
|
|
)),
|
|
|
|
|
AppText('Name'),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(bottom: 10),
|
|
|
|
|
child: TextFields(
|
|
|
|
|
hintText: registerInfo.firstNameEn +
|
|
|
|
|
' ' +
|
|
|
|
|
registerInfo.lastNameEn,
|
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
|
top: 20, bottom: 20, left: 10, right: 10),
|
|
|
|
|
readOnly: true,
|
|
|
|
|
)),
|
|
|
|
|
AppText('Gender'),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(bottom: 10),
|
|
|
|
|
child: TextFields(
|
|
|
|
|
hintText: registerInfo.maritalStatusCode == 'U'
|
|
|
|
|
? 'Unknown'
|
|
|
|
|
: registerInfo.maritalStatusCode == 'M'
|
|
|
|
|
? 'Male'
|
|
|
|
|
: 'Female',
|
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
|
top: 20, bottom: 20, left: 10, right: 10),
|
|
|
|
|
readOnly: true,
|
|
|
|
|
)),
|
|
|
|
|
AppText('Nationality'),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(bottom: 10),
|
|
|
|
|
child: TextFields(
|
|
|
|
|
hintText: registerInfo.nationalityCode,
|
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
|
top: 20, bottom: 20, left: 10, right: 10),
|
|
|
|
|
readOnly: true,
|
|
|
|
|
)),
|
|
|
|
|
AppText('Date of Birth'),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(bottom: 10),
|
|
|
|
|
child: TextFields(
|
|
|
|
|
hintText: registerInfo.dateOfBirth,
|
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
|
top: 20, bottom: 20, left: 10, right: 10),
|
|
|
|
|
readOnly: true,
|
|
|
|
|
)),
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
: SizedBox(),
|
|
|
|
|
: registerInfo != null && page == 2
|
|
|
|
|
? Column(
|
|
|
|
|
children: <Widget>[],
|
|
|
|
|
)
|
|
|
|
|
: SizedBox(),
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 2,
|
|
|
|
|
child: Column(
|
|
|
|
|
@ -110,8 +126,8 @@ class _RegisterInfo extends State<RegisterInfo> {
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Expanded(
|
|
|
|
|
child: DefaultButton(
|
|
|
|
|
TranslationBase.of(context).registerNow,
|
|
|
|
|
() => {registerNow()},
|
|
|
|
|
TranslationBase.of(context).next,
|
|
|
|
|
() => {nextPage()},
|
|
|
|
|
textColor: Colors.white,
|
|
|
|
|
))
|
|
|
|
|
],
|
|
|
|
|
@ -122,6 +138,12 @@ class _RegisterInfo extends State<RegisterInfo> {
|
|
|
|
|
)));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
nextPage() {
|
|
|
|
|
setState(() {
|
|
|
|
|
page++;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
registerNow() {}
|
|
|
|
|
getRegisterInfo() async {
|
|
|
|
|
registerInfo =
|
|
|
|
|
|