vertical_coupen.dart 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. import 'package:flutter/material.dart';
  2. import 'coupon_uikit.dart';
  3. class VerticalCouponExample extends StatelessWidget {
  4. const VerticalCouponExample({Key? key}) : super(key: key);
  5. @override
  6. Widget build(BuildContext context) {
  7. return CouponCard(
  8. height: 300,
  9. curvePosition: 180,
  10. curveRadius: 30,
  11. borderRadius: 10,
  12. decoration: BoxDecoration(
  13. gradient: LinearGradient(
  14. colors: [
  15. Colors.purple,
  16. Colors.purple.shade700,
  17. ],
  18. begin: Alignment.topLeft,
  19. end: Alignment.bottomRight,
  20. ),
  21. ),
  22. firstChild: Column(
  23. mainAxisAlignment: MainAxisAlignment.center,
  24. children: const [
  25. Text(
  26. 'CHIRISTMAS SALES',
  27. style: TextStyle(
  28. color: Colors.white54,
  29. fontSize: 20,
  30. fontWeight: FontWeight.bold,
  31. ),
  32. ),
  33. SizedBox(height: 10),
  34. Text(
  35. '16%',
  36. style: TextStyle(
  37. color: Colors.white,
  38. fontSize: 56,
  39. fontWeight: FontWeight.bold,
  40. ),
  41. ),
  42. Text(
  43. 'OFF',
  44. style: TextStyle(
  45. color: Colors.white,
  46. fontSize: 26,
  47. fontWeight: FontWeight.bold,
  48. ),
  49. ),
  50. ],
  51. ),
  52. secondChild: Container(
  53. width: double.maxFinite,
  54. decoration: const BoxDecoration(
  55. border: Border(
  56. top: BorderSide(color: Colors.white),
  57. ),
  58. ),
  59. padding: const EdgeInsets.symmetric(vertical: 24, horizontal: 42),
  60. child: ElevatedButton(
  61. style: ButtonStyle(
  62. shape: MaterialStateProperty.all<RoundedRectangleBorder>(
  63. RoundedRectangleBorder(
  64. borderRadius: BorderRadius.circular(60),
  65. ),
  66. ),
  67. padding: MaterialStateProperty.all<EdgeInsetsGeometry>(
  68. const EdgeInsets.symmetric(horizontal: 80),
  69. ),
  70. backgroundColor: MaterialStateProperty.all<Color>(
  71. Colors.white,
  72. ),
  73. ),
  74. onPressed: () {},
  75. child: const Text(
  76. 'REDEEM',
  77. style: TextStyle(
  78. fontSize: 16,
  79. fontWeight: FontWeight.bold,
  80. color: Colors.purple,
  81. ),
  82. ),
  83. ),
  84. ),
  85. );
  86. }
  87. }