toMap method Null safety

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

model -> map

Implementation

@override
Map<String, Object?> toMap() {
  return Map.from(super.toMap())
    ..addAll({
      'colorWeight': this.colorWeight,
      'radiusWeight': this.radiusWeight,
      'centerColor': this.centerColor?.value.toRadixString(16),
      'sideColor': this.sideColor?.value.toRadixString(16),
    });
}