readFile static method

Future<String> readFile(
  1. String filePath, {
  2. dynamic isTest = false,
})

Implementation

static Future<String> readFile(String filePath, {isTest = false}) async {
  return isTest || !filePath.contains("assets")
      ? File(filePath).readAsString()
      : rootBundle.loadString(filePath);
}