title: How To Add Text from the different dart file
body: <p>I am trying change the text on the click of the button using flutter.</p>
  
  <p>I have splited the widgets to different dart files. I want to add text from the different dart file but getting error as "Positional arguments must occur before named arguments. while passing the value to the constructor named TextOutput. </p>
  
  <p>What does this  error mean? a beginner in flutter so explanation of this error will be a great help. </p>
  
  <p>I am trying to pass value to the contructor but getting this error.</p>
  
  <pre><code>class TextControlState  extends State&lt;TextControl&gt; {
    String _mainText="Hey Divya Here!";
    void _changeText() {
      setState(() {
       this._mainText = "This changed!"; 
      });
    }
  Widget build(BuildContext context) {
      return Center(
      child: Container( 
        margin: EdgeInsets.all(8),
            child: 
            RaisedButton(
              child: 
              Text('Change Text', style: TextStyle(color: Colors.white, fontSize: 18)), 
              onPressed: _changeText,
              ),
              TextOutput(_mainText)
  
        ),
      );
  </code></pre>
  
  <p>TextOutput dart file </p>
  
  <pre><code>import 'package:flutter/material.dart';
  
  
  
  class TextOutput extends StatelessWidget {
     final String mainText;
     TextOutput(this.mainText);
    @override
    Widget build(BuildContext context) {
      return Text(mainText);
    }
  }
  </code></pre>
  
  <p>The value of the text should be changed on clicking of the button.</p>