usage_details_widget.dart 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. import 'package:flutter/material.dart';
  2. import 'package:flutter/widgets.dart';
  3. class UsageDetailsWidget extends StatelessWidget {
  4. const UsageDetailsWidget({Key key}) : super(key: key);
  5. @override
  6. Widget build(BuildContext context) {
  7. return Container(
  8. child: Row(
  9. mainAxisSize: MainAxisSize.min,
  10. mainAxisAlignment: MainAxisAlignment.center,
  11. crossAxisAlignment: CrossAxisAlignment.center,
  12. children: [
  13. Container(
  14. width: 343,
  15. height: 196,
  16. decoration: BoxDecoration(
  17. borderRadius: BorderRadius.circular(12),
  18. boxShadow: const [
  19. BoxShadow(
  20. color: Color(0x14000000),
  21. blurRadius: 12,
  22. offset: Offset(0, 6),
  23. ),
  24. ],
  25. color: Color(0xff42b96c),
  26. ),
  27. child: Stack(
  28. children: [
  29. Positioned.fill(
  30. child: Align(
  31. alignment: Alignment.topLeft,
  32. child: Container(
  33. width: 343,
  34. height: 120,
  35. child: Stack(
  36. children: [
  37. Container(
  38. width: 343,
  39. height: 120,
  40. decoration: BoxDecoration(
  41. borderRadius: BorderRadius.circular(8),
  42. color: Color(0xff42b96c),
  43. ),
  44. ),
  45. Positioned.fill(
  46. child: Align(
  47. alignment: Alignment.bottomLeft,
  48. child: Opacity(
  49. opacity: 0.20,
  50. child: Container(
  51. width: 306,
  52. height: 266,
  53. decoration: BoxDecoration(
  54. shape: BoxShape.circle,
  55. border: Border.all(
  56. color: Colors.white,
  57. width: 1,
  58. ),
  59. color: Colors.white,
  60. ),
  61. ),
  62. ),
  63. ),
  64. ),
  65. Positioned.fill(
  66. child: Align(
  67. alignment: Alignment.topRight,
  68. child: Opacity(
  69. opacity: 0.20,
  70. child: Container(
  71. width: 376,
  72. height: 256,
  73. decoration: BoxDecoration(
  74. shape: BoxShape.circle,
  75. border: Border.all(
  76. color: Colors.white,
  77. width: 1,
  78. ),
  79. ),
  80. ),
  81. ),
  82. ),
  83. ),
  84. Positioned.fill(
  85. child: Align(
  86. alignment: Alignment.bottomRight,
  87. child: Container(
  88. width: 229,
  89. height: 226,
  90. child: FlutterLogo(size: 226),
  91. ),
  92. ),
  93. ),
  94. Positioned.fill(
  95. child: Align(
  96. alignment: Alignment.topRight,
  97. child: Opacity(
  98. opacity: 0.20,
  99. child: Container(
  100. width: 306,
  101. height: 336,
  102. decoration: BoxDecoration(
  103. shape: BoxShape.circle,
  104. border: Border.all(
  105. color: Colors.white,
  106. width: 1,
  107. ),
  108. ),
  109. ),
  110. ),
  111. ),
  112. ),
  113. ],
  114. ),
  115. ),
  116. ),
  117. ),
  118. Positioned.fill(
  119. child: Align(
  120. alignment: Alignment.bottomLeft,
  121. child: Container(
  122. width: 343,
  123. height: 80,
  124. decoration: BoxDecoration(
  125. borderRadius: BorderRadius.circular(8),
  126. color: Color(0x33000000),
  127. ),
  128. ),
  129. ),
  130. ),
  131. Positioned(
  132. left: 16,
  133. top: 20,
  134. child: Text(
  135. "Current plan",
  136. style: TextStyle(
  137. color: Colors.white,
  138. fontSize: 14,
  139. fontFamily: "SF Pro Text",
  140. fontWeight: FontWeight.w500,
  141. ),
  142. ),
  143. ),
  144. Positioned(
  145. left: 224,
  146. top: 20,
  147. child: Opacity(
  148. opacity: 0.50,
  149. child: Text(
  150. "Ends 22 Jan’23",
  151. textAlign: TextAlign.right,
  152. style: TextStyle(
  153. color: Colors.white,
  154. fontSize: 14,
  155. fontFamily: "SF Pro Text",
  156. fontWeight: FontWeight.w500,
  157. ),
  158. ),
  159. ),
  160. ),
  161. Positioned(
  162. left: 16,
  163. top: 40,
  164. child: Text(
  165. "10 GB",
  166. style: TextStyle(
  167. color: Colors.white,
  168. fontSize: 24,
  169. fontFamily: "SF Pro Display",
  170. fontWeight: FontWeight.w600,
  171. ),
  172. ),
  173. ),
  174. Positioned(
  175. left: 16,
  176. top: 136,
  177. child: SizedBox(
  178. width: 311,
  179. height: 36,
  180. child: Column(
  181. children: [
  182. LinearProgressIndicator(
  183. value: 0.4,
  184. valueColor: AlwaysStoppedAnimation<Color>(
  185. Theme.of(context).buttonColor),
  186. ),
  187. Padding(padding: EdgeInsets.fromLTRB(0, 12, 0, 0)),
  188. Row(
  189. mainAxisAlignment: MainAxisAlignment.spaceBetween,
  190. children: const [
  191. Text(
  192. "2.3 GB of 10 GB used",
  193. style: TextStyle(
  194. color: Colors.white,
  195. fontSize: 14,
  196. fontFamily: "SF Pro Text",
  197. fontWeight: FontWeight.w600,
  198. ),
  199. ),
  200. Text(
  201. "3,846 Memories",
  202. style: TextStyle(
  203. color: Colors.white,
  204. fontSize: 14,
  205. fontFamily: "SF Pro Text",
  206. fontWeight: FontWeight.w600,
  207. ),
  208. ),
  209. ],
  210. ),
  211. ],
  212. ),
  213. ),
  214. ),
  215. ],
  216. ),
  217. ),
  218. ],
  219. ),
  220. );
  221. }
  222. }