horizontal_coupon.dart 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. import 'coupon_uikit.dart';
  2. import 'package:flutter/material.dart';
  3. class HorizontalCouponExample1 extends StatelessWidget {
  4. const HorizontalCouponExample1({Key? key}) : super(key: key);
  5. @override
  6. Widget build(BuildContext context) {
  7. const Color secondaryColor = Color(0xffcbf3f0);
  8. const Color primaryColor = Color(0xff368f8b);
  9. return CouponCard(
  10. height: 150,
  11. backgroundColor: secondaryColor,
  12. curveAxis: Axis.vertical,
  13. firstChild: Container(
  14. decoration: const BoxDecoration(
  15. color: primaryColor,
  16. ),
  17. child: Column(
  18. mainAxisAlignment: MainAxisAlignment.center,
  19. children: [
  20. Expanded(
  21. child: Center(
  22. child: Column(
  23. mainAxisSize: MainAxisSize.min,
  24. children: const [
  25. Text(
  26. '23%',
  27. style: TextStyle(
  28. color: Colors.white,
  29. fontSize: 24,
  30. fontWeight: FontWeight.bold,
  31. ),
  32. ),
  33. Text(
  34. 'OFF',
  35. style: TextStyle(
  36. color: Colors.white,
  37. fontSize: 16,
  38. fontWeight: FontWeight.bold,
  39. ),
  40. ),
  41. ],
  42. ),
  43. ),
  44. ),
  45. const Divider(color: Colors.white54, height: 0),
  46. const Expanded(
  47. child: Center(
  48. child: Text(
  49. 'WINTER IS\nHERE',
  50. textAlign: TextAlign.center,
  51. style: TextStyle(
  52. color: Colors.white,
  53. fontSize: 12,
  54. fontWeight: FontWeight.bold,
  55. ),
  56. ),
  57. ),
  58. ),
  59. ],
  60. ),
  61. ),
  62. secondChild: Container(
  63. width: double.maxFinite,
  64. padding: const EdgeInsets.all(18),
  65. child: Column(
  66. mainAxisSize: MainAxisSize.min,
  67. crossAxisAlignment: CrossAxisAlignment.start,
  68. children: const [
  69. Text(
  70. 'Coupon Code',
  71. textAlign: TextAlign.center,
  72. style: TextStyle(
  73. fontSize: 13,
  74. fontWeight: FontWeight.bold,
  75. color: Colors.black54,
  76. ),
  77. ),
  78. SizedBox(height: 4),
  79. Text(
  80. 'FREESALES',
  81. textAlign: TextAlign.center,
  82. style: TextStyle(
  83. fontSize: 24,
  84. color: primaryColor,
  85. fontWeight: FontWeight.bold,
  86. ),
  87. ),
  88. Spacer(),
  89. Text(
  90. 'Valid Till - 30 Jan 2022',
  91. textAlign: TextAlign.center,
  92. style: TextStyle(
  93. color: Colors.black45,
  94. ),
  95. ),
  96. ],
  97. ),
  98. ),
  99. );
  100. }
  101. }