loadAsset static method

Future<String> loadAsset(
  1. String assetPath
)

Implementation

static Future<String> loadAsset(String assetPath) async {
  File file = File(assetPath);
  if ((await file.exists()) == false) {
    return "";
  }
  return await file.readAsString();
}