@@ -27,74 +27,81 @@ class ImageCard extends StatelessWidget {
2727 return GestureDetector (
2828 onTap: onPressed,
2929 onLongPress: onLongPress,
30- child: Stack (
31- fit: StackFit .expand,
32- children: [
33- _buildThumbnail (context),
34- Positioned (
35- bottom: 0 ,
36- right: 0 ,
37- left: 0 ,
38- child: Column (
39- mainAxisSize: MainAxisSize .min,
40- crossAxisAlignment: CrossAxisAlignment .stretch,
41- children: [
42- Row (
43- mainAxisAlignment: MainAxisAlignment .start,
44- crossAxisAlignment: CrossAxisAlignment .center,
45- children: [
46- if (image.isVideo)
47- Padding (
48- padding: const EdgeInsets .all (2.0 ),
49- child: Icon (
50- Icons .local_movies,
51- color: Color (0xFFFFFFFF ),
52- size: 12 ,
53- shadows: AppShadows .icon,
30+ child: ClipRRect (
31+ borderRadius: BorderRadius .circular (5.0 ),
32+ child: Stack (
33+ fit: StackFit .expand,
34+ children: [
35+ _buildThumbnail (context),
36+ Positioned (
37+ bottom: 0 ,
38+ right: 0 ,
39+ left: 0 ,
40+ child: Column (
41+ mainAxisSize: MainAxisSize .min,
42+ crossAxisAlignment: CrossAxisAlignment .stretch,
43+ children: [
44+ Row (
45+ mainAxisAlignment: MainAxisAlignment .start,
46+ crossAxisAlignment: CrossAxisAlignment .center,
47+ children: [
48+ if (image.isVideo)
49+ Padding (
50+ padding: const EdgeInsets .all (2.0 ),
51+ child: Icon (
52+ Icons .local_movies,
53+ color: Color (0xFFFFFFFF ),
54+ size: 12 ,
55+ shadows: AppShadows .icon,
56+ ),
5457 ),
55- ),
56- if (image.favorite)
57- Padding (
58- padding : const EdgeInsets . all ( 2.0 ),
59- child : Icon (
60- Icons .favorite ,
61- color : Color ( 0xFFFFFFFF ) ,
62- size : 12 ,
63- shadows : AppShadows .icon ,
58+ if (image.favorite)
59+ Padding (
60+ padding : const EdgeInsets . all ( 2.0 ),
61+ child : Icon (
62+ Icons .favorite,
63+ color : Color ( 0xFFFFFFFF ) ,
64+ size : 12 ,
65+ shadows : AppShadows .icon ,
66+ ) ,
6467 ),
68+ ],
69+ ),
70+ if (Preferences .getShowThumbnailTitle)
71+ Container (
72+ padding: const EdgeInsets .all (2.0 ),
73+ decoration: BoxDecoration (
74+ gradient: LinearGradient (
75+ colors: [
76+ Colors .black,
77+ Colors .black.withOpacity (0 ),
78+ ],
79+ begin: Alignment .bottomCenter,
80+ end: Alignment .topCenter),
81+ ),
82+ child: AutoSizeText (
83+ image.name,
84+ maxLines: 1 ,
85+ maxFontSize: 14 ,
86+ minFontSize: 8 ,
87+ textAlign: TextAlign .center,
88+ overflow: TextOverflow .ellipsis,
89+ style: TextStyle (color: Colors .white, fontSize: 14 ),
6590 ),
66- ],
67- ),
68- if (Preferences .getShowThumbnailTitle)
69- Container (
70- padding: const EdgeInsets .all (2.0 ),
71- decoration: BoxDecoration (
72- gradient: LinearGradient (colors: [
73- Colors .black,
74- Colors .black.withOpacity (0 ),
75- ], begin: Alignment .bottomCenter, end: Alignment .topCenter),
76- ),
77- child: AutoSizeText (
78- image.name,
79- maxLines: 1 ,
80- maxFontSize: 14 ,
81- minFontSize: 8 ,
82- textAlign: TextAlign .center,
83- overflow: TextOverflow .ellipsis,
84- style: TextStyle (color: Colors .white, fontSize: 14 ),
8591 ),
86- ) ,
87- ] ,
92+ ] ,
93+ ) ,
8894 ),
89- ),
90- ... _buildSelectOverlay (context) ,
91- ] ,
95+ ... _buildSelectOverlay (context ),
96+ ] ,
97+ ) ,
9298 ),
9399 );
94100 }
95101
96102 Widget _buildThumbnail (context) {
97- final String ? imageUrl = image.getDerivativeFromString (Preferences .getImageThumbnailSize)? .url;
103+ final String ? imageUrl =
104+ image.getDerivativeFromString (Preferences .getImageThumbnailSize)? .url;
98105 return CachedNetworkImage (
99106 imageUrl: imageUrl ?? '' ,
100107 fadeInDuration: const Duration (milliseconds: 300 ),
0 commit comments