Merge branch 'fix_login_design' into 'development'

fix colors issues

See merge request Cloud_Solution/diplomatic-quarter!257
merge-requests/256/merge
Mohammad Aljammal 4 years ago
commit f1f28f5ed0

@ -21,6 +21,7 @@ import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart'; import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/otp/sms-popup.dart'; import 'package:diplomaticquarterapp/widgets/otp/sms-popup.dart';
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
@ -109,11 +110,11 @@ class _ConfirmLogin extends State<ConfirmLogin> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Image.asset( Image.asset(
'assets/images/DQ/dq_logo_icon.png', 'assets/images/DQ/logo.png',
height: 90, height: 90,
width: 90, width: 90,
), ),
AppText( Texts(
TranslationBase.of(context).welcomeBack + TranslationBase.of(context).welcomeBack +
' ' + ' ' +
user.name, user.name,
@ -122,7 +123,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
SizedBox( SizedBox(
height: 20, height: 20,
), ),
AppText( Texts(
TranslationBase.of(context).accountInfo, TranslationBase.of(context).accountInfo,
fontSize: SizeConfig.textMultiplier * 2.5, fontSize: SizeConfig.textMultiplier * 2.5,
), ),
@ -173,17 +174,17 @@ class _ConfirmLogin extends State<ConfirmLogin> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Image.asset( Image.asset(
'assets/images/DQ/dq_logo_icon.png', 'assets/images/DQ/logo.png',
height: 90, height: 90,
width: 90, width: 90,
), ),
this.onlySMSBox == false this.onlySMSBox == false
? AppText( ? Texts(
TranslationBase.of(context).verifyLoginWith, TranslationBase.of(context).verifyLoginWith,
fontSize: SizeConfig.textMultiplier * 3.5, fontSize: SizeConfig.textMultiplier * 3.5,
textAlign: TextAlign.left, textAlign: TextAlign.left,
) )
: AppText( : Texts(
TranslationBase.of(context) TranslationBase.of(context)
.verifyFingerprint2, .verifyFingerprint2,
fontSize: SizeConfig.textMultiplier * 2.5, fontSize: SizeConfig.textMultiplier * 2.5,
@ -634,7 +635,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
return InkWell( return InkWell(
onTap: () => {authenticateUser(4, true)}, onTap: () => {authenticateUser(4, true)},
child: RoundedContainer( child: RoundedContainer(
height: 140, height: 150,
borderColor: Colors.grey, borderColor: Colors.grey,
showBorder: true, showBorder: true,
child: Padding( child: Padding(
@ -649,7 +650,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
SizedBox( SizedBox(
height: 20, height: 20,
), ),
AppText( Texts(
TranslationBase.of(context).verifyWhatsApp, TranslationBase.of(context).verifyWhatsApp,
fontSize: SizeConfig.textMultiplier * 2, fontSize: SizeConfig.textMultiplier * 2,
) )
@ -661,7 +662,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
return InkWell( return InkWell(
onTap: () => {authenticateUser(1, true)}, onTap: () => {authenticateUser(1, true)},
child: RoundedContainer( child: RoundedContainer(
height: 140, height: 150,
borderColor: Colors.grey, borderColor: Colors.grey,
showBorder: true, showBorder: true,
child: Padding( child: Padding(
@ -681,7 +682,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
: SizedBox( : SizedBox(
height: 20, height: 20,
), ),
AppText( Texts(
TranslationBase.of(context).verifySMS, TranslationBase.of(context).verifySMS,
fontSize: projectViewModel.isArabic fontSize: projectViewModel.isArabic
? SizeConfig.textMultiplier * 1.8 ? SizeConfig.textMultiplier * 1.8
@ -696,7 +697,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
return InkWell( return InkWell(
onTap: () => {authenticateUser(2, BiometricType.fingerprint.index)}, onTap: () => {authenticateUser(2, BiometricType.fingerprint.index)},
child: RoundedContainer( child: RoundedContainer(
height: 140, height: 150,
backgroundColor: BiometricType.fingerprint.index == 1 backgroundColor: BiometricType.fingerprint.index == 1
? Colors.white ? Colors.white
: Colors.white.withOpacity(.7), : Colors.white.withOpacity(.7),
@ -714,7 +715,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
SizedBox( SizedBox(
height: 20, height: 20,
), ),
AppText( Texts(
TranslationBase.of(context).verifyFingerprint, TranslationBase.of(context).verifyFingerprint,
fontSize: SizeConfig.textMultiplier * 2, fontSize: SizeConfig.textMultiplier * 2,
) )
@ -726,7 +727,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
return InkWell( return InkWell(
onTap: () => {authenticateUser(3, BiometricType.face.index)}, onTap: () => {authenticateUser(3, BiometricType.face.index)},
child: RoundedContainer( child: RoundedContainer(
height: 140, height: 150,
backgroundColor: checkIfBiometricAvailable(BiometricType.face) backgroundColor: checkIfBiometricAvailable(BiometricType.face)
? Colors.white ? Colors.white
: Colors.white.withOpacity(.7), : Colors.white.withOpacity(.7),
@ -745,7 +746,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
SizedBox( SizedBox(
height: 20, height: 20,
), ),
AppText( Texts(
TranslationBase.of(context).verifyFaceID, TranslationBase.of(context).verifyFaceID,
fontSize: SizeConfig.textMultiplier * 2, fontSize: SizeConfig.textMultiplier * 2,
) )
@ -762,7 +763,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
}) })
}, },
child: RoundedContainer( child: RoundedContainer(
height: 140, height: 150,
backgroundColor: BiometricType.fingerprint.index == 1 backgroundColor: BiometricType.fingerprint.index == 1
? Colors.white ? Colors.white
: Colors.white.withOpacity(.7), : Colors.white.withOpacity(.7),
@ -774,7 +775,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
children: <Widget>[ children: <Widget>[
Image.asset( Image.asset(
'assets/images/login/more_icon.png', 'assets/images/login/more_icon.png',
height: SizeConfig.imageSizeMultiplier * 13, height: 45,
width: SizeConfig.imageSizeMultiplier * 16, width: SizeConfig.imageSizeMultiplier * 16,
), ),
projectViewModel.isArabic projectViewModel.isArabic
@ -784,9 +785,9 @@ class _ConfirmLogin extends State<ConfirmLogin> {
: SizedBox( : SizedBox(
height: 10, height: 10,
), ),
AppText( Texts(
TranslationBase.of(context).moreVerification, TranslationBase.of(context).moreVerification,
fontSize: SizeConfig.textMultiplier * 2, fontSize: SizeConfig.textMultiplier * 1.8,
textAlign: TextAlign.center, textAlign: TextAlign.center,
) )
], ],

@ -18,6 +18,7 @@ import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/input/text_field.dart'; import 'package:diplomaticquarterapp/widgets/input/text_field.dart';
import 'package:diplomaticquarterapp/widgets/mobile-no/mobile_no.dart'; import 'package:diplomaticquarterapp/widgets/mobile-no/mobile_no.dart';
@ -29,6 +30,8 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import '../../Constants.dart';
class Login extends StatefulWidget { class Login extends StatefulWidget {
@override @override
_Login createState() => _Login(); _Login createState() => _Login();
@ -82,7 +85,7 @@ class _Login extends State<Login> {
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
flex: 2, flex: 2,
child: AppText( child: Texts(
TranslationBase.of(context).enterNationalId, TranslationBase.of(context).enterNationalId,
fontSize: SizeConfig.textMultiplier * 3.5, fontSize: SizeConfig.textMultiplier * 3.5,
textAlign: TextAlign.start, textAlign: TextAlign.start,
@ -92,7 +95,9 @@ class _Login extends State<Login> {
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly, mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[ children: <Widget>[
MobileNo(onNumberChange: (value) => {mobileNo = value, validateForm()}, onCountryChange: (value) => countryCode = value), Directionality(
textDirection: TextDirection.ltr,
child: MobileNo(onNumberChange: (value) => {mobileNo = value, validateForm()}, onCountryChange: (value) => countryCode = value)),
Directionality( Directionality(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
child: Container( child: Container(
@ -105,7 +110,7 @@ class _Login extends State<Login> {
loginType == 1 loginType == 1
? Icons.chrome_reader_mode ? Icons.chrome_reader_mode
: Icons.receipt, : Icons.receipt,
color: Color(0xFF40ACC9)), color: secondaryColor),
padding: EdgeInsets.only( padding: EdgeInsets.only(
top: 20, bottom: 20, left: 10, right: 10), top: 20, bottom: 20, left: 10, right: 10),
hintText: loginType == 1 hintText: loginType == 1

@ -3,6 +3,8 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import '../../Constants.dart';
// OWNER : Ibrahim albitar // OWNER : Ibrahim albitar
// DATE : 12-04-2020 // DATE : 12-04-2020
// DESCRIPTION : Customization for Texts in app // DESCRIPTION : Customization for Texts in app
@ -102,7 +104,7 @@ class _MobileNo extends State<MobileNo> {
flex: 1, flex: 1,
child: Icon( child: Icon(
Icons.phone, Icons.phone,
color: Color(0xFF40ACC9), color: secondaryColor,
)), )),
Expanded( Expanded(
flex: 1, flex: 1,

@ -20,17 +20,17 @@ class NotAutPage extends StatefulWidget {
final List<String> infoList; final List<String> infoList;
final List<ImagesInfo> imagesInfo; final List<ImagesInfo> imagesInfo;
NotAutPage({@required this.title, @required this.description, this.infoList, this.imagesInfo}); NotAutPage(
{@required this.title,
@required this.description,
this.infoList,
this.imagesInfo});
@override @override
_NotAutPageState createState() => _NotAutPageState(); _NotAutPageState createState() => _NotAutPageState();
} }
class _NotAutPageState extends State<NotAutPage> { class _NotAutPageState extends State<NotAutPage> {
int _current = 0;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
@ -47,7 +47,6 @@ class _NotAutPageState extends State<NotAutPage> {
bold: true, bold: true,
color: Color(0xff60686b), color: Color(0xff60686b),
), ),
SizedBox( SizedBox(
height: 12, height: 12,
), ),
@ -63,7 +62,7 @@ class _NotAutPageState extends State<NotAutPage> {
if (widget.infoList != null) if (widget.infoList != null)
...List.generate( ...List.generate(
widget.infoList.length, widget.infoList.length,
(index) => Container( (index) => Container(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
@ -76,14 +75,21 @@ class _NotAutPageState extends State<NotAutPage> {
borderRadius: BorderRadius.circular(20), borderRadius: BorderRadius.circular(20),
color: Theme.of(context).primaryColor), color: Theme.of(context).primaryColor),
child: Center( child: Center(
child: Texts('${index+1}',color: Colors.white,), child: Texts(
'${index + 1}',
color: Colors.white,
),
), ),
), ),
SizedBox(width: 6,), SizedBox(
width: 6,
),
Expanded(child: Texts('${widget.infoList[index]}')) Expanded(child: Texts('${widget.infoList[index]}'))
], ],
), ),
SizedBox(height: 12,), SizedBox(
height: 12,
),
], ],
), ),
), ),
@ -91,34 +97,40 @@ class _NotAutPageState extends State<NotAutPage> {
SizedBox( SizedBox(
height: 22, height: 22,
), ),
if(!projectViewModel.isInternetConnection) if (!projectViewModel.isInternetConnection)
Center( Center(
child: SizedBox( child: SizedBox(
height: MediaQuery.of(context).size.height * 0.55, height: MediaQuery.of(context).size.height * 0.55,
width: MediaQuery.of(context).size.width * 0.50, width: MediaQuery.of(context).size.width * 0.50,
child: Image.asset(projectViewModel.isArabic child: Image.asset(projectViewModel.isArabic
? 'assets/images/Wifi-AR.png' ? 'assets/images/Wifi-AR.png'
: 'assets/images/wifi-EN.png'), : 'assets/images/wifi-EN.png'),
),
), ),
), if (projectViewModel.isInternetConnection &&
if(projectViewModel.isInternetConnection && widget.imagesInfo!=null) widget.imagesInfo != null)
CarouselSlider( CarouselSlider(
items: widget.imagesInfo.map((image) { items: widget.imagesInfo.map((image) {
return Builder( return Builder(
builder: (BuildContext context){ builder: (BuildContext context) {
return SizedBox( return SizedBox(
width: MediaQuery.of(context).size.width * 0.50, width: MediaQuery.of(context).size.width * 0.50,
child: image.isAsset? Image.asset(projectViewModel.isArabic ? image.imageAr : image.imageEn) : Image.network(projectViewModel.isArabic ? image.imageAr : image.imageEn)); child: image.isAsset
? Image.asset(projectViewModel.isArabic
? image.imageAr
: image.imageEn)
: Image.network(projectViewModel.isArabic
? image.imageAr
: image.imageEn));
}, },
); );
}).toList(), }).toList(),
options: CarouselOptions( options: CarouselOptions(
height: MediaQuery.of(context).size.height * 0.55, height: MediaQuery.of(context).size.height * 0.55,
autoPlay: widget.imagesInfo.length>1, autoPlay: widget.imagesInfo.length > 1,
viewportFraction: 1.0, viewportFraction: 1.0,
), ),
), ),
SizedBox( SizedBox(
height: 77, height: 77,
), ),
@ -133,7 +145,7 @@ class _NotAutPageState extends State<NotAutPage> {
Container( Container(
width: MediaQuery.of(context).size.width * 0.9, width: MediaQuery.of(context).size.width * 0.9,
child: SecondaryButton( child: SecondaryButton(
onTap: (){ onTap: () {
loginCheck(context); loginCheck(context);
}, },
label: TranslationBase.of(context).serviceInformationButton, label: TranslationBase.of(context).serviceInformationButton,
@ -145,7 +157,7 @@ class _NotAutPageState extends State<NotAutPage> {
); );
} }
loginCheck(context) async{ loginCheck(context) async {
var data = await sharedPref.getObject(IMEI_USER_DATA); var data = await sharedPref.getObject(IMEI_USER_DATA);
sharedPref.remove(REGISTER_DATA_FOR_LOGIIN); sharedPref.remove(REGISTER_DATA_FOR_LOGIIN);
if (data != null) { if (data != null) {

Loading…
Cancel
Save