fromAssetMap static method
Future<NodeGraph<Map<String, dynamic> > >
fromAssetMap(
- String assetPath, {
- Annotation annotationFromJson() = defaultAnnotationFromJson,
Convenience method to load graph with Map data from asset file
Implementation
static Future<NodeGraph<Map<String, dynamic>>> fromAssetMap(
String assetPath, {
Annotation Function(Map<String, dynamic> json) annotationFromJson =
defaultAnnotationFromJson,
}) async {
final String jsonString = await rootBundle.loadString(assetPath);
return fromJsonStringMap(
jsonString,
annotationFromJson: annotationFromJson,
);
}