@@ -18,15 +18,11 @@ import 'package:super_clipboard/src/format_conversions.dart';
1818import 'package:super_clipboard/super_clipboard.dart' ;
1919import 'package:yaru/yaru.dart' ;
2020
21- typedef HeaderTapCallback = void Function (
22- bool newAscending,
23- int newColumnIndex,
24- );
21+ typedef HeaderTapCallback =
22+ void Function (bool newAscending, int newColumnIndex);
2523
26- typedef HeaderResizeCallback = void Function (
27- int newColumnIndex,
28- DragUpdateDetails details,
29- );
24+ typedef HeaderResizeCallback =
25+ void Function (int newColumnIndex, DragUpdateDetails details);
3026
3127class FilesTable extends StatelessWidget {
3228 const FilesTable ({
@@ -109,10 +105,7 @@ class FilesTable extends StatelessWidget {
109105 mainAxisSize: MainAxisSize .min,
110106 children: [
111107 ...columns.mapIndexed (
112- (index, column) => _buildHeaderCell (
113- column,
114- index,
115- ),
108+ (index, column) => _buildHeaderCell (column, index),
116109 ),
117110 Container (
118111 width: rowHorizontalPadding,
@@ -132,36 +125,30 @@ class FilesTable extends StatelessWidget {
132125 row: row,
133126 columns: columns,
134127 horizontalPadding: rowHorizontalPadding,
135- size: Size (
136- layoutWidth + (rowHorizontalPadding * 2 ),
137- rowHeight,
138- ),
128+ size: Size (layoutWidth + (rowHorizontalPadding * 2 ), rowHeight),
139129 ),
140130 data: row.entity.entity,
141131 dragAnchorStrategy: (draggable, context, position) {
142132 return const Offset (32 , 32 );
143133 },
144134 feedback: Material (
145135 shape: RoundedRectangleBorder (borderRadius: BorderRadius .circular (6 )),
146- color: Theme .of (context).colorScheme.onSurface.withOpacity ( 0.2 ),
136+ color: Theme .of (context).colorScheme.onSurface.withValues (alpha : 0.2 ),
147137 child: Icon (
148138 row.entity.isDirectory
149139 ? Utils .iconForFolder (row.entity.path)
150140 : Utils .iconForPath (row.entity.path),
151141 color: row.entity.isDirectory
152142 ? Theme .of (context).colorScheme.primary
153- : Theme .of (context).colorScheme.onSurface.withOpacity ( 0.8 ),
143+ : Theme .of (context).colorScheme.onSurface.withValues (alpha : 0.8 ),
154144 size: 64 ,
155145 ),
156146 ),
157147 child: _FilesRow (
158148 row: row,
159149 columns: columns,
160150 horizontalPadding: rowHorizontalPadding,
161- size: Size (
162- layoutWidth + (rowHorizontalPadding * 2 ),
163- rowHeight,
164- ),
151+ size: Size (layoutWidth + (rowHorizontalPadding * 2 ), rowHeight),
165152 ),
166153 );
167154 }
@@ -183,9 +170,7 @@ class FilesTable extends StatelessWidget {
183170 child: Container (
184171 width: column.normalizedWidth + startPadding,
185172 constraints: BoxConstraints (minWidth: startPadding + 80 ),
186- padding: EdgeInsetsDirectional .only (
187- start: startPadding.toDouble (),
188- ),
173+ padding: EdgeInsetsDirectional .only (start: startPadding.toDouble ()),
189174 child: Stack (
190175 clipBehavior: Clip .none,
191176 fit: StackFit .expand,
@@ -321,15 +306,20 @@ class _FilesRowState extends State<_FilesRow> {
321306 return LayoutBuilder (
322307 builder: (context, constraints) {
323308 return Container (
324- constraints:
325- BoxConstraints .tightForFinite (height: widget.size.height),
309+ constraints: BoxConstraints .tightForFinite (
310+ height: widget.size.height,
311+ ),
326312 padding: EdgeInsetsDirectional .only (
327- end: (constraints.maxWidth - widget.size.width)
328- .clamp (0 , double .infinity),
313+ end: (constraints.maxWidth - widget.size.width).clamp (
314+ 0 ,
315+ double .infinity,
316+ ),
329317 ),
330318 child: Material (
331319 color: widget.row.selected
332- ? Theme .of (context).colorScheme.primary.withOpacity (0.2 )
320+ ? Theme .of (
321+ context,
322+ ).colorScheme.primary.withValues (alpha: 0.2 )
333323 : Colors .transparent,
334324 clipBehavior: Clip .antiAlias,
335325 child: TimedInkwell (
@@ -407,10 +397,13 @@ class _FilesRowState extends State<_FilesRow> {
407397 overflow: TextOverflow .ellipsis,
408398 );
409399 case FilesColumnType .type:
410- final fileExtension =
411- p.extension (entity.path).replaceAll ('.' , '' ).toUpperCase ();
412- final fileLabel =
413- fileExtension.isNotEmpty ? 'File ($fileExtension )' : 'File' ;
400+ final fileExtension = p
401+ .extension (entity.path)
402+ .replaceAll ('.' , '' )
403+ .toUpperCase ();
404+ final fileLabel = fileExtension.isNotEmpty
405+ ? 'File ($fileExtension )'
406+ : 'File' ;
414407 child = Text (
415408 entity.isDirectory ? 'Directory' : fileLabel,
416409 overflow: TextOverflow .ellipsis,
0 commit comments