toJson method

Map<String, dynamic> toJson()

Converts the span and its properties into a serializable JSON map.

Implementation

Map<String, dynamic> toJson() => {
      'text': text,
      'style': style?.toJson(),
      'onTap': onTap,
    };