title: How to fix 'Text is null' in flutter
body: <p>I want to create an app which has a TabBarView with two tabs. On the first Tab there is a Textfield and on the other tab there is a text widget which should display the text which you entered into Textfield
  but I always get an error because text is null.( I'm new in programming with flutter)</p>
  
  <p>I tried to initialize the variable in TextOutput class but it didn't work because the variable is final.</p>
  
  <pre><code>TabBarView(
        children: &lt;Widget&gt;[
          TextCreatePage(), TextOutput()
        ],
  
  
  
  
  class TextCreatePageState extends State&lt;TextCreatePage&gt; {
  String textvalue;
  @override
  Widget build(BuildContext context) {
    return Center(child: TextField(
      onChanged: (String value) {
      setState(() {
         textvalue = value;
         TextOutput(textvalue: textvalue,);
              });
  
  
  
  
  
  class TextOutput extends StatelessWidget {
  final String textvalue;
  
  TextOutput({this.textvalue});
  @override
  Widget build(BuildContext context) {
      return Text(textvalue); 
  }
  }
  </code></pre>