readFileContent function

String readFileContent(
  1. String filePath
)

Implementation

String readFileContent(String filePath) {
  try {
    return File(filePath).readAsStringSync();
  } catch (e) {
    print('Error reading the file: $e');
    return '';
  }
}