@@ -38,7 +38,8 @@ class _SelectMoveOrCopyModalState extends State<SelectMoveOrCopyModal> {
3838 _disabledAlbums = [
3939 if (widget.album != null ) widget.album! .id,
4040 if (parentAlbums.length == 1 || widget.isImage) 0 ,
41- if (! widget.isImage && parentAlbums.length > 1 ) int .parse (parentAlbums[parentAlbums.length - 2 ]),
41+ if (! widget.isImage && parentAlbums.length > 1 )
42+ int .parse (parentAlbums[parentAlbums.length - 2 ]),
4243 ];
4344
4445 super .initState ();
@@ -203,48 +204,72 @@ class _ExpansionAlbumTileState extends State<ExpansionAlbumTile> {
203204 child: Row (
204205 crossAxisAlignment: CrossAxisAlignment .stretch,
205206 children: [
207+ if (widget.album.children.isNotEmpty && ! widget.isParent)
208+ GestureDetector ( // Add chevron
209+ behavior: HitTestBehavior .opaque,
210+ onTap: () => setState (() {
211+ _expanded = ! _expanded;
212+ }),
213+ child: Padding (
214+ padding: const EdgeInsets .symmetric (horizontal: 16 ),
215+ child: AnimatedRotation (
216+ duration: const Duration (milliseconds: 200 ),
217+ turns: _expanded ? 0.25 : 0 , //Rotate by 90°
218+ child: Icon (Icons .chevron_right),
219+ )),
220+ ),
206221 Expanded (
207222 child: Padding (
208223 padding: const EdgeInsets .symmetric (horizontal: 16.0 ),
209224 child: Align (
210225 alignment: Alignment .centerLeft,
211226 child: Text (
212- "${widget .index } ${ widget . album .name }" ,
227+ "${widget .album .name }" ,
213228 overflow: TextOverflow .ellipsis,
214- style: _disabled ? Theme .of (context).textTheme.bodySmall : Theme .of (context).textTheme.bodyMedium,
229+ style: _disabled
230+ ? Theme .of (context).textTheme.bodySmall
231+ : Theme .of (context).textTheme.bodyMedium,
215232 ),
216233 ),
217234 ),
218235 ),
219236 if (widget.album.children.isNotEmpty && ! widget.isParent)
220- GestureDetector (
221- behavior: HitTestBehavior .opaque,
222- onTap: () => setState (() {
223- _expanded = ! _expanded;
224- }),
225- child: Padding (
226- padding: const EdgeInsets .symmetric (horizontal: 8.0 ),
227- child: Row (
228- crossAxisAlignment: CrossAxisAlignment .stretch,
229- children: [
230- Center (
231- child: Text (
232- appStrings.albumCount (widget.album.nbCategories),
233- style: TextStyle (
234- color: Theme .of (context).primaryColor.withValues (alpha: 0.7 ),
235- fontSize: 14 ,
237+ Padding ( //Folder box
238+ padding: const EdgeInsets .symmetric (horizontal: 16.0 ),
239+ child: Row (
240+ crossAxisAlignment: CrossAxisAlignment .stretch,
241+ children: [
242+ Center (
243+ child: DecoratedBox (
244+ decoration: BoxDecoration (
245+ color: Color .fromARGB (255 , 196 , 196 , 196 ),
246+ borderRadius: BorderRadius .circular (5 )),
247+ child: Padding (
248+ padding:
249+ EdgeInsetsGeometry .symmetric (horizontal: 8 ),
250+ child: Row (
251+ spacing: 2.0 ,
252+ children: [
253+ Text (
254+ '${widget .album .nbCategories }' ,
255+ style: TextStyle (
256+ color: Colors .white,
257+ fontSize: 14 ,
258+ ),
259+ ),
260+ Icon (
261+ Icons .folder,
262+ size: 15 ,
263+ color: Colors .white,
264+ ),
265+ ],
236266 ),
237267 ),
238268 ),
239- AnimatedRotation (
240- duration: const Duration (milliseconds: 200 ),
241- turns: _expanded ? - 0.25 : 0.25 ,
242- child: Icon (Icons .chevron_right),
243- ),
244- ],
245- ),
269+ ),
270+ ],
246271 ),
247- ),
272+ )
248273 ],
249274 ),
250275 ),
0 commit comments