diff --git a/.gitignore b/.gitignore index ae1f1838..c8e6bcd9 100644 --- a/.gitignore +++ b/.gitignore @@ -18,7 +18,7 @@ # The .vscode folder contains launch configuration and tasks you configure in # VS Code which you may wish to be included in version control, so this line # is commented out by default. -#.vscode/ +.vscode/ # Flutter/Dart/Pub related **/doc/api/ @@ -35,3 +35,5 @@ lib/generated_plugin_registrant.dart # Exceptions to above rules. !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages +.vscode/settings.json +.vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..4969fedb --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,16 @@ +{ + "commentBox.styles": { + "defaultStyle": { + "commentStartToken": "/* \n *@author: Elham Rababah \n *@Date:13/4/1993 \n *@param: \n *@return:\n *@desc: ", + "commentEndToken": "\n */", + "leftEdgeToken": " * ", + "rightEdgeToken": "", + "topEdgeToken": "", + "bottomEdgeToken": "", + "topRightToken": "", + "bottomLeftToken": "", + "capitalize": false, + "textAlignment": "left" + }} + +} \ No newline at end of file diff --git a/lib/main.dart b/lib/main.dart index e752234a..e44fc693 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -9,7 +9,13 @@ import './providers/projects_provider.dart'; import './routes.dart'; void main() => runApp(MyApp()); - +/* + *@author: Elham Rababah + *@Date:13/4/1993 + *@param: + *@return: + *@desc: eee + */ class MyApp extends StatelessWidget { // This widget is the root of your application. @override diff --git a/lib/screens/auth/verify_account_screen.dart b/lib/screens/auth/verify_account_screen.dart index 77327292..73e59e19 100644 --- a/lib/screens/auth/verify_account_screen.dart +++ b/lib/screens/auth/verify_account_screen.dart @@ -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: [ AuthHeader(loginType.verifyPassword), - // ChangePassword(), + VerifyAccount(), ], ), ), diff --git a/lib/widgets/auth/auth_header.dart b/lib/widgets/auth/auth_header.dart index 2f3876bd..ac065561 100644 --- a/lib/widgets/auth/auth_header.dart +++ b/lib/widgets/auth/auth_header.dart @@ -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, diff --git a/lib/widgets/auth/login_form.dart b/lib/widgets/auth/login_form.dart index de2bfdec..a25dfd26 100644 --- a/lib/widgets/auth/login_form.dart +++ b/lib/widgets/auth/login_form.dart @@ -259,7 +259,7 @@ class _LoginFormState extends State { 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 diff --git a/lib/widgets/auth/verfiy_account.dart b/lib/widgets/auth/verfiy_account.dart new file mode 100644 index 00000000..9e1732ad --- /dev/null +++ b/lib/widgets/auth/verfiy_account.dart @@ -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(); + @override + Widget build(BuildContext context) { + return Form( + key: verifyAccountForm, + child: Container( + width: SizeConfig.widthMultiplier * 90, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + buildSizedBox(30), + Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + 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: [ + 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, + ); + } +} diff --git a/pubspec.lock b/pubspec.lock index 4c0717c5..7e582a27 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -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: diff --git a/pubspec.yaml b/pubspec.yaml index c0c6e878..30b1bd23 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -71,6 +71,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