fromJson static method

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

Implementation

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

  return WebAppInfo(
    launchId: (json['launch_id'] is int
            ? json['launch_id'] as int
            : int.tryParse(json['launch_id']?.toString() ?? '')) ??
        0,
    url: WebAppUrl.fromJson(json['url'] as Map<String, dynamic>?)!,
  );
}