MaterialVideoControls function
Video controls which use Material design.
Implementation
Widget MaterialVideoControls(VideoState state) {
final theme = MaterialVideoControlsTheme.maybeOf(state.context);
if (theme == null) {
return VideoStateInheritedWidget(
state: state,
controlsThemeDataBuilder: null,
child: const MaterialVideoControlsTheme(
normal: kDefaultMaterialVideoControlsThemeData,
fullscreen: kDefaultMaterialVideoControlsThemeDataFullscreen,
child: _MaterialVideoControls(),
),
);
} else {
return VideoStateInheritedWidget(
state: state,
controlsThemeDataBuilder: (child) {
return MaterialVideoControlsTheme(
normal: theme.normal,
fullscreen: theme.fullscreen,
child: child,
);
},
child: const _MaterialVideoControls(),
);
}
}