diff --git a/lib/screens/auth/change_password_screen.dart b/lib/screens/auth/change_password_screen.dart index 6e9d08d8..2c15cffa 100644 --- a/lib/screens/auth/change_password_screen.dart +++ b/lib/screens/auth/change_password_screen.dart @@ -2,24 +2,26 @@ 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/change_password.dart'; + class ChangePasswordScreen extends StatelessWidget { @override Widget build(BuildContext context) { // return Container()]; - + return Scaffold( - backgroundColor: Colors.white, - body: SingleChildScrollView( - child: Container( - margin: EdgeInsetsDirectional.fromSTEB(30, 0, 0, 0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AuthHeader(loginType.changePassword), - ChangePassword(), - ], - ), + body: SafeArea( + child: ListView(children: [ + Container( + margin: EdgeInsetsDirectional.fromSTEB(30, 0, 0, 0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AuthHeader(loginType.changePassword), + ChangePassword(), + ], ), - )); + ), + ]), + )); } } diff --git a/lib/screens/auth/login_screen.dart b/lib/screens/auth/login_screen.dart index ce0ce6ff..397d6745 100644 --- a/lib/screens/auth/login_screen.dart +++ b/lib/screens/auth/login_screen.dart @@ -11,12 +11,12 @@ import '../../widgets/auth/login_form.dart'; import '../../widgets/shared/dr_app_circular_progress_Indeicator.dart'; DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); + class Loginsreen extends StatefulWidget { @override _LoginsreenState createState() => _LoginsreenState(); } - class _LoginsreenState extends State { Future _prefs = SharedPreferences.getInstance(); @@ -25,7 +25,7 @@ class _LoginsreenState extends State { Future platformImeiFuture; Future getSharedPref() async { - sharedPref.getString('platformImei').then((imei){ + sharedPref.getString('platformImei').then((imei) { platformImei = imei; }); } @@ -42,45 +42,46 @@ class _LoginsreenState extends State { Widget build(BuildContext context) { getSharedPref(); return Scaffold( - backgroundColor: Colors.white, - body: SingleChildScrollView( - child: FutureBuilder( - future: platformImeiFuture, - builder: (BuildContext context, AsyncSnapshot snapshot) { - switch (snapshot.connectionState) { - case ConnectionState.waiting: - return DrAppCircularProgressIndeicator(); - default: - if (snapshot.hasError) { - return Text('Error: ${snapshot.error}'); - } else { - return Container( - margin: EdgeInsetsDirectional.fromSTEB(30, 0, 0, 0), - alignment: Alignment.topLeft, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - (platformImei == null) - ? Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ + body: SafeArea( + child: ListView(children: [ + FutureBuilder( + future: platformImeiFuture, + builder: (BuildContext context, AsyncSnapshot snapshot) { + switch (snapshot.connectionState) { + case ConnectionState.waiting: + return DrAppCircularProgressIndeicator(); + default: + if (snapshot.hasError) { + return Text('Error: ${snapshot.error}'); + } else { + return Container( + margin: EdgeInsetsDirectional.fromSTEB(30, 0, 0, 0), + alignment: Alignment.topLeft, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + (platformImei == null) + ? Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ AuthHeader(loginType.knownUser), - LoginForm(), - ], - ) - : Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - AuthHeader(loginType.unknownUser), - KnownUserLogin(), - ], - ), - ])); - } - } - }), + LoginForm(), + ], + ) + : Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + AuthHeader(loginType.unknownUser), + KnownUserLogin(), + ], + ), + ])); + } + } + }), + ]), ), ); } diff --git a/lib/screens/auth/verification_methods_screen.dart b/lib/screens/auth/verification_methods_screen.dart index 23d36859..f0e39210 100644 --- a/lib/screens/auth/verification_methods_screen.dart +++ b/lib/screens/auth/verification_methods_screen.dart @@ -1,9 +1,8 @@ -import 'package:doctor_app_flutter/widgets/auth/verification_methods.dart'; import 'package:flutter/material.dart'; import '../../lookups/auth_lookup.dart'; import '../../widgets/auth/auth_header.dart'; -import '../../widgets/auth/verfiy_account.dart'; +import '../../widgets/auth/verification_methods.dart'; /* *@author: Elham Rababah @@ -17,18 +16,17 @@ class VerificationMethodsScreen extends StatelessWidget { Widget build(BuildContext context) { // return Container()]; return Scaffold( - backgroundColor: Colors.white, - body: SingleChildScrollView( - child: Container( - margin: EdgeInsetsDirectional.fromSTEB(30, 0, 30, 0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AuthHeader(loginType.verificationMethods), - VerificationMethods(), - ], - ), - ), - )); + body: ListView(children: [ + Container( + margin: EdgeInsetsDirectional.fromSTEB(30, 0, 30, 0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AuthHeader(loginType.verificationMethods), + VerificationMethods(), + ], + ), + ), + ])); } } diff --git a/lib/screens/auth/verify_account_screen.dart b/lib/screens/auth/verify_account_screen.dart index 2ebd8744..752a5b7c 100644 --- a/lib/screens/auth/verify_account_screen.dart +++ b/lib/screens/auth/verify_account_screen.dart @@ -1,6 +1,7 @@ +import 'package:flutter/material.dart'; + import '../../lookups/auth_lookup.dart'; import '../../widgets/auth/auth_header.dart'; -import 'package:flutter/material.dart'; import '../../widgets/auth/verfiy_account.dart'; class VerifyAccountScreen extends StatelessWidget { @@ -8,18 +9,19 @@ class VerifyAccountScreen extends StatelessWidget { Widget build(BuildContext context) { // return Container()]; return Scaffold( - backgroundColor: Colors.white, - body: SingleChildScrollView( - child: Container( - margin: EdgeInsetsDirectional.fromSTEB(30, 0, 0, 0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AuthHeader(loginType.verifyPassword), - VerifyAccount(), - ], - ), + body: SafeArea( + child: ListView(children: [ + Container( + margin: EdgeInsetsDirectional.fromSTEB(30, 0, 0, 0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AuthHeader(loginType.verifyPassword), + VerifyAccount(), + ], ), - )); + ), + ]), + )); } }