toMap method Null safety

  1. @override
Map<String, Object?> toMap()

model -> map

Implementation

@override
Map<String, Object?> toMap() {
  return {
    'data': this
        .data
        ?.map((weightedCoordinate) => weightedCoordinate.toMap())
        .toList(),
    'radius': this.radius,
    'opacity': this.opacity,
    'gradient': this.gradient?.toMap(),
    'datas': this
        .datas
        ?.map((list) => list.map((node) => node.toMap()).toList())
        .toList(),
    'mMaxHight': this.mMaxHight,
    'mMaxIntensity': this.mMaxIntensity,
    'mMinIntensity': this.mMinIntensity,
    'animation': this.animation?.toMap(),
    'frameAnimation': this.frameAnimation?.toMap(),
  };
}