updare-to-3.32.sultan
Aamir Muhammad 4 months ago
parent 0ac06092c2
commit f0a80f7a25

@ -0,0 +1,4 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12.76 25.0971C13.0133 25.0971 13.2667 25.0037 13.4667 24.8037C13.8533 24.4171 13.8533 23.7771 13.4667 23.3904L6.08 16.0037L13.4667 8.61708C13.8533 8.23042 13.8533 7.59042 13.4667 7.20375C13.08 6.81708 12.44 6.81708 12.0533 7.20375L3.96 15.2971C3.57333 15.6837 3.57333 16.3237 3.96 16.7104L12.0533 24.8037C12.2533 25.0037 12.5067 25.0971 12.76 25.0971Z" fill="#2E3039"/>
<path d="M4.89333 17.0037H27.3333C27.88 17.0037 28.3333 16.5504 28.3333 16.0037C28.3333 15.4571 27.88 15.0037 27.3333 15.0037H4.89333C4.34666 15.0037 3.89333 15.4571 3.89333 16.0037C3.89333 16.5504 4.34666 17.0037 4.89333 17.0037Z" fill="#2E3039"/>
</svg>

After

Width:  |  Height:  |  Size: 732 B

@ -29,63 +29,71 @@ class _GenericBottomSheetState extends State<GenericBottomSheet> {
@override
Widget build(BuildContext context) {
return Container(
padding: const EdgeInsets.all(24),
decoration: BoxDecoration(
color: Color(0xFFF8F8FA),
borderRadius: const BorderRadius.vertical(top: Radius.circular(16)),
),
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
// Title
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
return SafeArea(
child: GestureDetector(
onTap: () {
FocusScope.of(context).unfocus(); // Dismiss the keyboard when tapping outside
},
child: Container(
padding: const EdgeInsets.all(24),
decoration: BoxDecoration(
color: Color(0xFFF8F8FA),
borderRadius: const BorderRadius.vertical(top: Radius.circular(16)),
),
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
AppText(widget.isForEmail ? "Enter Email Address" : "Enter Phone Number",
fontSize: 28, letterSpacing: -2, fontFamily: context.fontFamily, color: Color(0xFF2E3039), fontWeight: FontWeight.w600),
InkWell(
onTap: () {
Navigator.of(context).pop();
},
child: SvgPicture.asset("assets/images/svg/cross-circle.svg", width: 24, height: 24)),
// Title
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
AppText(widget.isForEmail ? "Enter Email Address" : "Enter Phone Number",
fontSize: 28, letterSpacing: -2, fontFamily: context.fontFamily, color: Color(0xFF2E3039), fontWeight: FontWeight.w600),
InkWell(
onTap: () {
Navigator.of(context).pop();
},
child: SvgPicture.asset("assets/images/svg/cross-circle.svg", width: 24, height: 24)),
],
),
const SizedBox(height: 10),
// Subtitle
AppText(widget.isForEmail ? "Enter your email address to complete the process of creating a medical file" : "Enter your phone number to receive OTP verification code",
fontSize: 16, fontFamily: context.fontFamily, color: Color(0xFF2E3039), fontWeight: FontWeight.w500),
const SizedBox(height: 10),
widget.textController != null
? Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Directionality(
textDirection: TextDirection.ltr,
child: newInputWidget(
widget.isForEmail ? TranslationBase.of(context).email : TranslationBase.of(context).phoneNumber,
widget.isForEmail ? "demo@gmail.com" : "5xxxxxxxx",
widget.textController!,
padding: EdgeInsets.only(top: 8, bottom: 8, left: 8, right: 8),
keyboardType: widget.isForEmail ? TextInputType.emailAddress : TextInputType.number,
onChange: (value) {
widget.textController!.text = value!;
},
isEnable: true,
prefix: widget.isForEmail ? null : widget.countryCode,
hasSelection: false,
isBorderAllowed: false,
isAllowLeadingIcon: true,
leadingIcon: widget.isForEmail ? "assets/images/svg/email.svg" : "assets/images/svg/smart-phone.svg",
),
),
],
)
: SizedBox(),
SizedBox(height: 24),
...widget.buttons,
],
),
const SizedBox(height: 10),
// Subtitle
AppText(widget.isForEmail ? "Enter your email address to complete the process of creating a medical file" : "Enter your phone number to receive OTP verification code",
fontSize: 16, fontFamily: context.fontFamily, color: Color(0xFF2E3039), fontWeight: FontWeight.w500),
const SizedBox(height: 10),
widget.textController != null
? Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Directionality(
textDirection: TextDirection.ltr,
child: inputWidget(
widget.isForEmail ? TranslationBase.of(context).email : TranslationBase.of(context).phoneNumber,
widget.isForEmail ? "demo@gmail.com" : "5xxxxxxxx",
widget.textController!,
keyboardType: widget.isForEmail ? TextInputType.emailAddress : TextInputType.number,
onChange: (value) {
widget.textController!.text = value!;
},
isEnable: true,
prefix: widget.isForEmail ? null : widget.countryCode,
hasSelection: false,
isBorderAllowed: false,
isAllowLeadingIcon: true,
leadingIcon: widget.isForEmail ? "assets/images/svg/email.svg" : "assets/images/svg/smart-phone.svg",
),
),
],
)
: SizedBox(),
SizedBox(height: 24),
...widget.buttons,
],
),
),
);
}
@ -110,8 +118,8 @@ class CustomButton extends StatelessWidget {
Key? key,
required this.text,
required this.onPressed,
this.backgroundColor = Colors.red,
this.borderColor = Colors.red,
this.backgroundColor = const Color(0xFFED1C2B),
this.borderColor = const Color(0xFFED1C2B),
this.textColor = Colors.white,
this.borderRadius = 12,
this.borderWidth = 1,
@ -129,6 +137,7 @@ class CustomButton extends StatelessWidget {
onTap: isDisabled ? null : onPressed,
child: Container(
padding: padding,
height: 56,
decoration: BoxDecoration(
color: isDisabled ? backgroundColor.withOpacity(0.5) : backgroundColor,
borderRadius: BorderRadius.circular(borderRadius),

@ -41,27 +41,37 @@ class _CarbsState extends State<Carbs> {
double? fCalMeal;
void calculateDietRatios() {
if (dropdownValue == TranslationBase.of(context).dietVeryLow) {
if (dropdownValue == TranslationBase
.of(context)
.dietVeryLow) {
meals = 3;
protein = 45;
carbs = 10;
fat = 45;
} else if (dropdownValue == TranslationBase.of(context).dietLow) {
} else if (dropdownValue == TranslationBase
.of(context)
.dietLow) {
meals = 3;
protein = 40;
carbs = 30;
fat = 30;
} else if (dropdownValue == TranslationBase.of(context).dietModerate) {
} else if (dropdownValue == TranslationBase
.of(context)
.dietModerate) {
meals = 3;
protein = 25;
carbs = 50;
fat = 25;
} else if (dropdownValue == TranslationBase.of(context).dietUSDA) {
} else if (dropdownValue == TranslationBase
.of(context)
.dietUSDA) {
meals = 3;
protein = 15;
carbs = 55;
fat = 30;
} else if (dropdownValue == TranslationBase.of(context).dietZone) {
} else if (dropdownValue == TranslationBase
.of(context)
.dietZone) {
meals = 3;
protein = 30;
carbs = 40;
@ -87,13 +97,17 @@ class _CarbsState extends State<Carbs> {
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
dropdownValue = TranslationBase.of(context).dietVeryLow;
dropdownValue = TranslationBase
.of(context)
.dietVeryLow;
return AppScaffold(
isShowAppBar: true,
isShowDecPage: false,
showNewAppBarTitle: true,
showNewAppBar: true,
appBarTitle: TranslationBase.of(context).carbohydrate,
appBarTitle: TranslationBase
.of(context)
.carbohydrate,
appBarIcons: [
Padding(
padding: const EdgeInsets.symmetric(horizontal: 10.0, vertical: 7.0),
@ -113,7 +127,9 @@ class _CarbsState extends State<Carbs> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
TranslationBase.of(context).carbProteinDesc,
TranslationBase
.of(context)
.carbProteinDesc,
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w600,
@ -128,7 +144,9 @@ class _CarbsState extends State<Carbs> {
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
inputWidget(TranslationBase.of(context).calDay, "0", textController),
inputWidget(TranslationBase
.of(context)
.calDay, "0", textController),
InkWell(
onTap: () {
Navigator.push(
@ -139,8 +157,14 @@ class _CarbsState extends State<Carbs> {
child: Padding(
padding: const EdgeInsets.all(12.0),
child: Text(
TranslationBase.of(context).notSure,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, letterSpacing: -0.56, color: CustomColors.accentColor, decoration: TextDecoration.underline),
TranslationBase
.of(context)
.notSure,
style: TextStyle(fontSize: 12,
fontWeight: FontWeight.w600,
letterSpacing: -0.56,
color: CustomColors.accentColor,
decoration: TextDecoration.underline),
),
),
)
@ -165,7 +189,9 @@ class _CarbsState extends State<Carbs> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
TranslationBase.of(context).selectDiet,
TranslationBase
.of(context)
.selectDiet,
style: TextStyle(
fontSize: 11,
letterSpacing: -0.44,
@ -194,11 +220,21 @@ class _CarbsState extends State<Carbs> {
});
},
items: <String>[
TranslationBase.of(context).dietVeryLow,
TranslationBase.of(context).dietLow,
TranslationBase.of(context).dietModerate,
TranslationBase.of(context).dietUSDA,
TranslationBase.of(context).dietZone
TranslationBase
.of(context)
.dietVeryLow,
TranslationBase
.of(context)
.dietLow,
TranslationBase
.of(context)
.dietModerate,
TranslationBase
.of(context)
.dietUSDA,
TranslationBase
.of(context)
.dietZone
].map<DropdownMenuItem<String>>((String value) {
return DropdownMenuItem<String>(
value: value,
@ -232,7 +268,9 @@ class _CarbsState extends State<Carbs> {
margin: EdgeInsets.symmetric(horizontal: 16.0, vertical: 16.0),
color: Colors.white,
child: SecondaryButton(
label: TranslationBase.of(context).calculate,
label: TranslationBase
.of(context)
.calculate,
color: CustomColors.accentColor,
onTap: () {
setState(() {
@ -242,16 +280,16 @@ class _CarbsState extends State<Carbs> {
context,
FadePage(
page: CarbsResult(
cCal: cCal!,
pCal: pCal!,
fCal: fCal!,
pCalGram: pCalGram!,
pCalMeal: pCalMeal!,
fCalGram: fCalGram!,
fCalMeal: fCalMeal!,
cCalGram: cCalGram!,
cCalMeal: cCalMeal!,
)),
cCal: cCal!,
pCal: pCal!,
fCal: fCal!,
pCalGram: pCalGram!,
pCalMeal: pCalMeal!,
fCalGram: fCalGram!,
fCalMeal: fCalMeal!,
cCalGram: cCalGram!,
cCalMeal: cCalMeal!,
)),
);
}
});
@ -307,30 +345,29 @@ class _CarbsState extends State<Carbs> {
// }
}
Widget inputWidget(
String _labelText,
String _hintText,
TextEditingController? _controller, {
Function(String?)? onChange,
String? prefix,
bool isEnable = true,
bool hasSelection = false,
bool hasSelectionCustomIcon = false,
String? selectionCustomIcon,
bool isBorderAllowed = true,
bool isAllowLeadingIcon = false,
bool isLeadingCountry = false,
String? leadingIcon,
bool removePadding = false,
bool isAllowRadius = true,
bool isReadOnly = false,
TextInputType keyboardType = TextInputType.number,
List<String>? dropdownItems,
String? selectedValue,
SelectionType? selectionType,
Function(bool)? onCalendarTypeChanged,
String lang = 'en',
}) {
Widget inputWidget(String _labelText,
String _hintText,
TextEditingController? _controller, {
Function(String?)? onChange,
String? prefix,
bool isEnable = true,
bool hasSelection = false,
bool hasSelectionCustomIcon = false,
String? selectionCustomIcon,
bool isBorderAllowed = true,
bool isAllowLeadingIcon = false,
bool isLeadingCountry = false,
String? leadingIcon,
bool removePadding = false,
bool isAllowRadius = true,
bool isReadOnly = false,
TextInputType keyboardType = TextInputType.number,
List<String>? dropdownItems,
String? selectedValue,
SelectionType? selectionType,
Function(bool)? onCalendarTypeChanged,
String lang = 'en',
}) {
return Builder(
builder: (context) {
final isRtl = Directionality.of(context) == TextDirection.rtl;
@ -542,8 +579,258 @@ Widget inputWidget(
);
}
Widget newInputWidget(String _labelText,
String _hintText,
TextEditingController? _controller, {
Function(String?)? onChange,
String? prefix,
bool isEnable = true,
bool hasSelection = false,
bool hasSelectionCustomIcon = false,
String? selectionCustomIcon,
bool isBorderAllowed = true,
bool isAllowLeadingIcon = false,
bool isLeadingCountry = false,
String? leadingIcon,
bool removePadding = false,
bool isAllowRadius = true,
bool isReadOnly = false,
TextInputType keyboardType = TextInputType.number,
List<String>? dropdownItems,
String? selectedValue,
SelectionType? selectionType,
Function(bool)? onCalendarTypeChanged,
EdgeInsetsGeometry? padding,
String lang = 'en',
}) {
return Builder(
builder: (context) {
final isRtl = Directionality.of(context) == TextDirection.rtl;
return Directionality(
textDirection: Directionality.of(context),
child: Container(
padding: padding,
// padding: removePadding && isAllowLeadingIcon && prefix == null
// ? const EdgeInsets.only(top: 8, bottom: 8, left: 8, right: 8)
// : removePadding && !hasSelection
// ? const EdgeInsets.only(top: 8, bottom: 8, left: 0, right: 0)
// : removePadding && hasSelection
// ? null
// : const EdgeInsets.symmetric(horizontal: 16, vertical: 15),
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: isAllowRadius ? BorderRadius.circular(15) : null,
color: Colors.white,
border: isBorderAllowed ? Border.all(color: const Color(0xffefefef), width: 1) : null,
),
child: Row(
textDirection: Directionality.of(context),
children: [
if (isAllowLeadingIcon && leadingIcon != null)
Directionality(
textDirection: Directionality.of(context),
child: Container(
height: 40,
width: 40,
margin: isRtl ? const EdgeInsets.only(left: 10) : const EdgeInsets.only(right: 10),
padding: isLeadingCountry ? null : const EdgeInsets.all(8),
decoration: const BoxDecoration(
color: Color(0xFFEFEFF0),
borderRadius: BorderRadius.all(Radius.circular(10)),
),
child: SvgPicture.asset(
leadingIcon,
width: 24,
height: 24,
fit: BoxFit.cover,
),
),
),
Expanded(
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: isRtl ? CrossAxisAlignment.end : CrossAxisAlignment.start,
children: [
Directionality(
textDirection: Directionality.of(context),
child: Text(
_labelText,
// textAlign: isRtl ? TextAlign.right : TextAlign.left,
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w500,
color: const Color(0xff898A8D),
fontFamily: context.fontFamily,
letterSpacing: -0.2,
height: 18 / 12,
),
),
),
hasSelection
? GestureDetector(
onTap: isEnable && !isReadOnly
? () async {
if (selectionType == SelectionType.dropdown) {
final renderBox = context.findRenderObject() as RenderBox;
final offset = renderBox.localToGlobal(Offset.zero);
final selected = await showMenu<String>(
context: context,
position: RelativeRect.fromLTRB(
offset.dx,
offset.dy + renderBox.size.height,
offset.dx + renderBox.size.width,
0,
),
items: dropdownItems
?.map(
(e) =>
PopupMenuItem<String>(
value: e,
child: Text(e),
),
)
.toList() ??
[],
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),
);
if (selected != null && onChange != null) {
onChange(selected);
}
} else if (selectionType == SelectionType.calendar) {
bool isGregorian = true;
// final picked = await showDatePicker(context: context, initialDate: DateTime.now(), firstDate: DateTime(1900), lastDate: DateTime(2100));
final picked = await showHijriGregBottomSheet(
context,
switcherIcon: SvgPicture.asset("assets/images/svg/language.svg", width: 24),
fontFamily: context.fontFamily,
language: lang,
initialDate: DateTime.now(),
okWidget: Padding(
padding: const EdgeInsets.only(right: 8.0),
child: SvgPicture.asset(
"assets/images/svg/confirm.svg",
width: 24,
height: 24,
),
),
cancelWidget: Padding(
padding: const EdgeInsets.only(right: 8.0),
child: SvgPicture.asset(
"assets/images/svg/cancel.svg",
colorFilter: ColorFilter.mode(
Colors.white,
BlendMode.srcIn,
),
width: 24,
height: 24,
),
),
onCalendarTypeChanged: (bool value) {
isGregorian = value;
},
);
if (picked != null && onChange != null) {
print(picked.toIso8601String());
if (onCalendarTypeChanged != null) {
print(isGregorian.toString());
onCalendarTypeChanged.call(isGregorian);
}
onChange(picked.toIso8601String());
}
}
}
: null,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Expanded(
child: Text(
(selectedValue == null || selectedValue.isEmpty) ? _hintText : selectedValue,
textAlign: isRtl ? TextAlign.right : TextAlign.left,
textDirection: isRtl ? TextDirection.rtl : TextDirection.ltr,
style: TextStyle(
fontSize: 14,
height: 21 / 14,
fontWeight: FontWeight.w500,
fontFamily: context.fontFamily,
color: (selectedValue != null && selectedValue.isNotEmpty) ? const Color(0xff2E3039) : const Color(0xffB0B0B0),
letterSpacing: -0.2,
),
),
),
if (hasSelectionCustomIcon && selectionCustomIcon != null)
SvgPicture.asset(selectionCustomIcon, width: 24, height: 24)
else
const Icon(Icons.keyboard_arrow_down_outlined),
],
),
)
: TextField(
enabled: isEnable,
scrollPadding: EdgeInsets.zero,
keyboardType: keyboardType,
controller: _controller,
readOnly: isReadOnly,
textAlignVertical: TextAlignVertical.top,
textAlign: isRtl ? TextAlign.right : TextAlign.left,
textDirection: isRtl ? TextDirection.rtl : TextDirection.ltr,
onChanged: onChange,
style: TextStyle(
fontSize: 14,
height: 21 / 14,
fontFamily: context.fontFamily,
fontWeight: FontWeight.w500,
color: const Color(0xff2E3039),
letterSpacing: -0.2,
),
decoration: InputDecoration(
isDense: true,
hintText: _hintText,
hintStyle: TextStyle(
fontSize: 14,
height: 21 / 16,
fontFamily: context.fontFamily,
fontWeight: FontWeight.w500,
color: const Color(0xff898A8D),
letterSpacing: -0.2,
),
prefixIconConstraints: const BoxConstraints(minWidth: 45),
prefixIcon: prefix == null
? null
: Text(
"+" + prefix,
style: TextStyle(
fontSize: 14,
height: 21 / 14,
fontFamily: context.fontFamily,
fontWeight: FontWeight.w500,
color: const Color(0xff2E303A),
letterSpacing: -0.2,
),
),
contentPadding: EdgeInsets.zero,
border: InputBorder.none,
focusedBorder: InputBorder.none,
enabledBorder: InputBorder.none,
),
),
],
),
),
],
),
),
);
},
);
}
extension BorderedContainer on Widget {
Widget get withBorderedContainer => Container(
Widget get withBorderedContainer =>
Container(
padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15),
alignment: Alignment.center,
decoration: BoxDecoration(

@ -1,4 +1,5 @@
import 'package:flutter/gestures.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:hmg_patient_app/config/config.dart';
import 'package:hmg_patient_app/config/shared_pref_kay.dart';
import 'package:hmg_patient_app/config/size_config.dart';
@ -24,6 +25,7 @@ import 'package:hmg_patient_app/uitl/gif_loader_dialog_utils.dart';
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_new.dart';
import 'package:hmg_patient_app/widgets/drawer/langauge_picker.dart';
import 'package:hmg_patient_app/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:hmg_patient_app/widgets/otp/sms-popup.dart';
@ -61,7 +63,6 @@ class _RegisterNew extends State<RegisterNew> {
final sharedPref = new AppSharedPreferences();
late PageController _controller;
late bool isLoading;
int _currentIndex = 0;
String? LoginTokenID;
bool isDubai = false;
final intl.DateFormat dateFormat = intl.DateFormat('dd/MM/yyyy');
@ -84,6 +85,9 @@ class _RegisterNew extends State<RegisterNew> {
@override
Widget build(BuildContext context) {
return AppScaffold(
// extendBody: true,
// extendBodyBehindAppBar: true,
appBarTitle: TranslationBase.of(context).register,
isShowDecPage: false,
isShowAppBar: true,
@ -99,260 +103,285 @@ class _RegisterNew extends State<RegisterNew> {
dropDownIndexChange: (value) {
Utils.changeAppLanguage(context: context);
},
body: SafeArea(
child: SingleChildScrollView(
reverse: false,
// physics: NeverScrollableScrollPhysics(),
padding: EdgeInsets.only(left: 24, right: 24),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Utils.showLottie(context: context, assetPath: 'assets/animations/lottie/register.json', width: context.getLottieScaledWidth(238), fit: BoxFit.cover, repeat: true),
SizedBox(height: 8),
Text(
TranslationBase.of(context).prepareToElevate,
style: TextStyle(fontSize: 32, fontFamily: context.fontFamily, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.4, height: 47 / 35),
body: GestureDetector(
onTap: () {
FocusScope.of(context).unfocus(); // Dismiss the keyboard when tapping outside
},
child: ScrollConfiguration(
behavior: ScrollConfiguration.of(context).copyWith(overscroll: false, physics: const ClampingScrollPhysics()),
child: NotificationListener<OverscrollIndicatorNotification>(
onNotification: (notification) {
notification.disallowIndicator();
return true;
},
child: SingleChildScrollView(
physics: ClampingScrollPhysics(), // Remove NeverScrollableScrollPhysics()
padding: EdgeInsets.only(
left: 24,
right: 24,
),
SizedBox(height: 24),
Directionality(
textDirection: Directionality.of(context),
child: Container(
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(24)),
padding: EdgeInsets.only(left: 16, right: 16),
child: Column(
children: [
inputWidget(
TranslationBase.of(context).country,
"Kingdom Of Saudi Arabia",
nationalIDorFile,
isEnable: true,
prefix: null,
hasSelection: true,
dropdownItems: Country.values.map((e) => context.selectedLanguage == "ar" ? e.nameArabic : e.displayName).toList(),
selectedValue: context.selectedLanguage == "ar" ? selectedCountry.nameArabic : selectedCountry.displayName,
selectionType: SelectionType.dropdown,
onChange: (val) {
if (val != null) {
setState(() {
selectedCountry = CountryExtension.fromDisplayName(val);
});
}
},
isBorderAllowed: false,
isAllowLeadingIcon: true,
hasSelectionCustomIcon: true,
removePadding: true,
isLeadingCountry: true,
isAllowRadius: false,
selectionCustomIcon: "assets/images/svg/arrow-down.svg",
leadingIcon: selectedCountry.iconPath,
),
Divider(height: 1),
inputWidget(TranslationBase.of(context).nationalIdNumber, "1xxxxxxxx", nationalIDorFile,
isEnable: true,
prefix: null,
removePadding: true,
isAllowRadius: false,
hasSelection: false,
isBorderAllowed: false,
isAllowLeadingIcon: true,
leadingIcon: "assets/images/svg/student-card.svg", onChange: (value) {
print(value);
}),
Divider(height: 1),
inputWidget(TranslationBase.of(context).dob, "11 July, 1994", nationalIDorFile,
isEnable: true,
prefix: null,
hasSelection: true,
removePadding: true,
isBorderAllowed: false,
isAllowLeadingIcon: true,
hasSelectionCustomIcon: true,
selectionType: SelectionType.calendar,
selectedValue: selectedDOB != null ? Utils.formatDateToDisplay(selectedDOB.toString()) : null,
selectionCustomIcon: "assets/images/svg/calendar.svg",
lang: context.selectedLanguage,
leadingIcon: "assets/images/svg/birthday-cake.svg", onChange: (value) {
print("=========== " + value!);
selectedDOB = DateTime.parse(value);
setState(() {});
}, onCalendarTypeChanged: (bool value) {
if (value) {
print("gregorian");
isHijri = 0; // Hijri
} else {
print("hijri");
isHijri = 1; // Gregorian
}
}),
],
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Utils.showLottie(
context: context,
assetPath: 'assets/animations/lottie/register.json',
width: MediaQuery.of(context).size.width * 0.45,
height: MediaQuery.of(context).size.height * 0.22,
fit: BoxFit.cover,
repeat: true),
SizedBox(height: 8),
Text(
TranslationBase.of(context).prepareToElevate,
textScaler: TextScaler.linear(MediaQuery.textScalerOf(context).scale(1)),
style: TextStyle(fontSize: 28, fontFamily: context.fontFamily, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.4, height: 40 / 28),
),
),
),
SizedBox(height: 25),
GestureDetector(
onTap: () {
setState(() {
isTermsAccepted = !isTermsAccepted;
});
},
child: Row(
children: [
AnimatedContainer(
duration: const Duration(milliseconds: 200),
height: 24,
width: 24,
decoration: BoxDecoration(
color: isTermsAccepted ? const Color(0xFFE92227) : Colors.transparent,
borderRadius: BorderRadius.circular(6),
border: Border.all(
color: isTermsAccepted ? const Color(0xFFE92227) : Colors.grey,
width: 2,
),
SizedBox(height: 24),
Directionality(
textDirection: Directionality.of(context),
child: Container(
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(24)),
padding: EdgeInsets.only(left: 16, right: 16, top: 0, bottom: 0),
child: Column(
children: [
newInputWidget(
TranslationBase.of(context).country,
"Kingdom Of Saudi Arabia",
nationalIDorFile,
isEnable: true,
prefix: null,
hasSelection: true,
dropdownItems: Country.values.map((e) => context.selectedLanguage == "ar" ? e.nameArabic : e.displayName).toList(),
selectedValue: context.selectedLanguage == "ar" ? selectedCountry.nameArabic : selectedCountry.displayName,
selectionType: SelectionType.dropdown,
onChange: (val) {
if (val != null) {
setState(() {
selectedCountry = CountryExtension.fromDisplayName(val);
});
}
},
isBorderAllowed: false,
isAllowLeadingIcon: true,
hasSelectionCustomIcon: true,
removePadding: true,
isLeadingCountry: true,
isAllowRadius: false,
padding: const EdgeInsets.only(top: 8, bottom: 8, left: 0, right: 0),
selectionCustomIcon: "assets/images/svg/arrow-down.svg",
leadingIcon: selectedCountry.iconPath,
).withVerticalPadding(8),
Divider(height: 1),
newInputWidget(TranslationBase.of(context).nationalIdNumber, "1xxxxxxxx", nationalIDorFile,
isEnable: true,
prefix: null,
removePadding: true,
isAllowRadius: false,
hasSelection: false,
isBorderAllowed: false,
isAllowLeadingIcon: true,
padding: const EdgeInsets.only(top: 8, bottom: 8, left: 0, right: 0),
leadingIcon: "assets/images/svg/student-card.svg", onChange: (value) {
print(value);
}).withVerticalPadding(8),
Divider(height: 1),
newInputWidget(TranslationBase.of(context).dob, "11 July, 1994", nationalIDorFile,
isEnable: true,
prefix: null,
hasSelection: true,
removePadding: true,
isBorderAllowed: false,
isAllowLeadingIcon: true,
hasSelectionCustomIcon: true,
selectionType: SelectionType.calendar,
selectedValue: selectedDOB != null ? Utils.formatDateToDisplay(selectedDOB.toString()) : null,
selectionCustomIcon: "assets/images/svg/calendar.svg",
lang: context.selectedLanguage,
padding: const EdgeInsets.only(top: 8, bottom: 8, left: 0, right: 0),
leadingIcon: "assets/images/svg/birthday-cake.svg", onChange: (value) {
print("=========== " + value!);
selectedDOB = DateTime.parse(value);
setState(() {});
}, onCalendarTypeChanged: (bool value) {
if (value) {
print("gregorian");
isHijri = 0; // Hijri
} else {
print("hijri");
isHijri = 1; // Gregorian
}
}).withVerticalPadding(8),
],
),
child: isTermsAccepted ? const Icon(Icons.check, size: 16, color: Colors.white) : null,
),
const SizedBox(width: 12),
Expanded(
child: Text(
TranslationBase.of(context).iAcceptTermsConditions,
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w500, color: Color(0xFF2E3039)),
),
),
SizedBox(height: 25),
GestureDetector(
onTap: () {
setState(() {
isTermsAccepted = !isTermsAccepted;
});
},
child: Row(
children: [
AnimatedContainer(
duration: const Duration(milliseconds: 200),
height: 24,
width: 24,
decoration: BoxDecoration(
color: isTermsAccepted ? const Color(0xFFE92227) : Colors.transparent,
borderRadius: BorderRadius.circular(6),
border: Border.all(
color: isTermsAccepted ? const Color(0xFFE92227) : Colors.grey,
width: 2,
),
),
child: isTermsAccepted ? const Icon(Icons.check, size: 16, color: Colors.white) : null,
),
const SizedBox(width: 12),
Expanded(
child: Text(
TranslationBase.of(context).iAcceptTermsConditions,
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w500, color: Color(0xFF2E3039)),
),
),
],
),
],
),
),
SizedBox(height: 25),
CustomButton(
text: TranslationBase.of(context).register,
icon: "assets/images/svg/note-edit.svg",
onPressed: () {
// bool isValid = Utils.validateIqama(nationalIDorFile.text);
if (nationalIDorFile == null) {
Utils.showErrorToast("Please enter your national id.");
return;
}
if (selectedCountry == null) {
Utils.showErrorToast("Please select your country.");
return;
}
),
SizedBox(height: 25),
CustomButton(
text: TranslationBase.of(context).register,
icon: "assets/images/svg/note-edit.svg",
onPressed: () {
// bool isValid = Utils.validateIqama(nationalIDorFile.text);
if (nationalIDorFile == null) {
Utils.showErrorToast("Please enter your national id.");
return;
}
if (selectedCountry == null) {
Utils.showErrorToast("Please select your country.");
return;
}
if (selectedDOB == null) {
Utils.showErrorToast("Please enter your date of birth.");
return;
}
if (!isTermsAccepted) {
Utils.showErrorToast("Please accept the terms and conditions.");
return;
}
if (selectedDOB == null) {
Utils.showErrorToast("Please enter your date of birth.");
return;
}
if (!isTermsAccepted) {
Utils.showErrorToast("Please accept the terms and conditions.");
return;
}
showModalBottomSheet(
context: context,
isScrollControlled: true,
isDismissible: false,
backgroundColor: Colors.transparent,
builder: (bottomSheetContext) => Padding(
padding: EdgeInsets.only(bottom: MediaQuery.of(bottomSheetContext).viewInsets.bottom),
child: SingleChildScrollView(
child: GenericBottomSheet(
countryCode: selectedCountry.countryCode,
initialPhoneNumber: "",
textController: phoneController,
buttons: [
Padding(
padding: const EdgeInsets.only(bottom: 10),
child: CustomButton(
text: "Send me OTP on SMS",
onPressed: () {
int? val = Utils.onOtpBtnPressed(OTPType.sms, phoneController);
registerUser(val);
//if (val != null) checkUserAuthentication(val);
},
backgroundColor: Colors.red,
borderColor: Colors.red,
textColor: Colors.white,
icon: "assets/images/svg/message.svg",
),
),
Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
showModalBottomSheet(
context: context,
isScrollControlled: true,
isDismissible: false,
backgroundColor: Colors.transparent,
builder: (bottomSheetContext) => Padding(
padding: EdgeInsets.only(bottom: MediaQuery.of(bottomSheetContext).viewInsets.bottom),
child: SingleChildScrollView(
child: GenericBottomSheet(
countryCode: selectedCountry.countryCode,
initialPhoneNumber: "",
textController: phoneController,
buttons: [
Padding(
padding: const EdgeInsets.symmetric(horizontal: 8),
child: AppText(
"OR",
fontSize: 16,
fontFamily: context.fontFamily,
color: Color(0xFF2E3039),
fontWeight: FontWeight.w500,
padding: const EdgeInsets.only(bottom: 10),
child: CustomButton(
text: "Send me OTP on SMS",
onPressed: () {
int? val = Utils.onOtpBtnPressed(OTPType.sms, phoneController);
registerUser(val);
//if (val != null) checkUserAuthentication(val);
},
backgroundColor: Colors.red,
borderColor: Colors.red,
textColor: Colors.white,
icon: "assets/images/svg/message.svg",
),
),
Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Padding(
padding: const EdgeInsets.symmetric(horizontal: 8),
child: AppText(
"OR",
fontSize: 16,
fontFamily: context.fontFamily,
color: Color(0xFF2E3039),
fontWeight: FontWeight.w500,
),
),
],
),
Padding(
padding: const EdgeInsets.only(bottom: 10, top: 10),
child: CustomButton(
text: "Send me OTP on WhatsApp",
onPressed: () {
int? val = Utils.onOtpBtnPressed(OTPType.whatsapp, phoneController);
registerUser(val);
// if (val != null) checkUserAuthentication(val);
},
backgroundColor: Colors.white,
borderColor: Color(0xFF2E3039),
textColor: Color(0xFF2E3039),
icon: "assets/images/svg/whatsapp.svg",
),
),
],
),
Padding(
padding: const EdgeInsets.only(bottom: 10),
child: CustomButton(
text: "Send me OTP on WhatsApp",
onPressed: () {
int? val = Utils.onOtpBtnPressed(OTPType.whatsapp, phoneController);
registerUser(val);
// if (val != null) checkUserAuthentication(val);
},
backgroundColor: Colors.white,
borderColor: Color(0xFF2E3039),
textColor: Color(0xFF2E3039),
icon: "assets/images/svg/whatsapp.svg",
),
),
],
),
),
),
);
},
fontFamily: context.fontFamily,
),
SizedBox(height: 14),
Center(
child: RichText(
textAlign: TextAlign.center,
text: TextSpan(
style: TextStyle(
color: Colors.black,
fontSize: 16,
height: 26 / 16,
fontFamily: context.fontFamily,
fontWeight: FontWeight.w500,
),
children: <TextSpan>[
TextSpan(
text: TranslationBase.of(context).alreadyHaveAccount,
style: TextStyle(
fontFamily: context.fontFamily,
),
),
),
TextSpan(text: " "),
TextSpan(
text: TranslationBase.of(context).loginNow,
);
},
fontFamily: context.fontFamily,
),
SizedBox(height: 14),
Center(
child: RichText(
textAlign: TextAlign.center,
text: TextSpan(
style: TextStyle(
color: Colors.red,
color: Colors.black,
fontSize: 16,
height: 26 / 16,
fontFamily: context.fontFamily,
fontWeight: FontWeight.w500,
),
recognizer: TapGestureRecognizer()
..onTap = () {
Navigator.of(context).pop();
},
children: <TextSpan>[
TextSpan(
text: TranslationBase.of(context).alreadyHaveAccount,
style: TextStyle(
fontFamily: context.fontFamily,
),
),
TextSpan(text: " "),
TextSpan(
text: TranslationBase.of(context).loginNow,
style: TextStyle(
color: Colors.red,
fontSize: 16,
height: 26 / 16,
fontFamily: context.fontFamily,
fontWeight: FontWeight.w500,
),
recognizer: TapGestureRecognizer()
..onTap = () {
Navigator.of(context).pop();
},
),
],
),
],
),
),
),
SizedBox(height: 30),
],
),
SizedBox(height: 30),
],
),
),
),
));

@ -15,6 +15,8 @@ import 'package:hmg_patient_app/pages/AlHabibMedicalService/health_calculator/ca
import 'package:hmg_patient_app/pages/login/login-type.dart';
import 'package:hmg_patient_app/pages/login/register-info.dart';
import 'package:hmg_patient_app/pages/login/register.dart';
import 'package:hmg_patient_app/pages/login/register_new.dart';
import 'package:hmg_patient_app/pages/login/welcome.dart';
import 'package:hmg_patient_app/services/authentication/auth_provider.dart';
import 'package:hmg_patient_app/theme/colors.dart';
import 'package:hmg_patient_app/uitl/app_shared_preferences.dart';
@ -27,6 +29,7 @@ import 'package:hmg_patient_app/uitl/utils_new.dart';
import 'package:hmg_patient_app/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:hmg_patient_app/widgets/text/app_texts_widget.dart';
import 'package:hmg_patient_app/widgets/transitions/fade_page.dart';
import 'package:provider/provider.dart';
import '../../widgets/dialogs/confirm_dialog.dart';
@ -355,7 +358,8 @@ class _RegisterNew extends State<RegisterNewStep2> {
await sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID),
await sharedPref.setString(TOKEN, result.authenticationTokenID),
AppToast.showSuccessToast(message: TranslationBase.of(context).successRegister),
projectViewModel.analytics.loginRegistration.registration_confirmation()
projectViewModel.analytics.loginRegistration.registration_confirmation(),
Navigator.of(context).pushReplacement(FadePage(page: WelcomeLogin())),
}
})
.catchError((err) {

@ -111,166 +111,181 @@ class _WelcomeLogin extends State<WelcomeLogin> {
dropDownIndexChange: (value) {
Utils.changeAppLanguage(context: context);
},
body: SafeArea(
child: SingleChildScrollView(
reverse: true,
physics: NeverScrollableScrollPhysics(),
padding: EdgeInsets.only(
left: 24,
right: 24,
// bottom: MediaQuery.of(context).viewInsets.bottom ,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Utils.showLottie(
context: context,
assetPath: 'assets/animations/lottie/login.json',
width: context.getLottieScaledWidth(238),
repeat: true,
fit: BoxFit.cover,
),
SizedBox(height: 140),
Text(
TranslationBase.of(context).welcomeToDrSulaiman,
style: TextStyle(
fontSize: 32,
fontFamily: (projectViewModel.currentLanguage == 'ar' ? 'Cairo' : 'Poppins'),
fontWeight: FontWeight.w600,
color: Color(0xff2B353E),
letterSpacing: -0.4,
height: 47 / 32,
),
),
SizedBox(height: 32),
Directionality(
textDirection: TextDirection.ltr,
child: inputWidget(
"National ID. or File No",
"1xxxxxxxx",
nationIdController,
isEnable: true,
prefix: null,
hasSelection: false,
isBorderAllowed: false,
isAllowLeadingIcon: true,
leadingIcon: "assets/images/svg/student-card.svg",
),
),
SizedBox(height: 16),
CustomButton(
text: TranslationBase.of(context).login,
icon: "assets/images/svg/login1.svg",
onPressed: () {
bool isValid = Utils.validateIqama(nationIdController.text);
if (isValid) {
showModalBottomSheet(
body: GestureDetector(
onTap: () {
FocusScope.of(context).unfocus(); // Dismiss the keyboard when tapping outside
},
child: ScrollConfiguration(
behavior: ScrollConfiguration.of(context).copyWith(overscroll: false, physics: const ClampingScrollPhysics()),
child: NotificationListener<OverscrollIndicatorNotification>(
onNotification: (notification) {
notification.disallowIndicator();
return true;
},
child: SingleChildScrollView(
physics: ClampingScrollPhysics(), // Remove NeverScrollableScrollPhysics()
padding: EdgeInsets.only(left: 24, right: 24, ),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Utils.showLottie(
context: context,
isScrollControlled: true,
isDismissible: false,
backgroundColor: Colors.transparent,
builder: (bottomSheetContext) => Padding(
padding: EdgeInsets.only(bottom: MediaQuery.of(bottomSheetContext).viewInsets.bottom),
child: SingleChildScrollView(
child: GenericBottomSheet(
countryCode: "966",
initialPhoneNumber: "",
textController: phoneController,
buttons: [
Padding(
padding: const EdgeInsets.only(bottom: 10),
child: CustomButton(
text: "Send me OTP on SMS",
onPressed: () {
int? val = Utils.onOtpBtnPressed(OTPType.sms, phoneController);
if (val != null) checkUserAuthentication(val);
},
backgroundColor: Colors.red,
borderColor: Colors.red,
textColor: Colors.white,
icon: "assets/images/svg/message.svg",
),
),
Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
assetPath: 'assets/animations/lottie/login.json',
width: MediaQuery.of(context).size.width * 0.45,
height: MediaQuery.of(context).size.height * 0.22,
repeat: true,
fit: BoxFit.cover),
Flexible(
fit: FlexFit.loose,
child: Container(
height: MediaQuery.of(context).size.height * 0.18,
),
),
Text(
TranslationBase.of(context).welcomeToDrSulaiman,
style: TextStyle(
fontSize: 28,
fontFamily: (projectViewModel.currentLanguage == 'ar' ? 'Cairo' : 'Poppins'),
fontWeight: FontWeight.w600,
color: Color(0xff2B353E),
letterSpacing: -0.4,
height: 40 / 28,
),
),
SizedBox(height: 32),
Directionality(
textDirection: TextDirection.ltr,
child: newInputWidget(
"National ID. or File No",
"1xxxxxxxx",
nationIdController,
isEnable: true,
removePadding: true,
prefix: null,
hasSelection: false,
isBorderAllowed: false,
isAllowLeadingIcon: true,
padding: EdgeInsets.only(top: 8, bottom: 8, left: 8, right: 8),
leadingIcon: "assets/images/svg/student-card.svg",
),
),
SizedBox(height: 16),
CustomButton(
text: TranslationBase.of(context).login,
icon: "assets/images/svg/login1.svg",
onPressed: () {
bool isValid = Utils.validateIqama(nationIdController.text);
if (isValid) {
showModalBottomSheet(
context: context,
isScrollControlled: true,
isDismissible: false,
useSafeArea: true,
backgroundColor: Colors.transparent,
builder: (bottomSheetContext) => Padding(
padding: EdgeInsets.only(bottom: MediaQuery.of(bottomSheetContext).viewInsets.bottom),
child: SingleChildScrollView(
child: GenericBottomSheet(
countryCode: "966",
initialPhoneNumber: "",
textController: phoneController,
buttons: [
Padding(
padding: const EdgeInsets.symmetric(horizontal: 8),
child: AppText(
"OR",
fontSize: 16,
fontFamily: 'poppins',
color: Color(0xFF2E3039),
fontWeight: FontWeight.w500,
padding: const EdgeInsets.only(bottom: 10),
child: CustomButton(
text: "Send me OTP on SMS",
onPressed: () {
int? val = Utils.onOtpBtnPressed(OTPType.sms, phoneController);
if (val != null) checkUserAuthentication(val);
},
// backgroundColor: Colors.red,
// borderColor: Colors.red,
textColor: Colors.white,
icon: "assets/images/svg/message.svg",
),
),
Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Padding(
padding: const EdgeInsets.symmetric(horizontal: 8),
child: AppText(
"OR",
fontSize: 16,
fontFamily: 'poppins',
color: Color(0xFF2E3039),
fontWeight: FontWeight.w500,
),
),
],
),
Padding(
padding: const EdgeInsets.only(bottom: 10),
child: CustomButton(
text: "Send me OTP on WhatsApp",
onPressed: () {
int? val = Utils.onOtpBtnPressed(OTPType.whatsapp, phoneController);
if (val != null) checkUserAuthentication(val);
},
backgroundColor: Colors.white,
borderColor: Color(0xFF2E3039),
textColor: Color(0xFF2E3039),
icon: "assets/images/svg/whatsapp.svg",
),
),
],
),
Padding(
padding: const EdgeInsets.only(bottom: 10),
child: CustomButton(
text: "Send me OTP on WhatsApp",
onPressed: () {
int? val = Utils.onOtpBtnPressed(OTPType.whatsapp, phoneController);
if (val != null) checkUserAuthentication(val);
},
backgroundColor: Colors.white,
borderColor: Color(0xFF2E3039),
textColor: Color(0xFF2E3039),
icon: "assets/images/svg/whatsapp.svg",
),
),
],
),
),
),
),
);
} else {
Utils.showErrorToast("Please enter a valid Iqama number.", context);
}
},
),
SizedBox(height: 14),
Center(
child: RichText(
textAlign: TextAlign.center,
text: TextSpan(
style: TextStyle(
color: Colors.black,
fontSize: 16,
height: 26 / 16,
fontFamily: context.fontFamily,
fontWeight: FontWeight.w500,
),
children: <TextSpan>[
TextSpan(
text: TranslationBase.of(context).dontHaveAccount,
style: TextStyle(
fontFamily: context.fontFamily,
)),
TextSpan(text: " "),
TextSpan(
text: TranslationBase.of(context).registerNow,
);
} else {
Utils.showErrorToast("Please enter a valid Iqama number.", context);
}
},
),
SizedBox(height: 14),
Center(
child: RichText(
textAlign: TextAlign.center,
text: TextSpan(
style: TextStyle(
color: Colors.red,
color: Colors.black,
fontSize: 16,
height: 26 / 16,
fontFamily: context.fontFamily,
fontWeight: FontWeight.w500,
),
recognizer: TapGestureRecognizer()
..onTap = () {
Navigator.of(context).push(FadePage(page: RegisterNew()));
locator<GAnalytics>().loginRegistration.visited_alhabib_group(true);
},
children: <TextSpan>[
TextSpan(
text: TranslationBase.of(context).dontHaveAccount,
style: TextStyle(
fontFamily: context.fontFamily,
)),
TextSpan(text: " "),
TextSpan(
text: TranslationBase.of(context).registerNow,
style: TextStyle(
color: Colors.red,
fontSize: 16,
height: 26 / 16,
fontFamily: context.fontFamily,
fontWeight: FontWeight.w500,
),
recognizer: TapGestureRecognizer()
..onTap = () {
Navigator.of(context).push(FadePage(page: RegisterNew()));
locator<GAnalytics>().loginRegistration.visited_alhabib_group(true);
},
),
],
),
],
).withVerticalPadding(16),
),
),
],
),
SizedBox(height: 30),
],
),
),
),
),

@ -1187,6 +1187,13 @@ extension WidgetPaddingExtensions on Widget {
child: this,
);
}
Widget withVerticalPadding([double padding = 16.0]) {
return Padding(
padding: EdgeInsets.symmetric(vertical: padding),
child: this,
);
}
}
extension CountryExtension on Country {
@ -1252,6 +1259,7 @@ extension SelectedLanguageExtension on BuildContext {
}
double getLottieScaledWidth(double value) => MediaQuery.of(this).size.width * (value / MediaQuery.of(this).size.width);
double getLottieScaledHeight(double value) => MediaQuery.of(this).size.height * (value / MediaQuery.of(this).size.height);
}
/*

@ -251,7 +251,6 @@ resizeToAvoidBottomInset: widget.resizeToAvoidBottomInset,
isShowBackButton: widget.isshowBackButton,
dropDownIndexChange: widget.dropDownIndexChange,
appBarIcons: widget.appBarIcons,
isShowLanguageChanger: widget.isShowLanguageChanger,
onTap: () {
widget.onTap;
@ -458,48 +457,6 @@ class NewAppBarWidget extends StatelessWidget implements PreferredSizeWidget {
],
),
),
// child: Directionality(
// // Directionality(
// textDirection: TextDirection.ltr,
// child: Container(
// decoration: containerRadius(Color(0xFFFEE9EA), 12),
// height: 40,
// width: 93,
// // padding: EdgeInsets.all(10),
// child: DropdownButtonHideUnderline(
// child: ButtonTheme(
// alignedDropdown: true,
// child: DropdownButton<int>(
// iconEnabledColor: CustomColors.darkOrange,
// style: TextStyle(color: CustomColors.black, fontSize: 12),
// dropdownColor: CustomColors.lightGreyColor,
// value: dropdownIndexValue,
// items: [
// for (int i = 0; i < dropDownList!.length; i++)
// DropdownMenuItem<int>(
// value: i,
// child: AutoSizeText(
// dropDownList![i],
// style: TextStyle(
// fontSize: 12,
// fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'),
// fontWeight: FontWeight.w600,
// color: Color(0xff2B2E31),
// letterSpacing: -.48,
// // height: 12 / 18
// ),
// ),
// )
// ],
// onChanged: dropDownIndexChange,
// underline: Container(
// height: 0,
// ),
// ),
// ),
// ),
// ),
// ),
),
],
),

Loading…
Cancel
Save