toWidget method

  1. @override
Widget toWidget(
  1. RenderContext context
)
override

Implementation

@override
Widget toWidget(RenderContext context) {
  return Container(
    key: AnchorKey.of(context.parser.key, this),
    width: context.style.width ?? 300,
    height: Theme.of(context.buildContext).platform == TargetPlatform.android
        ? 48 : 75,
    child: ChewieAudio(
      controller: ChewieAudioController(
        videoPlayerController: VideoPlayerController.network(
          src.first ?? "",
        ),
        autoPlay: autoplay,
        looping: loop,
        showControls: showControls,
        autoInitialize: true,
      ),
    ),
  );
}