Merge pull request 'haroon_dev' (#351) from haroon_dev into master

Reviewed-on: https://34.17.182.140/Haroon6138/HMG_Patient_App_New/pulls/351
master
Haroon6138 1 day ago
commit 8e9efc57d5

@ -36,7 +36,7 @@ android {
applicationId = "com.cloudsolutions.HMGPatientApp"
// minSdk = 24
minSdk = 29
targetSdk = 35
targetSdk = 36
compileSdk = 36
// targetSdk = flutter.targetSdkVersion
versionCode = flutter.versionCode

@ -0,0 +1,26 @@
<resources>
<color name="payment_sdk_primary_color">#ffffff</color>
<color name="payment_sdk_secondary_color">#ED1C2B</color>
<color name="payment_sdk_status_bar_color">#444647</color>
<color name="payment_sdk_primary_font_color">#2E3039</color>
<color name="payment_sdk_secondary_font_color">#2E3039</color>
<color name="payment_sdk_hint_font_color">#a5a5a5</color>
<color name="payment_sdk_stroke_color">#e1e1e1</color>
<color name="payment_sdk_button_text_color">#FFF</color>
<color name="payment_sdk_title_text_color">#1e1e1e</color>
<color name="payment_sdk_button_background_color">#ED1C2B</color>
<color name="payment_sdk_background_color">#F9FAFD</color>
<color name="payment_sdk_blue_F2FAFD">#F2FAFD</color>
<color name="payment_sdk_error_text_color">#EC2213</color>
<color name="payment_sdk_back_black_dim">#4D6E6E6E</color>
<color name="payment_sdk_input_field_background_color">#FFFFFFFF</color>
<color name="payment_sdk_enabled_switch_track_color">#00000000</color>
<color name="payment_sdk_enabled_switch_handle_color">#3db39e</color>
<color name="payment_sdk_disabled_switch_track_color">#00000000</color>
<color name="payment_sdk_disabled_switch_handle_color">#c7c7c7</color>
<color name="payment_sdk_switch_stroke_color">#4c4c4c</color>
<color name="payment_sdk_amount_font_color">#4c4c4c</color>
<color name="payment_sdk_original_amount_font_color">#a5a5a5</color>
<color name="payment_sdk_billing_header_background_color">#ED1C2B</color>
<color name="payment_sdk_billing_text_color">#FFF</color>
</resources>

@ -1968,5 +1968,6 @@
"notAvailable": "غير متاح",
"hide": "إخفاء",
"viewPatientQR": "عرض رمز الاستجابة السريعة للمريض",
"patientQR": "رمز الاستجابة السريعة للمريض"
"patientQR": "رمز الاستجابة السريعة للمريض",
"forText": "عن"
}

@ -1958,7 +1958,8 @@
"notAvailable": "Not Available",
"hide": "Hide",
"viewPatientQR": "View Patient QR Code",
"patientQR": "Patient QR Code"
"patientQR": "Patient QR Code",
"forText": "For"
}

@ -210,8 +210,8 @@ class ApiClientImp implements ApiClient {
body['TokenID'] = "@dm!n";
}
// body['TokenID'] = "@dm!n";
// body['PatientID'] = 2122445;
body['TokenID'] = "@dm!n";
// body['PatientID'] = 1307867;
// body['PatientID'] = 53320;
// body['PatientTypeID'] = 1;
// body['PatientOutSA'] = 0;

