updare-to-3.32.sultan
Aamir Muhammad 3 months ago
parent 297eef9558
commit 2346195844

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

@ -56,7 +56,7 @@ class _ExceptionBottomSheetState extends State<ExceptionBottomSheet> {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
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(
onTap: () {
Navigator.of(context).pop();
@ -72,25 +72,20 @@ class _ExceptionBottomSheetState extends State<ExceptionBottomSheet> {
Row(
children: [
Expanded(
child: Padding(
padding: const EdgeInsets.only(right: 8),
child: CustomButton(
text: TranslationBase.of(context).cancel,
onPressed: widget.onCancelPressed != null
? widget.onCancelPressed!
: () {
Navigator.of(context).pop();
},
backgroundColor: CustomColors.bgRedLightColor,
borderColor: CustomColors.bgRedLightColor,
textColor: CustomColors.bgRedColor,
icon: "assets/images/svg/cancel.svg",
),
child: CustomButton(
text: TranslationBase.of(context).cancel,
onPressed: widget.onCancelPressed != null
? widget.onCancelPressed!
: () {
Navigator.of(context).pop();
},
backgroundColor: CustomColors.bgRedLightColor,
borderColor: CustomColors.bgRedLightColor,
textColor: CustomColors.bgRedColor,
icon: "assets/images/svg/cancel.svg",
),
),
SizedBox(
width: 16,
),
SizedBox(width: MediaQuery.of(context).size.width * 0.05),
Expanded(
child: CustomButton(
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/font_utils.dart';
import 'package:hmg_patient_app/widgets/text/app_texts_widget.dart';
import 'package:smooth_corner/smooth_corner.dart';
class GenericBottomSheet extends StatefulWidget {
String? countryCode;
@ -86,7 +87,8 @@ class _GenericBottomSheetState extends State<GenericBottomSheet> {
? TranslationBase.of(context).enterEmail
: TranslationBase.of(context).enterPhoneNumber,
fontSize: 28,
letterSpacing: -2,
letterSpacing: -1,
height: 1.33,
color: Color(0xFF2E3039),
fontWeight: FontWeight.w600),
),
@ -100,7 +102,7 @@ class _GenericBottomSheetState extends State<GenericBottomSheet> {
)),
],
),
const SizedBox(height: 10),
const SizedBox(height: 8),
// Subtitle
AppText(
widget.isFromSavedLogin
@ -109,9 +111,9 @@ class _GenericBottomSheetState extends State<GenericBottomSheet> {
? TranslationBase.of(context).enterEmailDesc
: TranslationBase.of(context).enterPhoneDesc,
fontSize: 16,
height: 1.33,
color: Color(0xFF2E3039),
fontWeight: FontWeight.w500),
const SizedBox(height: 10),
if (widget.isFromSavedLogin)
...[]
@ -120,35 +122,6 @@ class _GenericBottomSheetState extends State<GenericBottomSheet> {
? Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
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(
textDirection: TextDirection.ltr,
child: newInputWidget(
@ -218,7 +191,7 @@ class CustomButton extends StatelessWidget {
this.borderColor = const Color(0xFFED1C2B),
this.textColor = Colors.white,
this.borderRadius = 12,
this.borderWidth = 1,
this.borderWidth = 2,
this.padding = const EdgeInsets.fromLTRB(8, 10, 8, 10),
this.fontSize = 16,
this.fontFamily,
@ -230,44 +203,50 @@ class CustomButton extends StatelessWidget {
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: isDisabled ? null : onPressed,
child: Container(
height: 56,
decoration: BoxDecoration(
color: isDisabled ? backgroundColor.withOpacity(0.5) : backgroundColor,
borderRadius: BorderRadius.circular(borderRadius),
border: Border.all(
color: isDisabled ? borderColor.withOpacity(0.5) : borderColor,
width: borderWidth,
onTap: isDisabled ? null : onPressed,
child: Container(
height: 56,
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: isDisabled ? backgroundColor.withOpacity(0.5) : backgroundColor,
borderRadius: borderRadius,
),
),
child: Padding(
padding: padding,
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
if (icon != null)
Padding(
padding: const EdgeInsets.only(right: 8.0),
child: SvgPicture.asset(
icon!,
width: 24,
height: 24,
child: Padding(
padding: padding,
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
if (icon != null)
Padding(
padding: const EdgeInsets.only(right: 8.0),
child: SvgPicture.asset(
icon!,
width: 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,
appBarIcons: [],
dropDownList: [],
extendBody: true,
resizeToAvoidBottomInset: true,
dropDownIndexChange: (value) {
Utils.changeAppLanguage(context: context);
@ -166,7 +168,7 @@ class _RegisterNew extends State<RegisterNew> {
textScaler: TextScaler.linear(MediaQuery.textScalerOf(context).scale(1)),
style: context.dynamicTextStyle(
fontSize: 28,
fontWeight: FontWeight.bold,
fontWeight: FontWeight.w600,
color: Color(0xff2B353E),
letterSpacing: -0.4,
height: 40 / 28,

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

@ -160,7 +160,7 @@ class _WelcomeLogin extends State<WelcomeLogin> {
TranslationBase.of(context).welcomeToDrSulaiman,
style: context.dynamicTextStyle(
fontSize: 28,
fontWeight: FontWeight.bold,
fontWeight: FontWeight.w600,
color: Color(0xff2B353E),
letterSpacing: -0.4,
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:provider/provider.dart';
import 'package:smooth_corner/smooth_corner.dart';
import 'package:url_launcher/url_launcher.dart';
import '../Constants.dart';
@ -1403,3 +1404,23 @@ extension MaritalStatusTypeExtension on MaritalStatusType {
}),
))).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);
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 {
return Stack(clipBehavior: Clip.none, children: [

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

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

@ -68,6 +68,7 @@ dependencies:
# hijri_gregorian_calendar:
# path: /Users/aamir/StudioProjects/hijri_gregorian_calendar
hijri_gregorian_calendar: ^0.0.4
smooth_corner: ^1.1.1
# Qr code Scanner
location: ^8.0.1

Loading…
Cancel
Save