check activation code

merge-requests/878/head
hussam al-habibeh 5 years ago
parent 9eadc0f0b1
commit 13c42b297a

@ -39,20 +39,21 @@ class PatientRegistrationService extends BaseService {
{SendActivationCodeByOTPNotificationTypeForRegistrationModel {SendActivationCodeByOTPNotificationTypeForRegistrationModel
registrationModel, registrationModel,
int otpType, int otpType,
PatientRegistrationViewModel user}) async { PatientRegistrationViewModel user,
CheckPatientForRegistrationModel
checkPatientForRegistrationModel}) async {
registrationModel = registrationModel =
SendActivationCodeByOTPNotificationTypeForRegistrationModel( SendActivationCodeByOTPNotificationTypeForRegistrationModel(
oTPSendType: otpType, oTPSendType: otpType,
patientIdentificationID: patientIdentificationID:
user.checkPatientForRegistrationModel.patientIdentificationID, checkPatientForRegistrationModel.patientIdentificationID,
patientMobileNumber: patientMobileNumber: checkPatientForRegistrationModel.patientMobileNumber,
user.checkPatientForRegistrationModel.patientMobileNumber, zipCode: checkPatientForRegistrationModel.zipCode,
zipCode: user.checkPatientForRegistrationModel.zipCode,
patientOutSA: false, patientOutSA: false,
healthId: "30000018540264", healthId: "30000018540264",
dOB: user.checkPatientForRegistrationModel.dOB, dOB: checkPatientForRegistrationModel.dOB,
isRegister: user.checkPatientForRegistrationModel.isRegister, isRegister: checkPatientForRegistrationModel.isRegister,
isHijri: user.checkPatientForRegistrationModel.isHijri, isHijri: checkPatientForRegistrationModel.isHijri,
); );
hasError = false; hasError = false;
await baseAppClient.post(SEND_ACTIVATION_CODE_BY_OTP_NOT_TYPE, await baseAppClient.post(SEND_ACTIVATION_CODE_BY_OTP_NOT_TYPE,
@ -69,8 +70,9 @@ class PatientRegistrationService extends BaseService {
checkActivationCode(CheckActivationCodeModel registrationModel) async { checkActivationCode(CheckActivationCodeModel registrationModel) async {
hasError = false; hasError = false;
await baseAppClient.post(CHECK_ACTIVATION_CODE_FOR_PATIENT, await baseAppClient.post(CHECK_ACTIVATION_CODE_FOR_PATIENT,
onSuccess: (dynamic response, int statusCode) {}, onSuccess: (dynamic response, int statusCode) {
onFailure: (String error, int statusCode) { registrationModel = CheckActivationCodeModel.fromJson(response);
}, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, body: registrationModel.toJson()); }, body: registrationModel.toJson());

@ -14,19 +14,17 @@ class PatientRegistrationViewModel extends BaseViewModel {
PatientRegistrationService _patientRegistrationService = PatientRegistrationService _patientRegistrationService =
locator<PatientRegistrationService>(); locator<PatientRegistrationService>();
GetPatientInfoResponseModel get getPatientInfoResponseModel =>_patientRegistrationService.getPatientInfoResponseModel;
CheckPatientForRegistrationModel checkPatientForRegistrationModel ;
GetPatientInfoResponseModel get getPatientInfoResponseModel => GetPatientInfoResponseModel get getPatientInfoResponseModel =>
_patientRegistrationService.getPatientInfoResponseModel; _patientRegistrationService.getPatientInfoResponseModel;
CheckPatientForRegistrationModel checkPatientForRegistrationModel; CheckPatientForRegistrationModel checkPatientForRegistrationModel;
Future checkPatientForRegistration( Future checkPatientForRegistration(
CheckPatientForRegistrationModel registrationModel) async { CheckPatientForRegistrationModel registrationModel) async {
checkPatientForRegistrationModel = registrationModel; checkPatientForRegistrationModel = registrationModel;
checkPatientForRegistrationModel =CheckPatientForRegistrationModel.fromJson(registrationModel.toJson()); checkPatientForRegistrationModel =
CheckPatientForRegistrationModel.fromJson(registrationModel.toJson());
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
await _patientRegistrationService await _patientRegistrationService
.checkPatientForRegistration(registrationModel); .checkPatientForRegistration(registrationModel);
@ -40,111 +38,106 @@ class PatientRegistrationViewModel extends BaseViewModel {
Future getPatientInfo( Future getPatientInfo(
GetPatientInfoRequestModel getPatientInfoRequestModel) async { GetPatientInfoRequestModel getPatientInfoRequestModel) async {
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
/// TODO Elham* return call service when it working /// TODO Elham* return call service when it working
_patientRegistrationService.getPatientInfoResponseModel = GetPatientInfoResponseModel.fromJson({ _patientRegistrationService.getPatientInfoResponseModel =
"Date": null, GetPatientInfoResponseModel.fromJson({
"LanguageID": 0, "Date": null,
"ServiceName": 0, "LanguageID": 0,
"Time": null, "ServiceName": 0,
"AndroidLink": null, "Time": null,
"AuthenticationTokenID": null, "AndroidLink": null,
"Data": null, "AuthenticationTokenID": null,
"Dataw": false, "Data": null,
"DietType": 0, "Dataw": false,
"ErrorCode": null, "DietType": 0,
"ErrorEndUserMessage": null, "ErrorCode": null,
"ErrorEndUserMessageN": null, "ErrorEndUserMessage": null,
"ErrorMessage": null, "ErrorEndUserMessageN": null,
"ErrorType": 0, "ErrorMessage": null,
"FoodCategory": 0, "ErrorType": 0,
"IOSLink": null, "FoodCategory": 0,
"IsAuthenticated": false, "IOSLink": null,
"MealOrderStatus": 0, "IsAuthenticated": false,
"MealType": 0, "MealOrderStatus": 0,
"MessageStatus": 1, "MealType": 0,
"NumberOfResultRecords": 0, "MessageStatus": 1,
"PatientBlodType": null, "NumberOfResultRecords": 0,
"SuccessMsg": null, "PatientBlodType": null,
"SuccessMsgN": null, "SuccessMsg": null,
"VidaUpdatedResponse": null, "SuccessMsgN": null,
"AccessTokenObject": null, "VidaUpdatedResponse": null,
"Age": 33, "AccessTokenObject": null,
"ClientIdentifierId": null, "Age": 33,
"CreatedBy": 0, "ClientIdentifierId": null,
"DateOfBirth": "07/31/1988", "CreatedBy": 0,
"FirstNameAr": "سفيان", "DateOfBirth": "07/31/1988",
"FirstNameEn": "SUFIAN", "FirstNameAr": "سفيان",
"Gender": "M", "FirstNameEn": "SUFIAN",
"GenderAr": null, "Gender": "M",
"GenderEn": null, "GenderAr": null,
"HealthId": "30000018540264", "GenderEn": null,
"IdNumber": "1062938285", "HealthId": "30000018540264",
"IdType": "NationalId", "IdNumber": "1062938285",
"IsHijri": false, "IdType": "NationalId",
"IsInstertedOrUpdated": 0, "IsHijri": false,
"IsNull": 0, "IsInstertedOrUpdated": 0,
"IsPatientExistNHIC": 0, "IsNull": 0,
"IsRecordLockedByCurrentUser": false, "IsPatientExistNHIC": 0,
"LastNameAr": "عثمان", "IsRecordLockedByCurrentUser": false,
"LastNameEn": "OTHMAN", "LastNameAr": "عثمان",
"List_ActiveAccessToken": null, "LastNameEn": "OTHMAN",
"MaritalStatus": "غير معروف", "List_ActiveAccessToken": null,
"MaritalStatusCode": "U", "MaritalStatus": "غير معروف",
"NationalDateOfBirth": "18/12/1408", "MaritalStatusCode": "U",
"Nationality": "السعودية", "NationalDateOfBirth": "18/12/1408",
"NationalityCode": "SAU", "Nationality": "السعودية",
"Occupation": "طالب", "NationalityCode": "SAU",
"PCDTransactionDataResultList": null, "Occupation": "طالب",
"PCD_GetVidaPatientForManualVerificationList": null, "PCDTransactionDataResultList": null,
"PCD_NHIC_HMG_PatientDetailsMatchCalulationList": null, "PCD_GetVidaPatientForManualVerificationList": null,
"PCD_ReturnValue": 0, "PCD_NHIC_HMG_PatientDetailsMatchCalulationList": null,
"PatientStatus": "-", "PCD_ReturnValue": 0,
"PlaceofBirth": "فينا", "PatientStatus": "-",
"PractitionerStatusCode": null, "PlaceofBirth": "فينا",
"PractitionerStatusDescAr": null, "PractitionerStatusCode": null,
"PractitionerStatusDescEn": null, "PractitionerStatusDescAr": null,
"RowCount": 0, "PractitionerStatusDescEn": null,
"SecondNameAr": "عبدالهادي", "RowCount": 0,
"SecondNameEn": "ABDULHADI", "SecondNameAr": "عبدالهادي",
"ThirdNameAr": "احمد", "SecondNameEn": "ABDULHADI",
"ThirdNameEn": "A", "ThirdNameAr": "احمد",
"YakeenVidaPatientDataStatisticsByPatientIdList": null, "ThirdNameEn": "A",
"YakeenVidaPatientDataStatisticsList": null, "YakeenVidaPatientDataStatisticsByPatientIdList": null,
"YakeenVidaPatientDataStatisticsPrefferedList": null, "YakeenVidaPatientDataStatisticsList": null,
"accessToken": null, "YakeenVidaPatientDataStatisticsPrefferedList": null,
"categoryCode": 0, "accessToken": null,
"categoryNameAr": null, "categoryCode": 0,
"categoryNameEn": null, "categoryNameAr": null,
"constraintCode": 0, "categoryNameEn": null,
"constraintNameAr": null, "constraintCode": 0,
"constraintNameEn": null, "constraintNameAr": null,
"content": null, "constraintNameEn": null,
"errorList": null, "content": null,
"licenseExpiryDate": null, "errorList": null,
"licenseIssuedDate": null, "licenseExpiryDate": null,
"licenseStatusCode": null, "licenseIssuedDate": null,
"licenseStatusDescAr": null, "licenseStatusCode": null,
"licenseStatusDescEn": null, "licenseStatusDescAr": null,
"organizations": null, "licenseStatusDescEn": null,
"registrationNumber": null, "organizations": null,
"specialtyCode": 0, "registrationNumber": null,
"specialtyNameAr": null, "specialtyCode": 0,
"specialtyNameEn": null "specialtyNameAr": null,
}); "specialtyNameEn": null
});
// await _patientRegistrationService. // await _patientRegistrationService.
// getPatientInfo(getPatientInfoRequestModel); // getPatientInfo(getPatientInfoRequestModel);
// if (_patientRegistrationService.hasError) { // if (_patientRegistrationService.hasError) {
// error = _patientRegistrationService.error; // error = _patientRegistrationService.error;
// setState(ViewState.ErrorLocal); // setState(ViewState.ErrorLocal);
// } else // } else
// setState(ViewState.Idle); setState(ViewState.Idle);
await _patientRegistrationService
.getPatientInfo(getPatientInfoRequestModel);
if (_patientRegistrationService.hasError) {
error = _patientRegistrationService.error;
setState(ViewState.ErrorLocal);
} else
setState(ViewState.Idle);
} }
Future sendActivationCodeByOTPNotificationType( Future sendActivationCodeByOTPNotificationType(
@ -153,8 +146,12 @@ class PatientRegistrationViewModel extends BaseViewModel {
int otpType, int otpType,
PatientRegistrationViewModel user}) async { PatientRegistrationViewModel user}) async {
setState(ViewState.Busy); setState(ViewState.Busy);
print(checkPatientForRegistrationModel);
print(checkPatientForRegistrationModel);
await _patientRegistrationService.sendActivationCodeByOTPNotificationType( await _patientRegistrationService.sendActivationCodeByOTPNotificationType(
otpType: otpType); otpType: otpType,
checkPatientForRegistrationModel: checkPatientForRegistrationModel);
if (_patientRegistrationService.hasError) { if (_patientRegistrationService.hasError) {
error = _patientRegistrationService.error; error = _patientRegistrationService.error;
setState(ViewState.Error); setState(ViewState.Error);

@ -99,16 +99,16 @@ class _RegisterPatientPageState extends State<RegisterPatientPage>
}, },
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
children: <Widget>[ children: <Widget>[
RegisterSearchPatientPage(changePageViewIndex: changePageViewIndex,model: model),
RegisterConfirmationPatientPage(model: model,),
RegisterSearchPatientPage( RegisterSearchPatientPage(
changePageViewIndex: changePageViewIndex,
model: model),
ActivationPage(
model: model,
changePageViewIndex: changePageViewIndex, changePageViewIndex: changePageViewIndex,
), ),
ActivationPage( RegisterConfirmationPatientPage(
user: model, model: model,
), ),
RegisterConfirmationPatientPage(),
]), ]),
), ),
), ),

@ -2,147 +2,475 @@ import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/model/PatientRegistration/CheckPatientForRegistrationModel.dart'; import 'package:doctor_app_flutter/core/model/PatientRegistration/CheckPatientForRegistrationModel.dart';
import 'package:doctor_app_flutter/core/viewModel/PatientRegistrationViewModel.dart'; import 'package:doctor_app_flutter/core/viewModel/PatientRegistrationViewModel.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
class ActivationPage extends StatefulWidget { class ActivationPage extends StatefulWidget {
PatientRegistrationViewModel user = PatientRegistrationViewModel(); final PatientRegistrationViewModel model;
ActivationPage({this.user}); final Function changePageViewIndex;
ActivationPage({this.model, this.changePageViewIndex});
@override @override
_ActivationPageState createState() => _ActivationPageState(); _ActivationPageState createState() => _ActivationPageState();
} }
class _ActivationPageState extends State<ActivationPage> { class _ActivationPageState extends State<ActivationPage> {
bool isSendOtp = false;
final verifyAccountForm = GlobalKey<FormState>();
TextStyle buildTextStyle() {
return TextStyle(
fontSize: SizeConfig.textMultiplier * 3,
);
}
Map verifyAccountFormValue = {
'digit1': '',
'digit2': '',
'digit3': '',
'digit4': '',
};
final focusD1 = FocusNode();
final focusD2 = FocusNode();
final focusD3 = FocusNode();
final focusD4 = FocusNode();
TextEditingController digit1 = TextEditingController(text: "");
TextEditingController digit2 = TextEditingController(text: "");
TextEditingController digit3 = TextEditingController(text: "");
TextEditingController digit4 = TextEditingController(text: "");
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<PatientRegistrationViewModel>( return AppScaffold(
builder: (_, model, w) => AppScaffold( baseViewModel: widget.model,
baseViewModel: model,
isShowAppBar: false, isShowAppBar: false,
body: Column( body: Column(
children: [ children: [
Container( Visibility(
width: double.infinity, //visible: isSendOtp,
margin: EdgeInsets.all(16.0), child: !isSendOtp
child: SingleChildScrollView( ? Container(
child: Column( width: double.infinity,
mainAxisAlignment: MainAxisAlignment.start, margin: EdgeInsets.all(16.0),
crossAxisAlignment: CrossAxisAlignment.start, child: SingleChildScrollView(
children: [ child: Column(
AppText( mainAxisAlignment: MainAxisAlignment.start,
"Please select how you want to be verified", crossAxisAlignment: CrossAxisAlignment.start,
fontFamily: 'Poppins', children: [
fontSize: SizeConfig.textMultiplier * 2.2, AppText(
fontWeight: FontWeight.w800, "Please select how you want to be verified",
), fontFamily: 'Poppins',
Row( fontSize: SizeConfig.textMultiplier * 2.2,
mainAxisAlignment: MainAxisAlignment.center, fontWeight: FontWeight.w800,
children: [ ),
Expanded( Row(
child: InkWell( mainAxisAlignment: MainAxisAlignment.center,
onTap: () { children: [
model.sendActivationCodeByOTPNotificationType( Expanded(
otpType: 1); child: InkWell(
}, onTap: () async {
child: Container( setState(() {
height: isSendOtp = true;
MediaQuery.of(context).size.height * 0.233, });
margin: EdgeInsets.all(10),
decoration: BoxDecoration( await widget.model
color: Colors.white, .sendActivationCodeByOTPNotificationType(
borderRadius: BorderRadius.all( otpType: 1);
Radius.circular(10), },
), child: Container(
border: Border.all( height:
color: HexColor('#707070'), width: 0.1), MediaQuery.of(context).size.height *
), 0.233,
child: Column( margin: EdgeInsets.all(10),
children: [ decoration: BoxDecoration(
Row( color: Colors.white,
children: [ borderRadius: BorderRadius.all(
Image.asset( Radius.circular(10),
"assets/images/verify-sms.png", ),
height: border: Border.all(
MediaQuery.of(context).size.height * color: HexColor('#707070'),
0.15, width: 0.1),
width: ),
MediaQuery.of(context).size.width * child: Column(
0.15, children: [
Row(
children: [
Image.asset(
"assets/images/verify-sms.png",
height: MediaQuery.of(context)
.size
.height *
0.15,
width: MediaQuery.of(context)
.size
.width *
0.15,
),
],
),
SizedBox(
height: 20,
),
AppText(
"Verify through SMS",
fontSize: 14,
color: Color(0xFF2E303A),
fontWeight: FontWeight.bold,
)
],
), ),
], ),
), ),
SizedBox( ),
height: 20, Expanded(
child: InkWell(
onTap: () async {
isSendOtp = false;
await widget.model
.sendActivationCodeByOTPNotificationType(
otpType: 1, user: widget.model);
},
child: Container(
height:
MediaQuery.of(context).size.height *
0.233,
margin: EdgeInsets.all(10),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(10),
),
border: Border.all(
color: HexColor('#707070'),
width: 0.1),
),
child: Column(
children: [
Row(
children: [
Image.asset(
"assets/images/verify-whtsapp.png",
height: MediaQuery.of(context)
.size
.height *
0.15,
width: MediaQuery.of(context)
.size
.width *
0.15,
),
],
),
SizedBox(
height: 20,
),
AppText(
"Verify through WhatsApp",
fontSize: 14,
color: Color(0xFF2E303A),
fontWeight: FontWeight.bold,
)
],
),
),
), ),
AppText( ),
"Verify through SMS", ],
fontSize: 14,
color: Color(0xFF2E303A),
fontWeight: FontWeight.bold,
)
],
),
), ),
), ],
), ),
Expanded( ),
child: InkWell( )
onTap: () { : Container(
model.sendActivationCodeByOTPNotificationType( width: double.infinity,
otpType: 1); margin: EdgeInsets.all(16.0),
}, child: SingleChildScrollView(
child: Container( child: Column(
height: mainAxisAlignment: MainAxisAlignment.start,
MediaQuery.of(context).size.height * 0.233, crossAxisAlignment: CrossAxisAlignment.start,
margin: EdgeInsets.all(10), children: [
decoration: BoxDecoration( AppText(
color: Colors.white, "Please enter the verification code sent to 02221552",
borderRadius: BorderRadius.all( fontFamily: 'Poppins',
Radius.circular(10), fontSize: SizeConfig.textMultiplier * 2.2,
), fontWeight: FontWeight.w800,
border: Border.all( ),
color: HexColor('#707070'), width: 0.1), Row(
), children: [
child: Column( Center(
children: [ child: SingleChildScrollView(
Row( child: Column(
children: [ crossAxisAlignment: CrossAxisAlignment.start,
Image.asset( children: <Widget>[
"assets/images/verify-whtsapp.png", Form(
height: key: verifyAccountForm,
MediaQuery.of(context).size.height * child: Padding(
0.15, padding: EdgeInsets.only(top: 20),
width: child: Directionality(
MediaQuery.of(context).size.width * textDirection: TextDirection.ltr,
0.15, child: Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: <Widget>[
Container(
width: SizeConfig
.realScreenWidth *
0.16,
margin: EdgeInsets.all(5),
child: TextFormField(
textInputAction:
TextInputAction.next,
style: buildTextStyle(),
autofocus: true,
maxLength: 1,
controller: digit1,
textAlign: TextAlign.center,
keyboardType:
TextInputType.number,
decoration:
buildInputDecoration(
context),
onSaved: (val) {},
//validator: validateCodeDigit,
onFieldSubmitted: (_) {
FocusScope.of(context)
.requestFocus(
focusD2);
},
onChanged: (val) {
if (val.length == 1) {
FocusScope.of(context)
.requestFocus(
focusD2);
verifyAccountFormValue[
'digit1'] =
val.trim();
//checkValue();
}
},
),
),
Container(
width: SizeConfig
.realScreenWidth *
0.16,
margin: EdgeInsets.all(5),
child: TextFormField(
focusNode: focusD2,
textInputAction:
TextInputAction.next,
maxLength: 1,
controller: digit2,
textAlign: TextAlign.center,
style: buildTextStyle(),
keyboardType:
TextInputType.number,
decoration:
buildInputDecoration(
context),
onSaved: (val) {},
onFieldSubmitted: (_) {
FocusScope.of(context)
.requestFocus(
focusD3);
},
onChanged: (val) {
if (val.length == 1) {
FocusScope.of(context)
.requestFocus(
focusD3);
verifyAccountFormValue[
'digit2'] =
val.trim();
//checkValue();
}
},
//validator: validateCodeDigit,
),
),
Container(
margin: EdgeInsets.all(5),
width: SizeConfig
.realScreenWidth *
0.16,
child: TextFormField(
focusNode: focusD3,
textInputAction:
TextInputAction.next,
maxLength: 1,
controller: digit3,
textAlign:
TextAlign.center,
style: buildTextStyle(),
keyboardType:
TextInputType.number,
decoration:
buildInputDecoration(
context),
onSaved: (val) {},
onFieldSubmitted: (_) {
FocusScope.of(context)
.requestFocus(
focusD4);
},
onChanged: (val) {
if (val.length == 1) {
FocusScope.of(context)
.requestFocus(
focusD4);
verifyAccountFormValue[
'digit3'] =
val.trim();
//checkValue();
}
},
// validator:
// validateCodeDigit,
)),
Container(
margin: EdgeInsets.all(5),
width: SizeConfig
.realScreenWidth *
0.16,
child: TextFormField(
focusNode: focusD4,
maxLength: 1,
textAlign:
TextAlign.center,
style: buildTextStyle(),
controller: digit4,
keyboardType:
TextInputType.number,
decoration:
buildInputDecoration(
context),
onFieldSubmitted: (_) {
FocusScope.of(context)
.requestFocus(
focusD4);
},
onChanged: (val) {
if (val.length == 1) {
verifyAccountFormValue[
'digit4'] =
val.trim();
//checkValue();
}
},
// validator:
// validateCodeDigit,
)),
],
)),
), ),
], ),
), Padding(
SizedBox( padding: const EdgeInsets.all(12.0),
height: 20, child: Column(
), mainAxisAlignment:
AppText( MainAxisAlignment.start,
"Verify through WhatsApp", crossAxisAlignment:
fontSize: 14, CrossAxisAlignment.start,
color: Color(0xFF2E303A), children: [
fontWeight: FontWeight.bold, AppText(
) TranslationBase.of(context)
], .validationMessage +
), ' ',
fontWeight: FontWeight.w600,
fontSize: 14,
),
// AppText(
// displayTime,
// color: Colors.red,
// textAlign: TextAlign.start,
// fontWeight: FontWeight.bold,
// fontSize: 14,
// )
]),
)
],
))),
],
), ),
), ],
), ),
], ),
), ),
],
),
),
) )
], ],
), ),
bottomSheet: isSendOtp
? Container(
height: 60,
margin: EdgeInsets.symmetric(vertical: 16, horizontal: 16),
child: Row(
children: [
Expanded(
child: Container(
child: AppButton(
title: TranslationBase.of(context).cancel,
hasBorder: true,
vPadding: 12,
hPadding: 8,
borderColor: Color(0xFFeaeaea),
color: Color(0xFFeaeaea),
fontColor: Colors.black,
fontSize: 2.2,
onPressed: () {
Navigator.of(context).pop();
},
),
),
),
SizedBox(
width: 8,
),
Expanded(
child: Container(
child: AppButton(
title: TranslationBase.of(context).next,
hasBorder: true,
vPadding: 12,
hPadding: 8,
borderColor: Color(0xFFB8382B),
color: Color(0xFFB8382B),
fontColor: Colors.white,
fontSize: 2.0,
onPressed: () async {
//widget.model.checkActivationCode(),
},
),
),
),
],
),
)
: null);
}
InputDecoration buildInputDecoration(BuildContext context) {
return InputDecoration(
counterText: " ",
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(10)),
borderSide: BorderSide(color: Colors.grey[300]),
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(10.0)),
borderSide: BorderSide(color: Colors.grey[300]),
),
errorBorder: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(10.0)),
borderSide: BorderSide(color: Colors.grey[300]),
),
focusedErrorBorder: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(10.0)),
borderSide: BorderSide(color: Theme.of(context).errorColor),
), ),
); );
} }

Loading…
Cancel
Save