MaterialDesktopVideoControls function

Widget MaterialDesktopVideoControls(
  1. VideoState state
)

Video controls which use Material design.

Implementation

Widget MaterialDesktopVideoControls(VideoState state) {
  final theme = MaterialDesktopVideoControlsTheme.maybeOf(state.context);
  if (theme == null) {
    return VideoStateInheritedWidget(
      state: state,
      controlsThemeDataBuilder: null,
      child: const MaterialDesktopVideoControlsTheme(
        normal: kDefaultMaterialDesktopVideoControlsThemeData,
        fullscreen: kDefaultMaterialDesktopVideoControlsThemeDataFullscreen,
        child: _MaterialDesktopVideoControls(),
      ),
    );
  } else {
    return VideoStateInheritedWidget(
      state: state,
      controlsThemeDataBuilder: (child) {
        return MaterialDesktopVideoControlsTheme(
          normal: theme.normal,
          fullscreen: theme.fullscreen,
          child: child,
        );
      },
      child: const _MaterialDesktopVideoControls(),
    );
  }
}