Fix: promos discount query and compact car details layout
This commit is contained in:
@@ -92,7 +92,7 @@ class PromosPassengerPage extends StatelessWidget {
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
promo['description'],
|
||||
promo['description']?.toString() ?? '',
|
||||
style: AppStyle.headTitle.copyWith(fontSize: 18),
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
@@ -104,7 +104,7 @@ class PromosPassengerPage extends StatelessWidget {
|
||||
size: 14, color: Colors.grey),
|
||||
const SizedBox(width: 6),
|
||||
Text(
|
||||
'${'Valid Until:'.tr} ${promo['validity_end_date']}',
|
||||
'${'Valid Until:'.tr} ${promo['validity_end_date']?.toString() ?? ''}',
|
||||
style: AppStyle.subtitle
|
||||
.copyWith(fontSize: 12, color: Colors.grey),
|
||||
),
|
||||
@@ -131,9 +131,10 @@ class PromosPassengerPage extends StatelessWidget {
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
// --- نفس منطقك القديم للنسخ ---
|
||||
Clipboard.setData(
|
||||
ClipboardData(text: promo['promo_code']));
|
||||
mySnackbarSuccess('${'Code'.tr} ${promo['promo_code']} ${'copied to clipboard'.tr}');
|
||||
Clipboard.setData(ClipboardData(
|
||||
text: promo['promo_code']?.toString() ?? ''));
|
||||
mySnackbarSuccess(
|
||||
'${'Code'.tr} ${promo['promo_code']?.toString() ?? ''} ${'copied to clipboard'.tr}');
|
||||
},
|
||||
child: Container(
|
||||
color: AppColor.primaryColor.withOpacity(0.1),
|
||||
@@ -147,7 +148,7 @@ class PromosPassengerPage extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Text(
|
||||
promo['promo_code'],
|
||||
promo['promo_code']?.toString() ?? '',
|
||||
style: AppStyle.headTitle.copyWith(
|
||||
fontSize: 24, color: AppColor.primaryColor),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user