fromJson static method

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

Implementation

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

  return TonConnectSessionEventId(
    eventId: (json['event_id'] is int
            ? json['event_id'] as int
            : int.tryParse(json['event_id']?.toString() ?? '')) ??
        0,
  );
}