openFile static method

Future<String> openFile(
  1. String path
)

Implementation

static Future<String> openFile(String path) async {
  final File file = File(path);
  try {
    if (await file.exists()) {
      Uint8List result = await file.readAsBytes();
      String strResult = ConvertHelper.convertUint8ListToString(result);
      return strResult;
    } else {
      return "";
    }
  } catch (e) {
    return "";
  }
}