Add smooth fade-in animation to signed images for premium feel
This commit is contained in:
parent
92d8920183
commit
e1470c8f52
|
|
@ -142,6 +142,15 @@ class _SignedMediaImageState extends ConsumerState<SignedMediaImage> {
|
|||
width: widget.width,
|
||||
height: widget.height,
|
||||
fit: widget.fit,
|
||||
frameBuilder: (context, child, frame, wasSynchronouslyLoaded) {
|
||||
if (wasSynchronouslyLoaded) return child;
|
||||
return AnimatedOpacity(
|
||||
opacity: frame == null ? 0 : 1,
|
||||
duration: const Duration(milliseconds: 300),
|
||||
curve: Curves.easeOut,
|
||||
child: child,
|
||||
);
|
||||
},
|
||||
loadingBuilder: (context, child, loadingProgress) {
|
||||
if (loadingProgress == null) {
|
||||
return child;
|
||||
|
|
|
|||
Loading…
Reference in a new issue