mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
wip
This commit is contained in:
@@ -15,12 +15,19 @@ import 'package:immich_mobile/providers/infrastructure/asset_viewer/current_asse
|
|||||||
class _DelayedAnimation extends StatefulWidget {
|
class _DelayedAnimation extends StatefulWidget {
|
||||||
final Widget child;
|
final Widget child;
|
||||||
final bool show;
|
final bool show;
|
||||||
final Duration showDelay = const Duration(milliseconds: 300);
|
final Duration showDelay;
|
||||||
final Duration hideDelay = const Duration(milliseconds: 0);
|
final Duration hideDelay;
|
||||||
final Duration showDuration = const Duration(milliseconds: 200);
|
final Duration showDuration;
|
||||||
final Duration hideDuration = const Duration(milliseconds: 100);
|
final Duration hideDuration;
|
||||||
|
|
||||||
const _DelayedAnimation({required this.child, required this.show});
|
const _DelayedAnimation({
|
||||||
|
required this.child,
|
||||||
|
required this.show,
|
||||||
|
this.showDelay = const Duration(milliseconds: 300),
|
||||||
|
this.hideDelay = const Duration(milliseconds: 0),
|
||||||
|
this.showDuration = const Duration(milliseconds: 200),
|
||||||
|
this.hideDuration = const Duration(milliseconds: 150),
|
||||||
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<_DelayedAnimation> createState() => _DelayedAnimationState();
|
State<_DelayedAnimation> createState() => _DelayedAnimationState();
|
||||||
@@ -109,12 +116,13 @@ class ThumbnailTile extends ConsumerWidget {
|
|||||||
|
|
||||||
return Stack(
|
return Stack(
|
||||||
children: [
|
children: [
|
||||||
Container(
|
_DelayedAnimation(
|
||||||
color: lockSelection
|
show: isSelected || lockSelection,
|
||||||
? context.colorScheme.surfaceContainerHighest
|
showDelay: Duration.zero,
|
||||||
: isSelected
|
hideDelay: Durations.short4, // Wait for indicators to finish
|
||||||
? assetContainerColor
|
showDuration: Duration.zero,
|
||||||
: Colors.transparent,
|
hideDuration: Duration.zero,
|
||||||
|
child: Container(color: lockSelection ? context.colorScheme.surfaceContainerHighest : assetContainerColor),
|
||||||
),
|
),
|
||||||
AnimatedContainer(
|
AnimatedContainer(
|
||||||
duration: Durations.short4,
|
duration: Durations.short4,
|
||||||
|
|||||||
Reference in New Issue
Block a user