fromJson static method

Uri? fromJson(
  1. dynamic dynamic
)

Implementation

static Uri? fromJson(dynamic) {
  if (dynamic == null) return null;
  if (dynamic is Uri) {
    return JsonUri(dynamic);
  } else {
    final parsed = Uri.tryParse(dynamic.toString());
    if (parsed == null) return null;
    return JsonUri(parsed);
  }
}