loadAsset static method
Load an asset from the project using an assetPath
.
Implementation
static Future<String> loadAsset(String assetPath) async {
File file = File(assetPath);
if ((await file.exists()) == false) {
return "";
}
return await file.readAsString();
}