fromJson static method

FeedbackData? fromJson(
  1. Map<String, dynamic>? json
)

Returns a new FeedbackData instance and imports its values from json if it's non-null, null if json is null.

Implementation

static FeedbackData? fromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return null;
  }

  return FeedbackData(
    batch: json[r'batch'],
    businessActivity: json[r'businessActivity'],
    category: json[r'category'],
    description: json[r'description'],
    geo: FeedbackDataGeo.fromJson(json[r'geo'])!,
    metadata: json[r'metadata'] == null
        ? null
        : Map<String, Object>.from(json[r'metadata']),
    place: json[r'place'],
    priority: json[r'priority'],
    reporter: json[r'reporter'],
    visibility: FeedbackDataVisibilityEnum.fromJson(json[r'visibility'])!,
  );
}