readTextFile function

String readTextFile(
  1. String filePath, [
  2. String baseFolderPath = ''
])

Implementation

String readTextFile(
    String filePath,
    [
        String baseFolderPath = ''
    ]
    )
{
    try
    {
        return File( getPhysicalFilePath( filePath, baseFolderPath ) ).readAsStringSync();
    }
    catch ( error )
    {
        print( error );
        rethrow;
    }
}