registration done
parent
68642c3ba4
commit
496c6ce32e
@ -0,0 +1,120 @@
|
||||
class CheckActivationCodeRegisterReq {
|
||||
int patientMobileNumber;
|
||||
String mobileNo;
|
||||
String deviceToken;
|
||||
bool projectOutSA;
|
||||
int loginType;
|
||||
String zipCode;
|
||||
bool isRegister;
|
||||
String logInTokenID;
|
||||
int searchType;
|
||||
int patientID;
|
||||
String nationalID;
|
||||
String patientIdentificationID;
|
||||
String activationCode;
|
||||
bool isSilentLogin;
|
||||
double versionID;
|
||||
int channel;
|
||||
int languageID;
|
||||
String iPAdress;
|
||||
String generalid;
|
||||
int patientOutSA;
|
||||
Null sessionID;
|
||||
bool isDentalAllowedBackend;
|
||||
int deviceTypeID;
|
||||
bool forRegisteration;
|
||||
String dob;
|
||||
int isHijri;
|
||||
String healthId;
|
||||
CheckActivationCodeRegisterReq({
|
||||
this.patientMobileNumber,
|
||||
this.mobileNo,
|
||||
this.deviceToken,
|
||||
this.projectOutSA,
|
||||
this.loginType,
|
||||
this.zipCode,
|
||||
this.isRegister,
|
||||
this.logInTokenID,
|
||||
this.searchType,
|
||||
this.patientID,
|
||||
this.nationalID,
|
||||
this.patientIdentificationID,
|
||||
this.activationCode,
|
||||
this.isSilentLogin,
|
||||
this.versionID,
|
||||
this.channel,
|
||||
this.languageID,
|
||||
this.iPAdress,
|
||||
this.generalid,
|
||||
this.patientOutSA,
|
||||
this.sessionID,
|
||||
this.isDentalAllowedBackend,
|
||||
this.deviceTypeID,
|
||||
this.forRegisteration,
|
||||
this.dob,
|
||||
this.isHijri,
|
||||
this.healthId,
|
||||
});
|
||||
|
||||
CheckActivationCodeRegisterReq.fromJson(Map<String, dynamic> json) {
|
||||
patientMobileNumber = json['PatientMobileNumber'];
|
||||
mobileNo = json['MobileNo'];
|
||||
deviceToken = json['DeviceToken'];
|
||||
projectOutSA = json['ProjectOutSA'];
|
||||
loginType = json['LoginType'];
|
||||
zipCode = json['ZipCode'];
|
||||
isRegister = json['isRegister'];
|
||||
logInTokenID = json['LogInTokenID'];
|
||||
searchType = json['SearchType'];
|
||||
patientID = json['PatientID'];
|
||||
nationalID = json['NationalID'];
|
||||
patientIdentificationID = json['PatientIdentificationID'];
|
||||
activationCode = json['activationCode'];
|
||||
isSilentLogin = json['IsSilentLogin'];
|
||||
versionID = json['VersionID'];
|
||||
channel = json['Channel'];
|
||||
languageID = json['LanguageID'];
|
||||
iPAdress = json['IPAdress'];
|
||||
generalid = json['generalid'];
|
||||
patientOutSA = json['PatientOutSA'];
|
||||
sessionID = json['SessionID'];
|
||||
isDentalAllowedBackend = json['isDentalAllowedBackend'];
|
||||
deviceTypeID = json['DeviceTypeID'];
|
||||
forRegisteration = json['ForRegisteration'];
|
||||
dob = json['DOB'];
|
||||
isHijri = json['IsHijri'];
|
||||
healthId = json['HealthId'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['PatientMobileNumber'] = this.patientMobileNumber;
|
||||
data['MobileNo'] = this.mobileNo;
|
||||
data['DeviceToken'] = this.deviceToken;
|
||||
data['ProjectOutSA'] = this.projectOutSA;
|
||||
data['LoginType'] = this.loginType;
|
||||
data['ZipCode'] = this.zipCode;
|
||||
data['isRegister'] = this.isRegister;
|
||||
data['LogInTokenID'] = this.logInTokenID;
|
||||
data['SearchType'] = this.searchType;
|
||||
data['PatientID'] = this.patientID;
|
||||
data['NationalID'] = this.nationalID;
|
||||
data['PatientIdentificationID'] = this.patientIdentificationID;
|
||||
data['activationCode'] = this.activationCode;
|
||||
data['IsSilentLogin'] = this.isSilentLogin;
|
||||
data['VersionID'] = this.versionID;
|
||||
data['Channel'] = this.channel;
|
||||
data['LanguageID'] = this.languageID;
|
||||
data['IPAdress'] = this.iPAdress;
|
||||
data['generalid'] = this.generalid;
|
||||
data['PatientOutSA'] = this.patientOutSA;
|
||||
data['SessionID'] = this.sessionID;
|
||||
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
|
||||
data['DeviceTypeID'] = this.deviceTypeID;
|
||||
data['ForRegisteration'] = this.forRegisteration;
|
||||
data['DOB'] = dob;
|
||||
data['IsHijri'] = isHijri;
|
||||
data['HealthId'] = healthId;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,203 @@
|
||||
import 'package:diplomaticquarterapp/config/size_config.dart';
|
||||
import 'package:diplomaticquarterapp/pages/login/login-type.dart';
|
||||
import 'package:diplomaticquarterapp/pages/login/register.dart';
|
||||
import 'package:diplomaticquarterapp/pages/login/register-info.dart';
|
||||
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
|
||||
import 'package:diplomaticquarterapp/theme/colors.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/utils.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
|
||||
import 'package:diplomaticquarterapp/pages/login/confirm-login.dart';
|
||||
|
||||
class RegisterNew extends StatefulWidget {
|
||||
@override
|
||||
_RegisterNew createState() => _RegisterNew();
|
||||
}
|
||||
|
||||
class _RegisterNew extends State<RegisterNew> {
|
||||
final nationalIDorFile = TextEditingController();
|
||||
final int loginType = LoginType.loginType;
|
||||
String mobileNo;
|
||||
String countryCode = '966';
|
||||
var isHijri;
|
||||
final util = Utils();
|
||||
DateTime selectedDate;
|
||||
String dob;
|
||||
bool isButtonDisabled = true;
|
||||
final authService = new AuthProvider();
|
||||
final sharedPref = new AppSharedPreferences();
|
||||
PageController _controller;
|
||||
bool isLoading;
|
||||
int _currentIndex = 0;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_controller = new PageController();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
changePageViewIndex(pageIndex) {
|
||||
_controller.jumpToPage(pageIndex);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AppScaffold(
|
||||
appBarTitle: TranslationBase.of(context).register,
|
||||
isShowAppBar: true,
|
||||
isShowDecPage: false,
|
||||
showNewAppBar: true,
|
||||
showNewAppBarTitle: true,
|
||||
body: SingleChildScrollView(
|
||||
child: Container(
|
||||
height: SizeConfig.realScreenHeight * .9,
|
||||
width: SizeConfig.realScreenWidth,
|
||||
child: Column(children: <Widget>[
|
||||
Container(
|
||||
width: double.infinity,
|
||||
padding: EdgeInsets.only(left: 20, right: 20, top: 12),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: showProgress(
|
||||
title: TranslationBase.of(context).RequesterInfo,
|
||||
status: _currentIndex == 0
|
||||
? TranslationBase.of(context).inPrgress
|
||||
: _currentIndex > 0
|
||||
? TranslationBase.of(context).completed
|
||||
: TranslationBase.of(context).locked,
|
||||
color: _currentIndex == 0 ? CustomColors.orange : CustomColors.green,
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: showProgress(
|
||||
title: TranslationBase.of(context).patientInfo,
|
||||
status: _currentIndex == 1
|
||||
? TranslationBase.of(context).inPrgress
|
||||
: _currentIndex > 1
|
||||
? TranslationBase.of(context).completed
|
||||
: TranslationBase.of(context).locked,
|
||||
color: _currentIndex == 1
|
||||
? CustomColors.orange
|
||||
: _currentIndex > 1
|
||||
? CustomColors.green
|
||||
: CustomColors.grey2,
|
||||
),
|
||||
),
|
||||
showProgress(
|
||||
title: TranslationBase.of(context).otherInfo,
|
||||
status: _currentIndex == 2 ? TranslationBase.of(context).inPrgress : TranslationBase.of(context).locked,
|
||||
color: _currentIndex == 2
|
||||
? CustomColors.orange
|
||||
: _currentIndex > 3
|
||||
? CustomColors.green
|
||||
: CustomColors.grey2,
|
||||
isNeedBorder: false,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: PageView(
|
||||
physics: NeverScrollableScrollPhysics(),
|
||||
controller: _controller,
|
||||
onPageChanged: (index) {
|
||||
setState(() {
|
||||
_currentIndex = index;
|
||||
});
|
||||
},
|
||||
scrollDirection: Axis.horizontal,
|
||||
children: <Widget>[
|
||||
Register(
|
||||
changePageViewIndex: changePageViewIndex,
|
||||
),
|
||||
|
||||
RegisterInfo(
|
||||
changePageViewIndex: changePageViewIndex,
|
||||
),
|
||||
RegisterInfo(changePageViewIndex: changePageViewIndex, page: 2),
|
||||
// NewEReferralStepOnePage(
|
||||
// changePageViewIndex: changePageViewIndex,
|
||||
// createEReferralRequestModel: createEReferralRequestModel,
|
||||
// ),
|
||||
// NewEReferralStepTowPage(
|
||||
// changePageViewIndex: changePageViewIndex,
|
||||
// createEReferralRequestModel: createEReferralRequestModel,
|
||||
// ),
|
||||
// NewEReferralStepThreePage(
|
||||
// changePageViewIndex: changePageViewIndex,
|
||||
// createEReferralRequestModel: createEReferralRequestModel,
|
||||
// ),
|
||||
],
|
||||
),
|
||||
),
|
||||
]),
|
||||
)),
|
||||
);
|
||||
}
|
||||
|
||||
Widget showProgress({String title, String status, Color color, bool isNeedBorder = true}) {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Container(
|
||||
width: 26,
|
||||
height: 26,
|
||||
decoration: containerRadius(color, 200),
|
||||
child: Icon(
|
||||
Icons.done,
|
||||
color: Colors.white,
|
||||
size: 16,
|
||||
),
|
||||
),
|
||||
if (isNeedBorder)
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: mDivider(Colors.grey),
|
||||
)),
|
||||
],
|
||||
),
|
||||
mHeight(8),
|
||||
Text(
|
||||
title,
|
||||
style: TextStyle(
|
||||
fontSize: 11,
|
||||
fontWeight: FontWeight.w600,
|
||||
letterSpacing: -0.44,
|
||||
),
|
||||
),
|
||||
mHeight(2),
|
||||
Container(
|
||||
padding: EdgeInsets.all(5),
|
||||
decoration: containerRadius(color.withOpacity(0.2), 4),
|
||||
child: Text(
|
||||
status,
|
||||
style: TextStyle(
|
||||
fontSize: 8,
|
||||
fontWeight: FontWeight.w600,
|
||||
letterSpacing: -0.32,
|
||||
color: color,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue