diff --git a/lib/log.dart b/lib/log.dart index dea991a..23d7fae 100644 --- a/lib/log.dart +++ b/lib/log.dart @@ -1,3 +1,3 @@ import 'package:logger/logger.dart'; -final log = Logger(); +final log = Logger(printer: SimplePrinter()); diff --git a/lib/table.dart b/lib/table.dart index 8de337a..8df97d7 100644 --- a/lib/table.dart +++ b/lib/table.dart @@ -18,10 +18,12 @@ class _FilesTableState extends State with SignalsMixin { int? _currentSortColumn; bool _isSortAsc = true; List rows = []; + ColorTween compressIconTween = + ColorTween(begin: Colors.blue, end: Colors.amber); @override void initState() { - log.d('initState'); + log.d('FilesTable initState'); super.initState(); createEffect(() { setState(() { @@ -51,12 +53,25 @@ class _FilesTableState extends State with SignalsMixin { child: Icon(Icons.pending, color: theme.disabledColor), ), ), - _ => Tooltip( + ImageFileStatus.compressing => Tooltip( message: file.status.value, child: SizedBox( height: 20, width: 20, - child: Icon(Icons.compress, color: theme.hintColor), + child: TweenAnimationBuilder( + tween: compressIconTween, + duration: const Duration(seconds: 1), + onEnd: () { + setState(() { + compressIconTween = ColorTween( + begin: compressIconTween.end, + end: compressIconTween.begin, + ); + }); // Trigger rebuild to restart animation + }, + builder: (context, color, child) => + Icon(Icons.compress, color: color), + ), ), ), };