toMap method Null safety

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

Implementation

@override
Map<String, Object?> toMap() {
  return {
    'startCoord': this.startCoord?.toMap(),
    'startName': this.startName,
    'endCoord': this.endCoord?.toMap(),
    'endName': this.endName,
    'naviType': this.naviType != null ? this.naviType!.index : null,
    'appScheme': this.appScheme,
    'appName': this.appName,
    'isSupportWeb': this.isSupportWeb,
    'preferenceType': this.preferenceType?.index
  };
}