mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-12 23:45:18 +00:00

Placeholder image instead of progress indicator in PlaybuttonCard Custom Fade Page Transition
19 lines
491 B
Dart
19 lines
491 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
class SpotubePageRoute extends PageRouteBuilder {
|
|
final Widget child;
|
|
SpotubePageRoute({required this.child})
|
|
: super(
|
|
pageBuilder: (context, animation, secondaryAnimation) => child,
|
|
);
|
|
|
|
@override
|
|
Widget buildTransitions(BuildContext context, Animation<double> animation,
|
|
Animation<double> secondaryAnimation, Widget child) {
|
|
return FadeTransition(
|
|
opacity: animation,
|
|
child: child,
|
|
);
|
|
}
|
|
}
|