build method

  1. @override
InlineSpan build()
override

Implementation

@override
InlineSpan build() {
  double? width;
  double? height;
  if (attribute['width'] != null) width = double.parse(attribute['width']!);
  if (attribute['height'] != null) {
    height = double.parse(attribute['height']!);
  }
  final link = attribute['src'] ?? '';
  return WidgetSpan(
      child: SizedBox(
    width: width,
    height: height,
    child: RixaPlayer.network(url: link),
  ));
}