final after change app
This commit is contained in:
@@ -108,27 +108,21 @@ class CouponsScreen extends StatelessWidget {
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
child: Stack(
|
||||
children: [
|
||||
// Background Image
|
||||
Positioned.fill(
|
||||
child: Image.network(
|
||||
coupon.imageUrl,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
|
||||
// Blur Effect
|
||||
Positioned.fill(
|
||||
child: BackdropFilter(
|
||||
filter:
|
||||
ImageFilter.blur(sigmaX: 5, sigmaY: 5),
|
||||
child: Container(
|
||||
color: Colors.black.withOpacity(
|
||||
0.3), // Dark overlay for readability
|
||||
color: Colors.black.withOpacity(0.3),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
// Coupon Content
|
||||
Padding(
|
||||
padding: EdgeInsets.all(16.0),
|
||||
child: Column(
|
||||
@@ -139,8 +133,7 @@ class CouponsScreen extends StatelessWidget {
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors
|
||||
.white, // Ensure contrast with background
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 5),
|
||||
@@ -151,8 +144,7 @@ class CouponsScreen extends StatelessWidget {
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors
|
||||
.white, // Ensure contrast with background
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
@@ -162,19 +154,20 @@ class CouponsScreen extends StatelessWidget {
|
||||
style: TextStyle(
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.bold,
|
||||
color:
|
||||
Colors.white, // Highlight price
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 5),
|
||||
Text(
|
||||
"₹${coupon.discountValue ?? ''}",
|
||||
coupon.type == "PERCENTAGE"
|
||||
? "${coupon.discountValue ?? ''}%"
|
||||
: "₹${coupon.discountValue ?? ''}",
|
||||
style: TextStyle(
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.amber, // Highlight price
|
||||
color: Colors.amber,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 5),
|
||||
@@ -183,13 +176,10 @@ class CouponsScreen extends StatelessWidget {
|
||||
style: TextStyle(color: Colors.white70),
|
||||
),
|
||||
SizedBox(height: 10),
|
||||
|
||||
// Coupon Code and Apply Button
|
||||
Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
// Coupon Code Box
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 10, vertical: 5),
|
||||
@@ -209,18 +199,18 @@ class CouponsScreen extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
// Apply Button
|
||||
ElevatedButton(
|
||||
onPressed: isCouponValid
|
||||
? () async {
|
||||
? () async
|
||||
{
|
||||
var status = await provider
|
||||
.applyCoupon(
|
||||
context,
|
||||
cartId,
|
||||
coupon.code,
|
||||
coupon.id);
|
||||
if (status) {
|
||||
if (status)
|
||||
{
|
||||
Navigator.pop(context);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user