fromJson static method

WikiDataSearchResult fromJson({
  1. String? sj,
  2. dynamic dj,
})

Implementation

static WikiDataSearchResult fromJson({String? sj, dynamic dj}) {
  if (sj != null && dj != null) throw UnimplementedError();
  dj ??= jsonEncode(sj);
  return WikiDataSearchResult(
    dj["title"],
    dj["snippet"],
  );
}