fromDartBundle static method
Converts a dart bundle into a MasonBundle
instance.
Implementation
static Future<MasonBundle> fromDartBundle(String content) async {
final bundleJsonString = content.substring(
content.indexOf('{'),
content.lastIndexOf('}') + 1,
);
final bundleJson = await Isolate.run(
() => json.decode(bundleJsonString) as Map<String, dynamic>,
);
return MasonBundle.fromJson(bundleJson);
}