buildView method
Widget
buildView(
- Map<
String, dynamic> arguments, - PlatformViewCreatedCallback onPlatformViewCreated
override
Returns a widget displaying the button.
Implementation
@override
Widget buildView(Map<String, dynamic> arguments,
PlatformViewCreatedCallback onPlatformViewCreated) {
if (defaultTargetPlatform == TargetPlatform.android) {
return AndroidView(
viewType: 'ChromeCastButton',
onPlatformViewCreated: onPlatformViewCreated,
creationParams: arguments,
creationParamsCodec: const StandardMessageCodec(),
);
}
return Text('$defaultTargetPlatform is not supported by ChromeCast plugin');
}