title: Reading the contents of a file into a String variable in Flutter
body: <p>The problem is this: I have a .txt file that contains one line of text and I need to read that line into a String variable. </p>
  
  <p>Most of the methods I found return either a Future or Future and I have no idea how to convert these types into Strings. Also, I'm not sure what I'm doing wrong with readAsStringSync because I get a "FileSystemExeption: Cannot open file (OS Error: No such file or directory)", even though I have referenced it in my pubspec.yaml</p>
  
  <pre><code>class LessonPage extends StatelessWidget { LessonPage({this.title, this.appBarColor, this.barTitleColor, this.fileName});
     final String title;
     final Color appBarColor;
     final Color barTitleColor;
     final String fileName;
  
     @override
     Widget build(BuildContext context) {
  
        final file = new File(this.fileName);
  
        return new Scaffold(
          appBar: new AppBar(
             title: new Text(
                       this.title,
                       style: new TextStyle(color: this.barTitleColor)
                    ),
             backgroundColor: this.appBarColor,
          ),
          body: new Center(
             child: new Text(
             file.readAsStringSync(),
             softWrap: true,
          )
      ),
  );
  </code></pre>