diff --git a/lib/main.dart b/lib/main.dart index e44fc693..6953f636 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -9,13 +9,7 @@ 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 @@ -36,7 +30,7 @@ class MyApp extends StatelessWidget { primarySwatch: Colors.blue, primaryColor: Hexcolor('#B8382C'), buttonColor: Hexcolor('#B8382C'), - fontFamily: 'WorkSans'), + fontFamily: 'WorkSans',), initialRoute: INIT_ROUTE, routes: routes, ), diff --git a/lib/widgets/auth/auth_header.dart b/lib/widgets/auth/auth_header.dart index ac065561..a694615d 100644 --- a/lib/widgets/auth/auth_header.dart +++ b/lib/widgets/auth/auth_header.dart @@ -31,13 +31,7 @@ class AuthHeader extends StatelessWidget { SizedBox( height: 10, ), - Container( - margin: SizeConfig.isMobile - ? null - : EdgeInsetsDirectional.fromSTEB( - SizeConfig.screenWidth * 0.13, 0, 0, 0), - child: buildTextUnderLogo(context), - ) + buildTextUnderLogo(context), ], ), Column( @@ -86,50 +80,67 @@ class AuthHeader extends StatelessWidget { } Widget buildTextUnderLogo(context) { + Widget finalWid; + double textFontSize = + SizeConfig.isMobile ? 30 : SizeConfig.textMultiplier * 3; + EdgeInsetsDirectional containerMargin; if (userType == loginType.knownUser || userType == loginType.unknownUser) { - return Text( + finalWid = Text( "LOGIN", - style: TextStyle( - fontSize: SizeConfig.isMobile ? 30 : SizeConfig.screenWidth * 0.035, - fontWeight: FontWeight.w800), + style: TextStyle(fontSize: textFontSize, fontWeight: FontWeight.w800), ); } else { String text1; String text2; if (userType == loginType.changePassword) { - text1 = 'Change'; + text1 = 'Change '; text2 = 'Password!'; } if (userType == loginType.verifyPassword) { - text1 = 'verify'; + text1 = 'Verify '; text2 = 'Your Account!'; } + List childrens = [ + Text( + text1, + style: TextStyle(fontSize: textFontSize, fontWeight: FontWeight.w800), + ), + Text( + text2, + style: TextStyle( + color: Theme.of(context).primaryColor, + fontSize: textFontSize, + fontWeight: FontWeight.w800), + ) + ]; - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - text1, - style: TextStyle( - fontSize: - SizeConfig.isMobile ? 30 : SizeConfig.screenWidth * 0.035, - fontWeight: FontWeight.w800), - ), - Text( - text2, - style: TextStyle( - color: Theme.of(context).primaryColor, - fontSize: - SizeConfig.isMobile ? 30 : SizeConfig.screenWidth * 0.035, - fontWeight: FontWeight.w800), - ) - ], - ); + if (!SizeConfig.isMobile) { + finalWid = Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: childrens, + ); + } else { + finalWid = Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: childrens, + ); + } } + if (!SizeConfig.isMobile) { + double start = SizeConfig.screenWidth * 0.13; + if (loginType.verifyPassword == userType || + loginType.changePassword == userType) { + start = 0; + } + containerMargin = EdgeInsetsDirectional.fromSTEB(start, 0, 0, 0); + } + + return Container(margin: containerMargin, child: finalWid); } Container buildDrAppContainer(BuildContext context) { - if (userType == loginType.changePassword || userType == loginType.verifyPassword ) { + if (userType == loginType.changePassword || + userType == loginType.verifyPassword) { return Container(); } return Container( @@ -148,7 +159,8 @@ class AuthHeader extends StatelessWidget { } Text buildDrSulText(BuildContext context) { - if (userType == loginType.changePassword || userType == loginType.verifyPassword ) { + if (userType == loginType.changePassword || + userType == loginType.verifyPassword) { return Text(''); } return Text( @@ -166,7 +178,8 @@ class AuthHeader extends StatelessWidget { if (userType == loginType.unknownUser) { text = 'Welcome Back to '; } - if (userType == loginType.changePassword || userType == loginType.verifyPassword ) { + if (userType == loginType.changePassword || + userType == loginType.verifyPassword) { return Text(''); } return Text( diff --git a/lib/widgets/auth/login_form.dart b/lib/widgets/auth/login_form.dart index a25dfd26..e49f0d7b 100644 --- a/lib/widgets/auth/login_form.dart +++ b/lib/widgets/auth/login_form.dart @@ -64,6 +64,7 @@ class _LoginFormState extends State { buildSizedBox(), TextFormField( keyboardType: TextInputType.number, + // style: TextStyle(fontSize: 30), decoration: InputDecoration( prefixIcon: Image.asset('assets/images/user_id_icon.png'), hintText: 'Enter ID', diff --git a/lib/widgets/auth/verfiy_account.dart b/lib/widgets/auth/verfiy_account.dart index 9e1732ad..8e248427 100644 --- a/lib/widgets/auth/verfiy_account.dart +++ b/lib/widgets/auth/verfiy_account.dart @@ -19,7 +19,7 @@ class VerifyAccount extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ Container( - width: 85, + width:SizeConfig.screenWidth*0.20, child: TextFormField( decoration: InputDecoration( // ts/images/password_icon.png @@ -39,7 +39,7 @@ class VerifyAccount extends StatelessWidget { onChanged: (_) {}, )), Container( - width: 85, + width:SizeConfig.screenWidth*0.20, child: TextFormField( decoration: InputDecoration( // ts/images/password_icon.png @@ -59,7 +59,7 @@ class VerifyAccount extends StatelessWidget { onChanged: (_) {}, )), Container( - width: 85, + width:SizeConfig.screenWidth*0.20, child: TextFormField( decoration: InputDecoration( // ts/images/password_icon.png @@ -79,7 +79,7 @@ class VerifyAccount extends StatelessWidget { onChanged: (_) {}, )), Container( - width: 85, + width:SizeConfig.screenWidth*0.20, child: TextFormField( decoration: InputDecoration( // ts/images/password_icon.png