toMap method

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

model -> map

Implementation

@override
Map<String, Object> toMap() {
  return {
    'code': this.code,
    'name': this.name,
    'center': this.center?.toMap(),
    'paths': this
        .paths
        ?.map((list) => list?.map((coord) => coord.toMap())?.toList())
        ?.toList()
  };
}