toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  return {
    'nodeIndex': [...nodeIndex],
    'styles': styles.map((e) => e.toJson()).toList(),
    'bounds': bounds.map((e) => e.toJson()).toList(),
    'text': text.map((e) => e.toJson()).toList(),
    'stackingContexts': stackingContexts.toJson(),
    if (paintOrders != null) 'paintOrders': [...?paintOrders],
    if (offsetRects != null)
      'offsetRects': offsetRects!.map((e) => e.toJson()).toList(),
    if (scrollRects != null)
      'scrollRects': scrollRects!.map((e) => e.toJson()).toList(),
    if (clientRects != null)
      'clientRects': clientRects!.map((e) => e.toJson()).toList(),
    if (blendedBackgroundColors != null)
      'blendedBackgroundColors':
          blendedBackgroundColors!.map((e) => e.toJson()).toList(),
    if (textColorOpacities != null)
      'textColorOpacities': [...?textColorOpacities],
  };
}