sheetCoverOf function
Runs to 1 as a sheet covers the page or sheet that context is on.
Implementation
Animation<double> sheetCoverOf(BuildContext context) {
var route = ModalRoute.of(context);
while (route != null) {
final navigator = route.navigator;
if (navigator == null || navigator.widget is! SheetPagesNavigator) {
return _coverOf(route);
}
route = ModalRoute.of(navigator.context);
}
return kAlwaysDismissedAnimation;
}