toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final val = <String, dynamic>{};

  void writeNotNull(String key, dynamic value) {
    if (value != null) {
      val[key] = value;
    }
  }

  writeNotNull('shape', shape);
  writeNotNull('flattened', flattened);
  return val;
}