fromJson static method

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

Implementation

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

  return InputBackgroundRemote(
    backgroundId: (json['background_id'] is int
            ? json['background_id'] as int
            : int.tryParse(json['background_id']?.toString() ?? '')) ??
        0,
  );
}