fromJson static method

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

Implementation

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

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