toMap method Null safety

Map<String, Map<String, dynamic>> toMap()

Implementation

Map<String, Map<String, dynamic>> toMap() {
  return {"trigger": trigger.toMap(), "action": action.toMap()};
}