fromJson static method

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

Implementation

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

  switch (json['@type']) {
    case InputBackgroundLocal.constructor:
      return InputBackgroundLocal.fromJson(json);
    case InputBackgroundPrevious.constructor:
      return InputBackgroundPrevious.fromJson(json);
    case InputBackgroundRemote.constructor:
      return InputBackgroundRemote.fromJson(json);
    default:
      return null;
  }
}