@ -5,7 +5,7 @@ import 'package:hmg_patient_app_new/core/enums.dart';
class ApiConsts {
static const maxSmallScreen = 660;
static AppEnvironmentTypeEnum appEnvironmentType = AppEnvironmentTypeEnum.uat;
static AppEnvironmentTypeEnum appEnvironmentType = AppEnvironmentTypeEnum.prod;
// static String baseUrl = 'https://uat.hmgwebservices.com/'; // HIS API URL UAT

@ -404,6 +404,7 @@ class BookAppointmentsViewModel extends ChangeNotifier {
isWaitingAppointmentSelected = false;
isPatientRescheduleAppointment = false;
bodyTypes = [maleLaserCategory, femaleLaserCategory];
selectedChiefComplaintID = 0;
// getLocation();
notifyListeners();
}
@ -420,14 +421,14 @@ class BookAppointmentsViewModel extends ChangeNotifier {
setIsNearestAppointmentSelected(bool isNearestAppointmentSelected) {
this.isNearestAppointmentSelected = isNearestAppointmentSelected;
if (isNearestAppointmentSelected) {
for (var group in doctorsListGrouped) {
group.sort((a, b) {
var aSlot = a.nearestFreeSlot;
var bSlot = b.nearestFreeSlot;
if (aSlot == null || bSlot == null) return 0;
return DateUtil.convertStringToDate(aSlot).compareTo(DateUtil.convertStringToDate(bSlot));
});
}
// for (var group in doctorsListGrouped) {
// group.sort((a, b) {
// var aSlot = a.nearestFreeSlot;
// var bSlot = b.nearestFreeSlot;
// if (aSlot == null || bSlot == null) return 0;
// return DateUtil.convertStringToDate(aSlot).compareTo(DateUtil.convertStringToDate(bSlot));
// });
// }
} else {
// for (var group in doctorsListGrouped) {
// group.sort((a, b) {

@ -1950,5 +1950,6 @@ abstract class LocaleKeys {
static const hide = 'hide';
static const viewPatientQR = 'viewPatientQR';
static const patientQR = 'patientQR';
static const forText = 'forText';
}

@ -16,6 +16,7 @@ import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/appointments/widgets/region_bottomsheet/region_list_item.dart' show RegionListItem;
import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
import 'package:hmg_patient_app_new/widgets/chip/app_custom_chip_widget.dart';
import 'package:lottie/lottie.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:provider/provider.dart';
@ -117,6 +118,14 @@ class _RegionBottomSheetBodyState extends State<RegionBottomSheetBody> {
height: MediaQuery.of(context).size.height * 0.5,
child: Column(
children: [
// AppCustomChipWidget(
// richText: Row(
// children: [
// "${appState.getAuthenticatedUser()!.age} ".toText10(color: AppColors.blackColor, isBold: true),
// LocaleKeys.yearsOld.tr(context: context).toText10(color: AppColors.blackColor, isBold: true),
// ],
// ),
// ),
// Consumer<AppointmentViaRegionViewmodel>(
// builder: (context, regionVM, _) {
// return Padding(

@ -17,6 +17,9 @@ import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/appbar/app_bar_widget.dart';
import 'package:hmg_patient_app_new/widgets/bottomsheet/generic_bottom_sheet.dart';
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart' show CustomButton;
import 'package:hmg_patient_app_new/widgets/common_bottom_sheet.dart';
import 'package:hmg_patient_app_new/widgets/date_range_selector/date_range_calender.dart';
import 'package:hmg_patient_app_new/widgets/date_range_selector/models/calendar_design_type.dart';
import 'package:hmg_patient_app_new/widgets/dropdown/country_dropdown_widget.dart';
import 'package:hmg_patient_app_new/widgets/input_widget.dart';
import 'package:provider/provider.dart';
@ -153,12 +156,37 @@ class _RegisterNew extends State<RegisterNew> {
},
).withVerticalPadding(8),
Divider(height: 1),
TextInputWidget(
GestureDetector(
onTap: () async {
showCommonBottomSheetWithoutHeight(
title: LocaleKeys.selectDate.tr(context: context),
context,
child: DateRangeSelector(
onRangeSelected: (DateTime? start, DateTime? end) {
if (start != null) {
var picked = start.toString().split(" ").first;
// authVm.dobController.text = picked;
authVm.onDobChange(picked);
// Clear error when user selects a date
authVm.clearDobError();
}
},
designType: CalendarDesignType.designV2,
showCalendarToggle: true,
onCalendarTypeChanged: null,
btnTitle: LocaleKeys.done.tr(context: context),
),
isFullScreen: false,
isCloseButtonVisible: true,
callBackFunc: () {},
);
},
child: TextInputWidget(
labelText: LocaleKeys.dob.tr(context: context),
hintText: "11 July, 1994",
controller: authVm.dobController,
focusNode: _dobFocusNode,
isEnable: true,
isEnable: false,
prefix: null,
isAllowRadius: true,
isBorderAllowed: false,
@ -177,6 +205,7 @@ class _RegisterNew extends State<RegisterNew> {
// Don't show individual field border
errorMessage: authVm.dobError, // Show error message if exists
).withVerticalPadding(8),
),
],
),
),

@ -424,6 +424,7 @@ class _ReviewAppointmentPageState extends State<ReviewAppointmentPage> {
void initiateBookAppointment() async {
// LoadingUtils.showFullScreenLoader(barrierDismissible: true, isSuccessDialog: false, loadingText: bookAppointmentsViewModel.isPatientRescheduleAppointment ? LocaleKeys.reschedulingAppo.tr(context: context) : LocaleKeys.bookingYourAppointment.tr(context: context));
Clarity.sendCustomEvent('Appointment_book_success');
LoaderBottomSheet.showLoader(
loadingText: bookAppointmentsViewModel.isPatientRescheduleAppointment
? LocaleKeys.reschedulingAppo.tr(context: context)
@ -449,6 +450,7 @@ class _ReviewAppointmentPageState extends State<ReviewAppointmentPage> {
callBackFunc: () {
bookAppointmentsViewModel.setIsPatientRescheduleAppointment(false);
bookAppointmentsViewModel.setIsLiveCareSchedule(false);
bookAppointmentsViewModel.setSelectedChiefComplaintID(0);
Navigator.pushAndRemoveUntil(
context,
CustomPageRoute(
@ -524,6 +526,7 @@ class _ReviewAppointmentPageState extends State<ReviewAppointmentPage> {
child: Utils.getSuccessWidget(loadingText: LocaleKeys.appointmentSuccess.tr()).paddingSymmetrical(0.h, 24.h), callBackFunc: () {
bookAppointmentsViewModel.setIsLiveCareSchedule(false);
bookAppointmentsViewModel.setIsPatientRescheduleAppointment(false);
bookAppointmentsViewModel.setSelectedChiefComplaintID(0);
Navigator.pushAndRemoveUntil(context, CustomPageRoute(page: LandingNavigation()), (r) => false);
}, isFullScreen: false, isCloseButtonVisible: false, isAutoDismiss: true);
});

@ -1202,7 +1202,9 @@ class _SelectClinicPageState extends State<SelectClinicPage> {
getTitle(AppointmentViaRegionViewmodel data) {
if (data.selectedRegionId == null) {
return LocaleKeys.selectRegion.tr(context: context).toText20(isBold: true);
return Expanded(
child: "${LocaleKeys.selectRegion.tr(context: context)} ${LocaleKeys.forText.tr(context: context)} '${bookAppointmentsViewModel.selectedClinic.clinicDescription}'".toText20(isBold: true),
);
} else {
return Transform.flip(
flipX: data.isArabic ? true : false,

@ -57,7 +57,8 @@ class _SelectDoctorPageState extends State<SelectDoctorPage> {
} else if (bookAppointmentsViewModel.isGetDocForHealthCal) {
bookAppointmentsViewModel.getDoctorsListByHealthCal();
} else {
bookAppointmentsViewModel.getDoctorsList();
bookAppointmentsViewModel.setIsNearestAppointmentSelected(true);
bookAppointmentsViewModel.getDoctorsList(isNearest: true);
}
}
});

@ -14,8 +14,10 @@ import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/authentication/authentication_view_model.dart';
import 'package:hmg_patient_app_new/features/book_appointments/book_appointments_view_model.dart';
import 'package:hmg_patient_app_new/features/book_appointments/models/resp_models/get_clinic_list_response_model.dart';
import 'package:hmg_patient_app_new/features/book_appointments/models/timeslots.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/book_appointment/dental_chief_complaints_page.dart';
import 'package:hmg_patient_app_new/presentation/book_appointment/review_appointment_page.dart';
import 'package:hmg_patient_app_new/presentation/book_appointment/waiting_appointment/waiting_appointment_info.dart';
import 'package:hmg_patient_app_new/presentation/home/navigation_screen.dart';
@ -95,7 +97,9 @@ class _AppointmentCalendarState extends State<AppointmentCalendar> {
// ),
SizedBox(
height: MediaQuery.of(context).size.height * 0.45,
child: Directionality(
child: Stack(
children: [
Directionality(
textDirection: isArabic ? ui.TextDirection.rtl : ui.TextDirection.ltr,
child: Localizations.override(
context: context,
@ -104,11 +108,12 @@ class _AppointmentCalendarState extends State<AppointmentCalendar> {
child: SfCalendar(
controller: _calendarController,
minDate: DateTime.now(),
showNavigationArrow: true,
// headerHeight: 60.h,
initialDisplayDate: DateUtil.convertStringToDate(bookAppointmentsViewModel.freeSlotsResponse[0]),
showNavigationArrow: false,
headerHeight: 60.h,
headerStyle: CalendarHeaderStyle(
backgroundColor: AppColors.transparent,
textAlign: isArabic ? TextAlign.end : TextAlign.start,
// textAlign: isArabic ? TextAlign.end : TextAlign.start,
textStyle: TextStyle(fontSize: 18.f, fontWeight: FontWeight.w600, letterSpacing: -0.46, color: AppColors.primaryRedColor),
),
viewHeaderStyle: ViewHeaderStyle(
@ -153,6 +158,56 @@ class _AppointmentCalendarState extends State<AppointmentCalendar> {
),
),
),
// Custom Navigation Arrows
Positioned(
top: 0,
right: isArabic ? null : 0,
left: isArabic ? 0 : null,
child: SizedBox(
height: 60.h,
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
// Previous Month Arrow
GestureDetector(
onTap: () {
setState(() {
_calendarController.backward!();
});
},
child: Container(
padding: EdgeInsets.all(8.h),
child: Icon(
// isArabic ? Icons.arrow_forward_ios : Icons.arrow_back_ios,
Icons.arrow_back_ios,
size: 24.h,
color: AppColors.primaryRedColor,
),
),
),
// Next Month Arrow
GestureDetector(
onTap: () {
setState(() {
_calendarController.forward!();
});
},
child: Container(
padding: EdgeInsets.all(8.h),
child: Icon(
// isArabic ? Icons.arrow_back_ios : Icons.arrow_forward_ios,
Icons.arrow_forward_ios,
size: 24.h,
color: AppColors.primaryRedColor,
),
),
),
],
),
),
),
],
),
),
SizedBox(height: 10.h),
Transform.translate(
@ -164,7 +219,7 @@ class _AppointmentCalendarState extends State<AppointmentCalendar> {
? ClarityUnmask(
child: ConstrainedBox(
constraints: BoxConstraints(
maxHeight: MediaQuery.of(context).size.height * 0.15,
maxHeight: MediaQuery.of(context).size.height * 0.25,
minHeight: 0,
),
child: Directionality(
@ -213,8 +268,23 @@ class _AppointmentCalendarState extends State<AppointmentCalendar> {
),
);
} else {
bookAppointmentsViewModel.getAppointmentNearestGate(
projectID: bookAppointmentsViewModel.selectedDoctor.projectID!, clinicID: bookAppointmentsViewModel.selectedDoctor.clinicID!);
if (bookAppointmentsViewModel.selectedClinic.clinicID! == 17 && bookAppointmentsViewModel.selectedChiefComplaintID == 0) {
GetClinicsListResponseModel selectedClinic = GetClinicsListResponseModel(
clinicID: bookAppointmentsViewModel.selectedClinic.clinicID,
clinicDescription: bookAppointmentsViewModel.selectedClinic.clinicDescription,
isLiveCareClinicAndOnline: false,
liveCareServiceID: 0,
liveCareClinicID: 0);
bookAppointmentsViewModel.setProjectID(bookAppointmentsViewModel.selectedDoctor.projectID.toString());
bookAppointmentsViewModel.setSelectedClinic(selectedClinic);
bookAppointmentsViewModel.setIsChiefComplaintsListLoading(true);
Navigator.of(context).push(
CustomPageRoute(
page: DentalChiefComplaintsPage(),
),
);
} else {
bookAppointmentsViewModel.getAppointmentNearestGate(projectID: bookAppointmentsViewModel.selectedDoctor.projectID!, clinicID: bookAppointmentsViewModel.selectedDoctor.clinicID!);
bookAppointmentsViewModel.setSelectedAppointmentDateTime(selectedDate, selectedTime, selectedDateDisplay);
Navigator.of(context).pop();
Navigator.of(context).push(
@ -223,6 +293,7 @@ class _AppointmentCalendarState extends State<AppointmentCalendar> {
),
);
}
}
} else {
showCommonBottomSheetWithoutHeight(
context,
@ -231,8 +302,7 @@ class _AppointmentCalendarState extends State<AppointmentCalendar> {
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Lottie.asset(AppAnimations.errorAnimation,
repeat: true, reverse: false, frameRate: FrameRate(60), width: 100.h, height: 100.h, fit: BoxFit.fill),
Lottie.asset(AppAnimations.errorAnimation, repeat: true, reverse: false, frameRate: FrameRate(60), width: 100.h, height: 100.h, fit: BoxFit.fill),
SizedBox(height: 8.h),
(LocaleKeys.loginToUseService.tr(context: context)).toText16(color: AppColors.blackColor),
SizedBox(height: 16.h),
@ -331,12 +401,7 @@ class _AppointmentCalendarState extends State<AppointmentCalendar> {
selectedButtonIndex = 0;
List<Map<String, dynamic>> timeList = [];
for (var i = 0; i < dayEvents.length; i++) {
Map<String, dynamic> timeSlot = {
"isoTime": dayEvents[i].isoTime,
"start": dayEvents[i].start.toString(),
"end": dayEvents[i].end.toString(),
"vidaDate": dayEvents[i].vidaDate
};
Map<String, dynamic> timeSlot = {"isoTime": dayEvents[i].isoTime, "start": dayEvents[i].start.toString(), "end": dayEvents[i].end.toString(), "vidaDate": dayEvents[i].vidaDate};
timeList.add(timeSlot);
}
if (dayEvents.isNotEmpty) {

@ -253,8 +253,8 @@ class _LandingPageState extends State<LandingPage> {
padding: EdgeInsets.only(
top: (appState.isAuthenticated && !insuranceVM.isInsuranceLoading && insuranceVM.isInsuranceExpired && insuranceVM.isInsuranceExpiryBannerShown)
? (MediaQuery.paddingOf(context).top + 70.h)
: kToolbarHeight + 0.h,
bottom: 24),
: kToolbarHeight + 16.h,
bottom: 24.h),
child: Column(
spacing: 16.h,
children: [

@ -128,7 +128,9 @@ class LargeServiceCard extends StatelessWidget {
),
],
),
);
).onPress(() {
handleOnTap();
});
}
void handleOnTap() {
@ -275,7 +277,9 @@ class FadedLargeServiceCard extends StatelessWidget {
),
],
),
);
).onPress(() {
handleOnTap();
});
}
void handleOnTap() {

@ -41,9 +41,13 @@ class WelcomeWidget extends StatelessWidget {
borderRadius: BorderRadius.circular(30),
child: Row(
mainAxisSize: MainAxisSize.min,
spacing: 8.h,
// spacing: 8.h,
children: [
Icon(Icons.menu, color: AppColors.textColor).onPress(() {
SizedBox(
height: 40.h,
width: 20.w,
child: Icon(Icons.menu, color: AppColors.textColor),
).onPress(() {
getIt.get<ProfileSettingsViewModel>().getProfileSettings();
Navigator.of(context).push(
CustomPageRoute(
@ -92,7 +96,7 @@ class WelcomeWidget extends StatelessWidget {
],
),
],
).expanded,
).paddingOnly(left: 8.h, right: 8.h).expanded,
],
),
),

@ -133,7 +133,6 @@ class _AlphabetScrollPageState extends State<AlphabeticScroll> {
@override
Widget build(BuildContext context) {
return SizedBox(
width: MediaQuery.sizeOf(context).width,
child: Row(
@ -149,7 +148,6 @@ class _AlphabetScrollPageState extends State<AlphabeticScroll> {
],
),
),
SizedBox(
width: 24.w,
height: MediaQuery.sizeOf(context).height-(70.h+ kToolbarHeight+100.h),

File diff suppressed because one or more lines are too long

@ -6,7 +6,7 @@ import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
class CustomButton extends StatelessWidget {
class CustomButton extends StatefulWidget {
final String text;
final String? icon;
final VoidCallback? onPressed;
@ -54,25 +54,61 @@ class CustomButton extends StatelessWidget {
this.applyThemeColor = true,
});
@override
State<CustomButton> createState() => _CustomButtonState();
}
class _CustomButtonState extends State<CustomButton> with SingleTickerProviderStateMixin {
late AnimationController _animationController;
late Animation<double> _scaleAnimation;
@override
void initState() {
super.initState();
_animationController = AnimationController(
duration: const Duration(milliseconds: 80),
vsync: this,
);
_scaleAnimation = Tween<double>(begin: 1.0, end: 0.95).animate(
CurvedAnimation(parent: _animationController, curve: Curves.easeInOut),
);
}
@override
void dispose() {
_animationController.dispose();
super.dispose();
}
Future<void> _playTapAnimation() async {
if (!widget.isDisabled && widget.onPressed != null) {
await _animationController.forward();
_animationController.reverse();
}
}
@override
Widget build(BuildContext context) {
final radius = borderRadius ?? (12.r);
final iconS = iconSize ?? (24.h);
final fontS = fontSize ?? (16.f);
final isButtonDisabled = isDisabled || onPressed == null;
final radius = widget.borderRadius ?? (12.r);
final iconS = widget.iconSize ?? (24.h);
final fontS = widget.fontSize ?? (16.f);
final isButtonDisabled = widget.isDisabled || widget.onPressed == null;
return Semantics(
button: true,
enabled: !isButtonDisabled,
label: text,
hint: isButtonDisabled ? 'Button is disabled' : 'Tap to $text',
label: widget.text,
hint: isButtonDisabled ? 'Button is disabled' : 'Tap to ${widget.text}',
child: GestureDetector(
onTap: isButtonDisabled
? null
: () {
: () async {
// Play tap animation and wait for it to complete
await _playTapAnimation();
// Log button tap to Clarity before executing callback
try {
Clarity.setCustomTag('button_text', text.length > 100 ? text.substring(0, 100) : text);
Clarity.setCustomTag('button_text', widget.text.length > 100 ? widget.text.substring(0, 100) : widget.text);
Clarity.setCustomTag('button_action', 'tap');
Clarity.setCustomTag('button_disabled', 'false');
Clarity.sendCustomEvent('button_tapped');
@ -81,67 +117,73 @@ class CustomButton extends StatelessWidget {
}
// Execute the actual button callback
onPressed?.call();
widget.onPressed?.call();
},
child: AnimatedBuilder(
animation: _scaleAnimation,
builder: (context, child) => Transform.scale(
scale: _scaleAnimation.value,
child: child,
),
child: Container(
height: height == null
height: widget.height == null
? 56.h
: (isFoldable || isTablet)
? height! + 10.h
: height,
width: width,
padding: padding,
? widget.height! + 10.h
: widget.height,
width: widget.width,
padding: widget.padding,
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: isButtonDisabled ? AppColors.inputLabelTextColor.withValues(alpha: 0.3) : backgroundColor,
color: isButtonDisabled ? AppColors.inputLabelTextColor.withValues(alpha: 0.3) : widget.backgroundColor,
borderRadius: radius,
customBorder: BorderRadius.circular(radius),
side: borderSide ?? BorderSide(width: borderWidth.h, color: isButtonDisabled ? Colors.transparent : borderColor)),
side: widget.borderSide ?? BorderSide(width: widget.borderWidth.h, color: isButtonDisabled ? Colors.transparent : widget.borderColor)),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
if (icon != null)
if (widget.icon != null)
Padding(
padding: text.isNotEmpty ? EdgeInsets.only(right: 6.w, left: 6.w) : EdgeInsets.zero,
padding: widget.text.isNotEmpty ? EdgeInsets.only(right: 6.w, left: 6.w) : EdgeInsets.zero,
child: Utils.buildSvgWithAssets(
icon: icon!,
iconColor: isButtonDisabled ? AppColors.greyTextColor : iconColor,
icon: widget.icon!,
iconColor: isButtonDisabled ? AppColors.greyTextColor : widget.iconColor,
isDisabled: isButtonDisabled,
width: iconS,
height: iconS,
applyThemeColor: applyThemeColor),
applyThemeColor: widget.applyThemeColor),
),
if (text.isNotEmpty && icon != null)
if (widget.text.isNotEmpty && widget.icon != null)
Flexible(
child: Text(
text,
overflow: textOverflow ?? TextOverflow.ellipsis,
widget.text,
overflow: widget.textOverflow ?? TextOverflow.ellipsis,
maxLines: 1,
textAlign: TextAlign.center,
style: context.dynamicTextStyle(
fontSize: fontS,
color: isButtonDisabled ? AppColors.greyTextColor : textColor,
color: isButtonDisabled ? AppColors.greyTextColor : widget.textColor,
letterSpacing: 0,
fontWeight: isBold ? FontWeight.w700 : fontWeight,
fontWeight: widget.isBold ? FontWeight.w700 : widget.fontWeight,
),
),
),
if (text.isNotEmpty && icon == null)
if (widget.text.isNotEmpty && widget.icon == null)
Text(
text,
overflow: textOverflow ?? TextOverflow.ellipsis,
widget.text,
overflow: widget.textOverflow ?? TextOverflow.ellipsis,
maxLines: 1,
textAlign: TextAlign.center,
style: context.dynamicTextStyle(
fontSize: fontS,
color: isButtonDisabled ? AppColors.greyTextColor : textColor,
color: isButtonDisabled ? AppColors.greyTextColor : widget.textColor,
letterSpacing: 0,
fontWeight: isBold ? FontWeight.w700 : fontWeight,
fontWeight: widget.isBold ? FontWeight.w700 : widget.fontWeight,
),
),
],
),
)),
);
));
}
}

@ -104,7 +104,7 @@ dependencies:
scrollable_positioned_list: ^0.3.8
in_app_review: ^2.0.11
flutter_paytabs_bridge: ^2.7.13
flutter_paytabs_bridge: ^2.7.14
clarity_flutter: 1.9.0
flutter_amazonpaymentservices: ^0.0.13
screen_brightness: ^1.0.1

Loading…
Cancel
Save