From 9602e95fe7b5161a7bd98c06c81a22589bf31b87 Mon Sep 17 00:00:00 2001 From: Sikander Saleem Date: Mon, 19 Dec 2022 09:48:25 +0300 Subject: [PATCH] improvements --- lib/classes/consts.dart | 4 ++-- lib/extensions/widget_extensions.dart | 2 +- lib/ui/profile/personal_info.dart | 13 ++++++------- lib/ui/profile/profile_screen.dart | 17 +++++++---------- lib/ui/profile/widgets/profile_panel.dart | 4 ++-- 5 files changed, 18 insertions(+), 22 deletions(-) diff --git a/lib/classes/consts.dart b/lib/classes/consts.dart index ac520b1..3d58efd 100644 --- a/lib/classes/consts.dart +++ b/lib/classes/consts.dart @@ -2,9 +2,9 @@ import 'package:mohem_flutter_app/ui/marathon/widgets/question_card.dart'; class ApiConsts { //static String baseUrl = "http://10.200.204.20:2801/"; // Local server - static String baseUrl = "https://uat.hmgwebservices.com"; // UAT server + // static String baseUrl = "https://uat.hmgwebservices.com"; // UAT server // static String baseUrl = "https://erptstapp.srca.org.sa"; // SRCA server - // static String baseUrl = "https://hmgwebservices.com"; // Live server + static String baseUrl = "https://hmgwebservices.com"; // Live server static String baseUrlServices = baseUrl + "/Services/"; // server // static String baseUrlServices = "https://api.cssynapses.com/tangheem/"; // Live server static String utilitiesRest = baseUrlServices + "Utilities.svc/REST/"; diff --git a/lib/extensions/widget_extensions.dart b/lib/extensions/widget_extensions.dart index b52ef3e..a52f11a 100644 --- a/lib/extensions/widget_extensions.dart +++ b/lib/extensions/widget_extensions.dart @@ -58,7 +58,7 @@ extension WidgetExtensions on Widget { ), ], ), - alignment: center == true ? Alignment.center : null, + alignment: center ? Alignment.center : null, child: Column( crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.min, diff --git a/lib/ui/profile/personal_info.dart b/lib/ui/profile/personal_info.dart index 79d0995..a4a9700 100644 --- a/lib/ui/profile/personal_info.dart +++ b/lib/ui/profile/personal_info.dart @@ -21,25 +21,24 @@ class PersonalInfo extends StatelessWidget { title: LocaleKeys.profile_personalInformation.tr(), ), backgroundColor: MyColors.backgroundColor, - body: SizedBox( - width: MediaQuery.of(context).size.width, + body: SingleChildScrollView( child: Column( crossAxisAlignment: CrossAxisAlignment.start, - // mainAxisSize: MainAxisSize.min, + mainAxisSize: MainAxisSize.min, mainAxisAlignment: MainAxisAlignment.start, children: [ LocaleKeys.category.tr().toText13(color: MyColors.lightGrayColor), (memberInformationList.eMPLOYMENTCATEGORYMEANING ?? "").toText16(), - 20.height, + 12.height, LocaleKeys.address.tr().toText13(color: MyColors.lightGrayColor), (memberInformationList.lOCATIONNAME ?? "").toText16(), - 20.height, + 12.height, LocaleKeys.phoneNumber.tr().toText13(color: MyColors.lightGrayColor), (memberInformationList.eMPLOYEEMOBILENUMBER ?? "").toText16(), - 20.height, + 12.height, LocaleKeys.businessGroup.tr().toText13(color: MyColors.lightGrayColor), (memberInformationList.bUSINESSGROUPNAME ?? "").toText16(), - 20.height, + 12.height, LocaleKeys.Payroll.tr().toText13(color: MyColors.lightGrayColor), (memberInformationList.pAYROLLNAME ?? "").toText16(), ], diff --git a/lib/ui/profile/profile_screen.dart b/lib/ui/profile/profile_screen.dart index 0a78873..6060cbf 100644 --- a/lib/ui/profile/profile_screen.dart +++ b/lib/ui/profile/profile_screen.dart @@ -1,4 +1,3 @@ -import 'dart:convert'; import 'dart:io'; import 'dart:ui'; @@ -76,15 +75,13 @@ class _ProfileScreenState extends State { Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - IconButton( - onPressed: () { - Navigator.pop(context); - }, - icon: const Icon( - Icons.arrow_back_ios, - color: Colors.white, - ), - ), + CircleAvatar( + radius: 18, + backgroundColor: Colors.black.withOpacity(.21), + child: const Icon(Icons.arrow_back_ios_rounded, color: Colors.white, size: 18).paddingOnly(right: 4), + ).onPress(() { + Navigator.pop(context); + }), InkWell( onTap: () { // startImageSheet(); diff --git a/lib/ui/profile/widgets/profile_panel.dart b/lib/ui/profile/widgets/profile_panel.dart index 440fbb3..3440cc9 100644 --- a/lib/ui/profile/widgets/profile_panel.dart +++ b/lib/ui/profile/widgets/profile_panel.dart @@ -51,8 +51,8 @@ class ProfilePanel extends StatelessWidget { : ClipOval( child: Image.memory( Utils.dataFromBase64String(memberInformationList.eMPLOYEEIMAGE!), - width: 75, - height: 75, + width: 68, + height: 68, fit: BoxFit.fill, ), );