fromJson static method

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

Implementation

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

  return OptionValueInteger(
    value: (json['value'] is int
            ? json['value'] as int
            : int.tryParse(json['value']?.toString() ?? '')) ??
        0,
  );
}