merge-update-with-lab-changes
Aamir Muhammad 7 months ago committed by haroon amjad
parent c3b8ec6067
commit 24a4020f5c

@ -29,8 +29,8 @@ const Map localizedValues = {
'language': {'en': 'App Language', 'ar': 'لغة التطبيق'}, 'language': {'en': 'App Language', 'ar': 'لغة التطبيق'},
'lanEnglish': {'en': 'English', 'ar': 'English'}, 'lanEnglish': {'en': 'English', 'ar': 'English'},
'lanArabic': {'en': 'العربية', 'ar': 'العربية'}, 'lanArabic': {'en': 'العربية', 'ar': 'العربية'},
'cancel': {'en': 'CANCEL', 'ar': 'الغاء'}, 'cancel': {'en': 'Cancel', 'ar': 'الغاء'},
'done': {'en': 'DONE', 'ar': 'تأكيد'}, 'done': {'en': 'Done', 'ar': 'تأكيد'},
'replay2': {'en': 'Replay', 'ar': 'رد الطبيب'}, 'replay2': {'en': 'Replay', 'ar': 'رد الطبيب'},
'home': {'en': 'Home', 'ar': 'الرئيسية'}, 'home': {'en': 'Home', 'ar': 'الرئيسية'},
'services': {'en': 'SERVICES', 'ar': 'الخدمات'}, 'services': {'en': 'SERVICES', 'ar': 'الخدمات'},

@ -56,7 +56,7 @@ class _ExceptionBottomSheetState extends State<ExceptionBottomSheet> {
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
AppText(TranslationBase.of(context).notice, fontSize: 28, letterSpacing: -2, color: Color(0xFF2E3039), fontWeight: FontWeight.w600), AppText(TranslationBase.of(context).notice, fontSize: 28, letterSpacing: -1, color: Color(0xFF2E3039), fontWeight: FontWeight.w600),
InkWell( InkWell(
onTap: () { onTap: () {
Navigator.of(context).pop(); Navigator.of(context).pop();
@ -72,25 +72,20 @@ class _ExceptionBottomSheetState extends State<ExceptionBottomSheet> {
Row( Row(
children: [ children: [
Expanded( Expanded(
child: Padding( child: CustomButton(
padding: const EdgeInsets.only(right: 8), text: TranslationBase.of(context).cancel,
child: CustomButton( onPressed: widget.onCancelPressed != null
text: TranslationBase.of(context).cancel, ? widget.onCancelPressed!
onPressed: widget.onCancelPressed != null : () {
? widget.onCancelPressed! Navigator.of(context).pop();
: () { },
Navigator.of(context).pop(); backgroundColor: CustomColors.bgRedLightColor,
}, borderColor: CustomColors.bgRedLightColor,
backgroundColor: CustomColors.bgRedLightColor, textColor: CustomColors.bgRedColor,
borderColor: CustomColors.bgRedLightColor, icon: "assets/images/svg/cancel.svg",
textColor: CustomColors.bgRedColor,
icon: "assets/images/svg/cancel.svg",
),
), ),
), ),
SizedBox( SizedBox(width: MediaQuery.of(context).size.width * 0.05),
width: 16,
),
Expanded( Expanded(
child: CustomButton( child: CustomButton(
text: widget.showCancel ? TranslationBase.of(context).confirm : TranslationBase.of(context).ok, text: widget.showCancel ? TranslationBase.of(context).confirm : TranslationBase.of(context).ok,

@ -8,6 +8,7 @@ import 'package:hmg_patient_app/uitl/translations_delegate_base.dart';
import 'package:hmg_patient_app/uitl/utils.dart'; import 'package:hmg_patient_app/uitl/utils.dart';
import 'package:hmg_patient_app/uitl/font_utils.dart'; import 'package:hmg_patient_app/uitl/font_utils.dart';
import 'package:hmg_patient_app/widgets/text/app_texts_widget.dart'; import 'package:hmg_patient_app/widgets/text/app_texts_widget.dart';
import 'package:smooth_corner/smooth_corner.dart';
class GenericBottomSheet extends StatefulWidget { class GenericBottomSheet extends StatefulWidget {
String? countryCode; String? countryCode;
@ -86,7 +87,8 @@ class _GenericBottomSheetState extends State<GenericBottomSheet> {
? TranslationBase.of(context).enterEmail ? TranslationBase.of(context).enterEmail
: TranslationBase.of(context).enterPhoneNumber, : TranslationBase.of(context).enterPhoneNumber,
fontSize: 28, fontSize: 28,
letterSpacing: -2, letterSpacing: -1,
height: 1.33,
color: Color(0xFF2E3039), color: Color(0xFF2E3039),
fontWeight: FontWeight.w600), fontWeight: FontWeight.w600),
), ),
@ -100,7 +102,7 @@ class _GenericBottomSheetState extends State<GenericBottomSheet> {
)), )),
], ],
), ),
const SizedBox(height: 10), const SizedBox(height: 8),
// Subtitle // Subtitle
AppText( AppText(
widget.isFromSavedLogin widget.isFromSavedLogin
@ -109,9 +111,9 @@ class _GenericBottomSheetState extends State<GenericBottomSheet> {
? TranslationBase.of(context).enterEmailDesc ? TranslationBase.of(context).enterEmailDesc
: TranslationBase.of(context).enterPhoneDesc, : TranslationBase.of(context).enterPhoneDesc,
fontSize: 16, fontSize: 16,
height: 1.33,
color: Color(0xFF2E3039), color: Color(0xFF2E3039),
fontWeight: FontWeight.w500), fontWeight: FontWeight.w500),
const SizedBox(height: 10),
if (widget.isFromSavedLogin) if (widget.isFromSavedLogin)
...[] ...[]
@ -120,35 +122,6 @@ class _GenericBottomSheetState extends State<GenericBottomSheet> {
? Column( ? Column(
crossAxisAlignment: CrossAxisAlignment.stretch, crossAxisAlignment: CrossAxisAlignment.stretch,
children: [ children: [
// Directionality(
// textDirection: TextDirection.ltr,
// child: newInputWidget(
// labelText: widget.isForEmail ? TranslationBase.of(context).email : TranslationBase.of(context).phoneNumber,
// hintText: widget.isForEmail ? "demo@gmail.com" : "5xxxxxxxx",
// controller: widget.textController,
// padding: const EdgeInsets.only(top: 8, bottom: 8, left: 8, right: 8),
// keyboardType: widget.isForEmail ? TextInputType.emailAddress : TextInputType.number,
// onChange: (value) {
// if (value != null) {
// widget.textController?.text = value;
// widget.onChange?.call(value);
// }
// },
// isEnable: true,
// autoFocus: true,
// keepFocus: true,
// refocusOnChange: true,
// isReadOnly: widget.isFromSavedLogin,
// prefix: widget.isForEmail ? null : widget.countryCode,
// hasSelection: false,
// isBorderAllowed: false,
// isAllowLeadingIcon: true,
// countryList: Country.values,
// isCountryDropDown: widget.isEnableCountryDropdown,
// onCountryChange: widget.onCountryChange,
// leadingIcon: widget.isForEmail ? "assets/images/svg/email.svg" : "assets/images/svg/smart-phone.svg",
// ),
// ),
Directionality( Directionality(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
child: newInputWidget( child: newInputWidget(
@ -218,7 +191,7 @@ class CustomButton extends StatelessWidget {
this.borderColor = const Color(0xFFED1C2B), this.borderColor = const Color(0xFFED1C2B),
this.textColor = Colors.white, this.textColor = Colors.white,
this.borderRadius = 12, this.borderRadius = 12,
this.borderWidth = 1, this.borderWidth = 2,
this.padding = const EdgeInsets.fromLTRB(8, 10, 8, 10), this.padding = const EdgeInsets.fromLTRB(8, 10, 8, 10),
this.fontSize = 16, this.fontSize = 16,
this.fontFamily, this.fontFamily,
@ -230,44 +203,50 @@ class CustomButton extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return GestureDetector( return GestureDetector(
onTap: isDisabled ? null : onPressed, onTap: isDisabled ? null : onPressed,
child: Container( child: Container(
height: 56, height: 56,
decoration: BoxDecoration( decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: isDisabled ? backgroundColor.withOpacity(0.5) : backgroundColor, color: isDisabled ? backgroundColor.withOpacity(0.5) : backgroundColor,
borderRadius: BorderRadius.circular(borderRadius), borderRadius: borderRadius,
border: Border.all(
color: isDisabled ? borderColor.withOpacity(0.5) : borderColor,
width: borderWidth,
), ),
), child: Padding(
child: Padding( padding: padding,
padding: padding, child: Row(
child: Row( crossAxisAlignment: CrossAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center, children: [
children: [ if (icon != null)
if (icon != null) Padding(
Padding( padding: const EdgeInsets.only(right: 8.0),
padding: const EdgeInsets.only(right: 8.0), child: SvgPicture.asset(
child: SvgPicture.asset( icon!,
icon!, width: 24,
width: 24, height: 24,
height: 24, ),
),
Text(
text,
style: context.dynamicTextStyle(
fontSize: fontSize,
color: isDisabled ? textColor.withOpacity(0.5) : textColor,
fontWeight: fontWeight,
), ),
), ),
Text( ],
text, ),
style: context.dynamicTextStyle(
fontSize: fontSize,
color: isDisabled ? textColor.withOpacity(0.5) : textColor,
fontWeight: fontWeight,
),
),
],
), ),
), )
),
); // .toSmoothContainer(
// smoothness: 1,
// side: BorderSide(width: borderWidth, color: backgroundColor),
// borderRadius: BorderRadius.circular(borderRadius * 1.2),
// foregroundDecoration: BoxDecoration(
// color: isDisabled ? backgroundColor.withOpacity(0.5) : Colors.transparent,
// borderRadius: BorderRadius.circular(borderRadius),
// ),
// ),
);
} }
} }

@ -128,6 +128,8 @@ class _RegisterNew extends State<RegisterNew> {
isShowLanguageChanger: true, isShowLanguageChanger: true,
appBarIcons: [], appBarIcons: [],
dropDownList: [], dropDownList: [],
extendBody: true,
resizeToAvoidBottomInset: true, resizeToAvoidBottomInset: true,
dropDownIndexChange: (value) { dropDownIndexChange: (value) {
Utils.changeAppLanguage(context: context); Utils.changeAppLanguage(context: context);
@ -166,7 +168,7 @@ class _RegisterNew extends State<RegisterNew> {
textScaler: TextScaler.linear(MediaQuery.textScalerOf(context).scale(1)), textScaler: TextScaler.linear(MediaQuery.textScalerOf(context).scale(1)),
style: context.dynamicTextStyle( style: context.dynamicTextStyle(
fontSize: 28, fontSize: 28,
fontWeight: FontWeight.bold, fontWeight: FontWeight.w600,
color: Color(0xff2B353E), color: Color(0xff2B353E),
letterSpacing: -0.4, letterSpacing: -0.4,
height: 40 / 28, height: 40 / 28,

@ -104,11 +104,7 @@ class _SavedLogin extends State<SavedLogin> {
// Welcome back text // Welcome back text
Text( Text(
TranslationBase.of(context).welcomeBack, TranslationBase.of(context).welcomeBack,
style: context.dynamicTextStyle( style: context.dynamicTextStyle(fontSize: 16, color: Color(0xFF898A8D), fontWeight: FontWeight.w500, letterSpacing: -0.5),
fontSize: 22,
color: Color(0xFF898A8D),
fontWeight: FontWeight.w500,
),
), ),
const SizedBox(height: 16), const SizedBox(height: 16),
// Names // Names
@ -118,10 +114,10 @@ class _SavedLogin extends State<SavedLogin> {
widget.savedLoginData.name!.toLowerCase().capitalizeFirstofEach, widget.savedLoginData.name!.toLowerCase().capitalizeFirstofEach,
style: context.dynamicTextStyle( style: context.dynamicTextStyle(
fontSize: 26, fontSize: 26,
fontWeight: FontWeight.bold, fontWeight: FontWeight.w600,
color: Color(0xFF2E3039), color: Color(0xFF2E3039),
height: 26 / 36, height: 26 / 36,
letterSpacing: -0.4, letterSpacing: -1,
), ),
), ),
// Text( // Text(
@ -156,7 +152,7 @@ class _SavedLogin extends State<SavedLogin> {
Text( Text(
TranslationBase.of(context).lastloginBy + ' ${getType(widget.savedLoginData.logInType!, context)}', TranslationBase.of(context).lastloginBy + ' ${getType(widget.savedLoginData.logInType!, context)}',
style: context.dynamicTextStyle( style: context.dynamicTextStyle(
fontSize: 16, fontSize: 14,
color: Color(0xFF8F9AA3), color: Color(0xFF8F9AA3),
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
), ),
@ -293,7 +289,7 @@ class _SavedLogin extends State<SavedLogin> {
// int? val = Utils.onOtpBtnPressed(OTPType.whatsapp, phoneNumber, context); // int? val = Utils.onOtpBtnPressed(OTPType.whatsapp, phoneNumber, context);
// if (val != null) checkUserAuthentication(val); // if (val != null) checkUserAuthentication(val);
}, },
backgroundColor: Colors.white, backgroundColor: Colors.transparent,
borderColor: Color(0xFF2E3039), borderColor: Color(0xFF2E3039),
textColor: Color(0xFF2E3039), textColor: Color(0xFF2E3039),
icon: "assets/images/svg/whatsapp.svg", icon: "assets/images/svg/whatsapp.svg",
@ -317,20 +313,6 @@ class _SavedLogin extends State<SavedLogin> {
SizedBox( SizedBox(
height: 20, height: 20,
), ),
// widget.savedLoginData.logInType !=4 ? CustomButton(
// text: "${TranslationBase.of(context).loginBy} ${getType(4, context)}",
// onPressed: () {
// widget.savedLoginData.logInType = 4;
// int? val = widget.savedLoginData.logInType!;
// checkUserAuthentication(val);
// },
// backgroundColor: Colors.white,
// borderColor: Color(0xFF2E3039),
// textColor: Color(0xFF2E3039),
// borderWidth: 2,
// padding: EdgeInsets.fromLTRB(0, 14, 0, 14),
// icon: "assets/images/svg/whatsapp.svg",
// ) : Container(),
], ],
) )
: CustomButton( : CustomButton(
@ -372,7 +354,7 @@ class _SavedLogin extends State<SavedLogin> {
backgroundColor: Color(0xffFEE9EA), backgroundColor: Color(0xffFEE9EA),
borderColor: Color(0xffFEE9EA), borderColor: Color(0xffFEE9EA),
textColor: Color(0xffED1C2B), textColor: Color(0xffED1C2B),
fontSize: 12, fontSize: 16,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
borderRadius: 12, borderRadius: 12,
padding: EdgeInsets.fromLTRB(0, 10, 0, 10), padding: EdgeInsets.fromLTRB(0, 10, 0, 10),
@ -381,7 +363,7 @@ class _SavedLogin extends State<SavedLogin> {
), ),
), ),
SizedBox( SizedBox(
width: 24, width: MediaQuery.of(context).size.width * 0.05,
), ),
Expanded( Expanded(
child: Container( child: Container(
@ -396,7 +378,7 @@ class _SavedLogin extends State<SavedLogin> {
backgroundColor: Color(0xffFEE9EA), backgroundColor: Color(0xffFEE9EA),
borderColor: Color(0xffFEE9EA), borderColor: Color(0xffFEE9EA),
textColor: Color(0xffED1C2B), textColor: Color(0xffED1C2B),
fontSize: 12, fontSize: 15,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
borderRadius: 12, borderRadius: 12,
padding: EdgeInsets.fromLTRB(0, 10, 0, 10), padding: EdgeInsets.fromLTRB(0, 10, 0, 10),

@ -160,7 +160,7 @@ class _WelcomeLogin extends State<WelcomeLogin> {
TranslationBase.of(context).welcomeToDrSulaiman, TranslationBase.of(context).welcomeToDrSulaiman,
style: context.dynamicTextStyle( style: context.dynamicTextStyle(
fontSize: 28, fontSize: 28,
fontWeight: FontWeight.bold, fontWeight: FontWeight.w600,
color: Color(0xff2B353E), color: Color(0xff2B353E),
letterSpacing: -0.4, letterSpacing: -0.4,
height: 40 / 28, height: 40 / 28,

@ -56,6 +56,7 @@ import 'dart:math' show asin, cos, pi, pow, sin, sqrt;
// import 'package:flutter_hms_gms_availability/flutter_hms_gms_availability.dart'; // import 'package:flutter_hms_gms_availability/flutter_hms_gms_availability.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:smooth_corner/smooth_corner.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
import '../Constants.dart'; import '../Constants.dart';
@ -1393,3 +1394,23 @@ extension MaritalStatusTypeExtension on MaritalStatusType {
}), }),
))).values.toList(); ))).values.toList();
*/ */
extension SmoothContainerExtension on ShapeBorder {
ShapeDecoration toSmoothCornerDecoration({
Color color = Colors.transparent,
double? borderRadius,
bool isDisabled = false,
Color? backgroundColor,
BorderSide? side,
}) {
final bgColor = backgroundColor ?? color;
return ShapeDecoration(
color: isDisabled ? bgColor.withOpacity(0.5) : bgColor,
shape: SmoothRectangleBorder(
borderRadius: BorderRadius.circular(borderRadius ?? 0),
smoothness: 1,
side: side ?? BorderSide.none,
),
);
}
}

@ -35,7 +35,7 @@ class _LanguageSelectorState extends State<LanguageSelector> {
print(newLanguage); print(newLanguage);
widget.onLanguageChanged(newLanguage); widget.onLanguageChanged(newLanguage);
}, },
child: SvgPicture.asset("assets/images/svg/globe_black.svg", width: 32), child: SvgPicture.asset("assets/images/svg/globe_black.svg", width: 32, height: 32,),
); );
} else { } else {
return Stack(clipBehavior: Clip.none, children: [ return Stack(clipBehavior: Clip.none, children: [

@ -240,6 +240,7 @@ class _AppScaffoldState extends State<AppScaffold> {
// ? widget.customAppBar != null // ? widget.customAppBar != null
// ? widget.customAppBar // ? widget.customAppBar
extendBodyBehindAppBar: true, extendBodyBehindAppBar: true,
appBar: isUserNotLogin appBar: isUserNotLogin
? null ? null
: widget.isShowPharmacyAppbar : widget.isShowPharmacyAppbar

@ -51,7 +51,7 @@ class _QuickLoginBottomSheet extends State<QuickLoginBottomSheet> {
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: context.dynamicTextStyle( style: context.dynamicTextStyle(
fontSize: 16, fontSize: 16,
fontWeight: FontWeight.bold, fontWeight: FontWeight.w500,
color: Colors.black, color: Colors.black,
), ),
), ),

Loading…
Cancel
Save