toMap method Null safety

Map<String, dynamic> toMap()

Implementation

Map<String, dynamic> toMap() {
  return {
    "message": message,
    "defaultText": defaultValue,
    "okLabel": okLabel,
    "cancelLabel": cancelLabel,
    "handledByClient": handledByClient,
    "value": value,
    "action": action?.index
  };
}