fromUrl static method
Future<NodeGraph<Map<String, dynamic> > >
fromUrl(
- String url, {
- Annotation annotationFromJson() = defaultAnnotationFromJson,
Implementation
static Future<NodeGraph<Map<String, dynamic>>> fromUrl(
String url, {
Annotation Function(Map<String, dynamic> json) annotationFromJson =
defaultAnnotationFromJson,
}) async {
final response = await http.get(Uri.parse(url));
final Map<String, dynamic> json = jsonDecode(response.body);
return fromJsonMap(json, annotationFromJson: annotationFromJson);
}