| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- import 'package:flutter/material.dart';
- import 'coupon_uikit.dart';
- class VerticalCouponExample extends StatelessWidget {
- const VerticalCouponExample({Key? key}) : super(key: key);
- @override
- Widget build(BuildContext context) {
- return CouponCard(
- height: 300,
- curvePosition: 180,
- curveRadius: 30,
- borderRadius: 10,
- decoration: BoxDecoration(
- gradient: LinearGradient(
- colors: [
- Colors.purple,
- Colors.purple.shade700,
- ],
- begin: Alignment.topLeft,
- end: Alignment.bottomRight,
- ),
- ),
- firstChild: Column(
- mainAxisAlignment: MainAxisAlignment.center,
- children: const [
- Text(
- 'CHIRISTMAS SALES',
- style: TextStyle(
- color: Colors.white54,
- fontSize: 20,
- fontWeight: FontWeight.bold,
- ),
- ),
- SizedBox(height: 10),
- Text(
- '16%',
- style: TextStyle(
- color: Colors.white,
- fontSize: 56,
- fontWeight: FontWeight.bold,
- ),
- ),
- Text(
- 'OFF',
- style: TextStyle(
- color: Colors.white,
- fontSize: 26,
- fontWeight: FontWeight.bold,
- ),
- ),
- ],
- ),
- secondChild: Container(
- width: double.maxFinite,
- decoration: const BoxDecoration(
- border: Border(
- top: BorderSide(color: Colors.white),
- ),
- ),
- padding: const EdgeInsets.symmetric(vertical: 24, horizontal: 42),
- child: ElevatedButton(
- style: ButtonStyle(
- shape: MaterialStateProperty.all<RoundedRectangleBorder>(
- RoundedRectangleBorder(
- borderRadius: BorderRadius.circular(60),
- ),
- ),
- padding: MaterialStateProperty.all<EdgeInsetsGeometry>(
- const EdgeInsets.symmetric(horizontal: 80),
- ),
- backgroundColor: MaterialStateProperty.all<Color>(
- Colors.white,
- ),
- ),
- onPressed: () {},
- child: const Text(
- 'REDEEM',
- style: TextStyle(
- fontSize: 16,
- fontWeight: FontWeight.bold,
- color: Colors.purple,
- ),
- ),
- ),
- ),
- );
- }
- }
|