Initial commit
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import 'package:animated_text_kit/animated_text_kit.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:SEFER/controller/home/profile/promos_controller.dart';
|
||||
import 'package:SEFER/views/widgets/my_scafold.dart';
|
||||
@@ -106,13 +108,26 @@ class PromosPassengerPage extends StatelessWidget {
|
||||
} else {
|
||||
// Promo items
|
||||
final rides = orderHistoryController.promoList[index - 1];
|
||||
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
padding: const EdgeInsets.all(12.0),
|
||||
child: Container(
|
||||
decoration: AppStyle.boxDecoration,
|
||||
decoration: BoxDecoration(
|
||||
color: CupertinoColors.systemGrey6,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color:
|
||||
CupertinoColors.systemGrey.withOpacity(0.5),
|
||||
blurRadius: 8,
|
||||
offset: Offset(0, 4),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment:
|
||||
@@ -122,50 +137,88 @@ class PromosPassengerPage extends StatelessWidget {
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
AnimatedTextKit(
|
||||
animatedTexts: [
|
||||
ScaleAnimatedText(
|
||||
rides['promo_code'],
|
||||
textStyle: AppStyle.title),
|
||||
WavyAnimatedText(
|
||||
rides['promo_code'],
|
||||
textStyle: AppStyle.title),
|
||||
FlickerAnimatedText(
|
||||
rides['promo_code'],
|
||||
textStyle: AppStyle.title),
|
||||
WavyAnimatedText(
|
||||
rides['promo_code'],
|
||||
textStyle: AppStyle.title),
|
||||
],
|
||||
isRepeatingAnimation: true,
|
||||
GestureDetector(
|
||||
onTap: () {},
|
||||
child: AnimatedTextKit(
|
||||
animatedTexts: [
|
||||
ScaleAnimatedText(
|
||||
rides['promo_code'],
|
||||
textStyle:
|
||||
AppStyle.title.copyWith(
|
||||
fontSize:
|
||||
32, // Increased font size for emphasis
|
||||
color: CupertinoColors
|
||||
.activeBlue,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
WavyAnimatedText(
|
||||
rides['promo_code'],
|
||||
textStyle:
|
||||
AppStyle.title.copyWith(
|
||||
fontSize:
|
||||
32, // Increased font size for emphasis
|
||||
color: CupertinoColors
|
||||
.activeBlue,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
],
|
||||
isRepeatingAnimation: true,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
// Description Text
|
||||
Text(
|
||||
rides['description'],
|
||||
style: AppStyle.title,
|
||||
style: AppStyle.title.copyWith(
|
||||
fontSize: 22,
|
||||
color: CupertinoColors.systemGrey,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Column(
|
||||
children: [
|
||||
// Only displaying end date
|
||||
Text(
|
||||
rides['validity_start_date'],
|
||||
style: AppStyle.title,
|
||||
),
|
||||
Text(
|
||||
rides['validity_end_date'],
|
||||
style: AppStyle.title,
|
||||
'${'Valid Until:'.tr} ${rides['validity_end_date']}',
|
||||
style: AppStyle.subtitle.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 20,
|
||||
color: CupertinoColors.systemGrey,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
Text(
|
||||
'Copy this Promo to use it in your Ride!'.tr,
|
||||
textAlign: TextAlign.center,
|
||||
style: AppStyle.headTitle2
|
||||
.copyWith(color: AppColor.accentColor),
|
||||
)
|
||||
// const SizedBox(height: 16),
|
||||
// Copy Promo Text
|
||||
Center(
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
Clipboard.setData(ClipboardData(
|
||||
text: rides['promo_code']));
|
||||
Get.snackbar(
|
||||
'Promo Copied!'.tr,
|
||||
'You have copied the promo code.'.tr,
|
||||
snackPosition: SnackPosition.BOTTOM,
|
||||
backgroundColor:
|
||||
CupertinoColors.systemGrey,
|
||||
colorText: CupertinoColors.white,
|
||||
);
|
||||
},
|
||||
child: Text(
|
||||
'Copy Code'.tr,
|
||||
textAlign: TextAlign.center,
|
||||
style: AppStyle.headTitle2.copyWith(
|
||||
color: CupertinoColors.systemBlue,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user