Unverified Commit 2909fe22 authored by Sigurd Meldgaard's avatar Sigurd Meldgaard Committed by GitHub

Don't fade video player volume in demo (#14638)

parent e142d8dc
...@@ -60,17 +60,7 @@ class VideoCard extends StatelessWidget { ...@@ -60,17 +60,7 @@ class VideoCard extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
Widget fullScreenRoutePageBuilder(BuildContext context, Widget fullScreenRoutePageBuilder(BuildContext context,
Animation<double> animation, Animation<double> secondaryAnimation) { Animation<double> animation, Animation<double> secondaryAnimation) {
return new AnimatedBuilder( return _buildFullScreenVideo();
child: _buildFullScreenVideo(),
animation: animation,
builder: (BuildContext context, Widget child) {
// TODO(sigurdm): It seems we get a animation.value of 1.0
// at first when entering the route. Find out how to avoid
// this.
controller.setVolume(animation.value);
return child;
},
);
} }
void pushFullScreenWidget() { void pushFullScreenWidget() {
...@@ -82,6 +72,8 @@ class VideoCard extends StatelessWidget { ...@@ -82,6 +72,8 @@ class VideoCard extends StatelessWidget {
route.completed.then((Null _) { route.completed.then((Null _) {
controller.setVolume(0.0); controller.setVolume(0.0);
}); });
controller.setVolume(1.0);
Navigator.of(context).push(route); Navigator.of(context).push(route);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment