Aidra Driver 1.3.5+68
Aidra Driver - Your path to green energy
Loading...
Searching...
No Matches
today_collections_shimmer.dart
Go to the documentation of this file.
1import 'dart:ui';
2import 'package:flutter/material.dart';
3import 'package:shimmer/shimmer.dart';
4import '../../../../../core/ui/theme/color_palette.dart';
5
6class TodayCollectionsShimmer extends StatelessWidget {
7 const TodayCollectionsShimmer({super.key});
8
9 @override
10 Widget build(BuildContext context) {
11 return Container(
12 decoration: BoxDecoration(
13 gradient: LinearGradient(
14 begin: Alignment.topLeft,
15 end: Alignment.bottomRight,
16 colors: [
18 ColorPalette.antiFlashWhite.withValues(alpha: 0.5),
19 ],
20 ),
21 borderRadius: BorderRadius.circular(24),
22 boxShadow: [
23 BoxShadow(
24 color: ColorPalette.black.withValues(alpha: 0.05),
25 blurRadius: 20,
26 offset: const Offset(0, 10),
27 ),
28 ],
29 ),
30 child: ClipRRect(
31 borderRadius: BorderRadius.circular(24),
32 child: BackdropFilter(
33 filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10),
34 child: Container(
35 padding: const EdgeInsets.all(24),
36 decoration: BoxDecoration(
37 color: ColorPalette.white.withValues(alpha: 0.9),
38 borderRadius: BorderRadius.circular(24),
39 ),
40 child: Shimmer.fromColors(
41 baseColor: Colors.grey[300]!,
42 highlightColor: Colors.grey[100]!,
44 crossAxisAlignment: CrossAxisAlignment.start,
45 children: [
46 // Title and Date
47 Row(
48 mainAxisAlignment: MainAxisAlignment.spaceBetween,
49 children: [
50 Column(
51 crossAxisAlignment: CrossAxisAlignment.start,
52 children: [
53 Container(
54 width: 180,
55 height: 24,
56 decoration: BoxDecoration(
57 color: Colors.white,
58 borderRadius: BorderRadius.circular(4),
59 ),
60 ),
61 const SizedBox(height: 8),
62 Container(
63 width: 120,
64 height: 32,
65 decoration: BoxDecoration(
66 color: Colors.white,
67 borderRadius: BorderRadius.circular(12),
68 ),
69 ),
70 ],
71 ),
72 ],
73 ),
74 const SizedBox(height: 32),
75 // Collection Items
76 Row(
77 mainAxisAlignment: MainAxisAlignment.spaceBetween,
78 children: [
81 ],
82 ),
83 const SizedBox(height: 24),
84 // Status Container
85 Container(
86 padding: const EdgeInsets.all(16),
87 decoration: BoxDecoration(
88 color: Colors.white,
89 borderRadius: BorderRadius.circular(16),
90 ),
92 children: [
93 Row(
94 mainAxisAlignment: MainAxisAlignment.spaceBetween,
95 children: [
97 Container(
98 width: 1,
99 height: 40,
100 color: Colors.white,
101 ),
103 ],
104 ),
105 const SizedBox(height: 16),
106 Row(
107 children: [
108 Container(
109 width: 20,
110 height: 20,
111 decoration: const BoxDecoration(
112 color: Colors.white,
113 shape: BoxShape.circle,
114 ),
115 ),
116 const SizedBox(width: 8),
117 Container(
118 width: 150,
119 height: 14,
120 decoration: BoxDecoration(
121 color: Colors.white,
122 borderRadius: BorderRadius.circular(4),
123 ),
124 ),
125 ],
126 ),
127 ],
128 ),
129 ),
130 ],
131 ),
132 ),
133 ),
134 ),
135 ),
136 );
137 }
138
140 return Container(
141 padding: const EdgeInsets.all(16),
142 decoration: BoxDecoration(
143 color: Colors.white,
144 borderRadius: BorderRadius.circular(16),
145 ),
146 child: Row(
147 children: [
148 Container(
149 width: 24,
150 height: 24,
151 decoration: const BoxDecoration(
152 color: Colors.white,
153 shape: BoxShape.circle,
154 ),
155 ),
156 const SizedBox(width: 12),
157 Column(
158 crossAxisAlignment: CrossAxisAlignment.start,
159 children: [
160 Container(
161 width: 80,
162 height: 14,
163 decoration: BoxDecoration(
164 color: Colors.white,
165 borderRadius: BorderRadius.circular(4),
166 ),
167 ),
168 const SizedBox(height: 4),
169 Container(
170 width: 60,
171 height: 20,
172 decoration: BoxDecoration(
173 color: Colors.white,
174 borderRadius: BorderRadius.circular(4),
175 ),
176 ),
177 ],
178 ),
179 ],
180 ),
181 );
182 }
183
185 return Row(
186 children: [
187 Container(
188 width: 40,
189 height: 40,
190 decoration: const BoxDecoration(
191 color: Colors.white,
192 shape: BoxShape.circle,
193 ),
194 ),
195 const SizedBox(width: 8),
196 Container(
197 width: 60,
198 height: 14,
199 decoration: BoxDecoration(
200 color: Colors.white,
201 borderRadius: BorderRadius.circular(4),
202 ),
203 ),
204 ],
205 );
206 }
207}
static const black
static const white
static const antiFlashWhite
const TodayCollectionsShimmer({super.key})
final Widget child
final LinearGradient gradient
override Widget build(BuildContext context)
final EdgeInsets padding
style SizedBox(height:2.h)
style Column(crossAxisAlignment:CrossAxisAlignment.end, children:[Container(padding:EdgeInsets.symmetric(horizontal:8.w, vertical:4.h), decoration:BoxDecoration(color:ColorPalette.tiffanyBlue.withValues(alpha:0.1), borderRadius:BorderRadius.circular(12),), child:Text(collection.type ?? '', style:Theme.of(context).textTheme.bodySmall?.copyWith(color:ColorPalette.tiffanyBlue, fontWeight:FontWeight.bold,),),),],)