finish verify account

merge-requests/1/head
Elham Rababah 6 years ago
parent 6090816dc3
commit 82b95843c7

@ -1,7 +1,7 @@
import 'package:doctor_app_flutter/lookups/auth_lookup.dart';
import 'package:doctor_app_flutter/widgets/auth/auth_header.dart';
import 'package:flutter/material.dart';
import '../../widgets/auth/verfiy_account.dart';
class VerifyAccountScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
@ -15,7 +15,7 @@ class VerifyAccountScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
AuthHeader(loginType.verifyPassword),
// ChangePassword(),
VerifyAccount(),
],
),
),

@ -74,6 +74,9 @@ class AuthHeader extends StatelessWidget {
if (userType == loginType.unknownUser) {
img = 'assets/images/welcome_login_icon.png';
}
if (userType == loginType.verifyPassword) {
img = 'assets/images/verified_icon.png';
}
return Image.asset(
img,

@ -259,7 +259,7 @@ class _LoginFormState extends State<LoginForm> {
if (res['MessageStatus'] == 1) {
setSharedPref('platformImei', _platformImei);
saveObjToString('loggedUser', preRes);
Navigator.of(context).pushNamed(HOME);
Navigator.of(context).pushNamed(VERIFY_ACCOUNT);
// save imei on shared preferance
} else {
// handel error

@ -0,0 +1,168 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/routes.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
class VerifyAccount extends StatelessWidget {
final verifyAccountForm = GlobalKey<FormState>();
@override
Widget build(BuildContext context) {
return Form(
key: verifyAccountForm,
child: Container(
width: SizeConfig.widthMultiplier * 90,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
buildSizedBox(30),
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[
Container(
width: 85,
child: TextFormField(
decoration: InputDecoration(
// ts/images/password_icon.png
contentPadding:
EdgeInsets.only(top: 30, bottom: 30),
enabledBorder: OutlineInputBorder(
borderRadius:
BorderRadius.all(Radius.circular(10)),
borderSide: BorderSide(color: Colors.black),
),
focusedBorder: OutlineInputBorder(
borderRadius:
BorderRadius.all(Radius.circular(10.0)),
borderSide: BorderSide(
color: Theme.of(context).primaryColor),
)),
onChanged: (_) {},
)),
Container(
width: 85,
child: TextFormField(
decoration: InputDecoration(
// ts/images/password_icon.png
contentPadding:
EdgeInsets.only(top: 30, bottom: 30),
enabledBorder: OutlineInputBorder(
borderRadius:
BorderRadius.all(Radius.circular(10)),
borderSide: BorderSide(color: Colors.black),
),
focusedBorder: OutlineInputBorder(
borderRadius:
BorderRadius.all(Radius.circular(10.0)),
borderSide: BorderSide(
color: Theme.of(context).primaryColor),
)),
onChanged: (_) {},
)),
Container(
width: 85,
child: TextFormField(
decoration: InputDecoration(
// ts/images/password_icon.png
contentPadding:
EdgeInsets.only(top: 30, bottom: 30),
enabledBorder: OutlineInputBorder(
borderRadius:
BorderRadius.all(Radius.circular(10)),
borderSide: BorderSide(color: Colors.black),
),
focusedBorder: OutlineInputBorder(
borderRadius:
BorderRadius.all(Radius.circular(10.0)),
borderSide: BorderSide(
color: Theme.of(context).primaryColor),
)),
onChanged: (_) {},
)),
Container(
width: 85,
child: TextFormField(
decoration: InputDecoration(
// ts/images/password_icon.png
contentPadding:
EdgeInsets.only(top: 30, bottom: 30),
enabledBorder: OutlineInputBorder(
borderRadius:
BorderRadius.all(Radius.circular(10)),
borderSide: BorderSide(color: Colors.black),
),
focusedBorder: OutlineInputBorder(
borderRadius:
BorderRadius.all(Radius.circular(10.0)),
borderSide: BorderSide(
color: Theme.of(context).primaryColor),
)),
onChanged: (_) {},
))
],
),
// buildSizedBox(40),
buildSizedBox(20),
buildText(),
// buildSizedBox(10.0),
// Text()
buildSizedBox(40),
// buildSizedBox(),
RaisedButton(
onPressed: () {
Navigator.of(context).pushNamed(HOME);
},
elevation: 0.0,
child: Container(
width: double.infinity,
height: 50,
child: Center(
child: Text(
'Verfiy'.toUpperCase(),
// textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontSize: 3 * SizeConfig.textMultiplier),
),
),
),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
side:
BorderSide(width: 0.5, color: Hexcolor('#CCCCCC'))),
),
buildSizedBox(20),
Center(
child: Text(
"Resend in 4.20",
style: TextStyle(
fontSize: 3.0 * SizeConfig.textMultiplier,
),
),
),
buildSizedBox(10),
])));
}
RichText buildText() {
var text = RichText(
text: new TextSpan(
style: new TextStyle(
fontSize: 3.0 * SizeConfig.textMultiplier, color: Colors.black),
children: <TextSpan>[
new TextSpan(text: 'You will receive a '),
new TextSpan(
text: 'Login Code ',
style: TextStyle(fontWeight: FontWeight.w700)),
new TextSpan(text: 'By SMS, Please enter the code')
]));
return text;
}
SizedBox buildSizedBox([double height = 20]) {
return SizedBox(
height: height,
);
}
}

@ -7,14 +7,14 @@ packages:
name: _fe_analyzer_shared
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.3"
version: "2.0.0"
analyzer:
dependency: transitive
description:
name: analyzer
url: "https://pub.dartlang.org"
source: hosted
version: "0.39.4"
version: "0.39.5"
archive:
dependency: transitive
description:
@ -316,7 +316,7 @@ packages:
name: io
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.3"
version: "0.3.4"
js:
dependency: transitive
description:

@ -69,6 +69,7 @@ flutter:
- assets/images/verification_whatsapp_lg_icon.png
- assets/images/close_icon.png
- assets/images/welcome_login_icon.png
- assets/images/verified_icon.png
# - images/a_dot_ham.jpeg
# An image asset can refer to one or more resolution-specific "variants", see

Loading…
Cancel
Save