ChromeCastButton constructor

ChromeCastButton({
  1. Key? key,
  2. double size = 30.0,
  3. Color color = Colors.black,
  4. OnButtonCreated? onButtonCreated,
  5. VoidCallback? onSessionStarted,
  6. VoidCallback? onSessionEnded,
  7. VoidCallback? onRequestCompleted,
  8. OnRequestFailed? onRequestFailed,
  9. OnPlayerStatusUpdated? onPlayerStatusUpdated,
})

Creates a widget displaying a ChromeCast button.

Implementation

ChromeCastButton({
  super.key,
  this.size = 30.0,
  this.color = Colors.black,
  this.onButtonCreated,
  this.onSessionStarted,
  this.onSessionEnded,
  this.onRequestCompleted,
  this.onRequestFailed,
  this.onPlayerStatusUpdated,
}) : assert(
       defaultTargetPlatform == TargetPlatform.iOS ||
           defaultTargetPlatform == TargetPlatform.android,
       '$defaultTargetPlatform is not supported by this plugin',
     );