|
|
|
|
@ -47,6 +47,7 @@ class AdDurationSelectionSheet extends StatelessWidget {
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
itemCount: adVM.vehicleAdsDurations.length,
|
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
|
bool isArabic = AppState().isArabic(context);
|
|
|
|
|
AdsDurationModel adDuration = adVM.vehicleAdsDurations[index];
|
|
|
|
|
return SizedBox(
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
@ -61,10 +62,16 @@ class AdDurationSelectionSheet extends StatelessWidget {
|
|
|
|
|
children: [
|
|
|
|
|
("${adDuration.days} ${LocaleKeys.daysVar.tr()}").toString().toText(fontSize: 16, isBold: true),
|
|
|
|
|
4.height,
|
|
|
|
|
"Your Ad will be active for ${adDuration.days} Days and then you will need to extend it to keep it active. ".toText(
|
|
|
|
|
LocaleKeys.adActiveDuration
|
|
|
|
|
.tr(args: [adDuration.days.toString()])
|
|
|
|
|
.toText(
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
color: MyColors.lightTextColor,
|
|
|
|
|
),
|
|
|
|
|
// "Your Ad will be active for ${adDuration.days} Days and then you will need to extend it to keep it active. ".toText(
|
|
|
|
|
// fontSize: 14,
|
|
|
|
|
// color: MyColors.lightTextColor,
|
|
|
|
|
// ),
|
|
|
|
|
12.height,
|
|
|
|
|
LocaleKeys.adCharges.tr().toText(fontSize: 14, color: MyColors.lightTextColor, isBold: true),
|
|
|
|
|
if (adDuration.discountPercent != null && adDuration.discountPercent! > 0.0) ...[
|
|
|
|
|
@ -83,18 +90,21 @@ class AdDurationSelectionSheet extends StatelessWidget {
|
|
|
|
|
2.width,
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.only(bottom: 4),
|
|
|
|
|
child: (adDuration.currency ?? LocaleKeys.sar.tr()).toText(fontSize: 10, color: MyColors.lightTextColor, isBold: true),
|
|
|
|
|
child: (isArabic ? adDuration.currencyN : adDuration.currency)?.toText(fontSize: 10, color: MyColors.lightTextColor, isBold: true)
|
|
|
|
|
),
|
|
|
|
|
14.width,
|
|
|
|
|
"${adDuration.priceAfterDiscount}".toText(fontSize: 20, isBold: true),
|
|
|
|
|
2.width,
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.only(bottom: 4),
|
|
|
|
|
child: (adDuration.currency ?? LocaleKeys.sar.tr()).toText(fontSize: 10, color: MyColors.lightTextColor, isBold: true),
|
|
|
|
|
// child: (adDuration.currency ?? LocaleKeys.sar.tr()).toText(fontSize: 10, color: MyColors.lightTextColor, isBold: true),
|
|
|
|
|
child: (isArabic ? adDuration.currencyN.toString() : adDuration.currency.toString()).toText(fontSize: 10, color: MyColors.lightTextColor, isBold: true),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
"${adDuration.discountPercent} % OFF".toText(color: MyColors.white, fontSize: 10).toContainer(
|
|
|
|
|
|
|
|
|
|
//"${adDuration.discountPercent} % OFF"
|
|
|
|
|
LocaleKeys.discountOff.tr(args: [adDuration.discountPercent.toString()]).toText(color: MyColors.white, fontSize: 10).toContainer(
|
|
|
|
|
marginAll: 5,
|
|
|
|
|
paddingAll: 5,
|
|
|
|
|
borderRadius: 4,
|
|
|
|
|
@ -110,7 +120,7 @@ class AdDurationSelectionSheet extends StatelessWidget {
|
|
|
|
|
2.width,
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.only(bottom: 4),
|
|
|
|
|
child: (adDuration.currency ?? LocaleKeys.sar.tr()).toText(fontSize: 12, color: MyColors.lightTextColor, isBold: true),
|
|
|
|
|
child: (isArabic ? adDuration.currencyN.toString() : adDuration.currency.toString()).toText(fontSize: 12, color: MyColors.lightTextColor, isBold: true),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
@ -142,7 +152,7 @@ class AdDurationSelectionSheet extends StatelessWidget {
|
|
|
|
|
selectedId: adDuration.id ?? 0,
|
|
|
|
|
selectedOption: ("${adDuration.days} ${LocaleKeys.daysVar.tr()}"),
|
|
|
|
|
itemPrice: adDuration.priceAfterDiscount!.toString(),
|
|
|
|
|
currency: adDuration.currency!.toString(),
|
|
|
|
|
// currency: adDuration.currency!.toString(),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|
|