openFullScreen method
When you want to open FullScreen Page, you need pass the FullScreen's context, because this function do Navigator.push(context, TransparentRoute(...))
Implementation
Future<void> openFullScreen() async {
if (context != null && !_isFullScreen) {
_isFullScreen = true;
final VideoQuery query = VideoQuery();
final metadata = query.videoMetadata(context!);
final Duration transition = metadata.style.transitions;
context?.navigator.push(PageRouteBuilder(
opaque: false,
fullscreenDialog: true,
transitionDuration: transition,
reverseTransitionDuration: transition,
pageBuilder: (_, __, ___) => MultiProvider(
providers: [
ChangeNotifierProvider.value(value: query.video(context!)),
Provider.value(value: metadata),
],
child: FullScreenPage(
fixedLandscape: metadata.onFullscreenFixLandscape,
),
),
));
}
}