title: Pass StatefulWidget data to the State class without using constructor
body: <p>I managed to pass Stateful class variables' values to the State class through constructor like below:</p>
  
  <pre><code>import 'package:flutter/material.dart';
  
  void main() =&gt; runApp(MyApp());
  
  class MyApp extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
      return MaterialApp(
          title: 'Demo',
          home: MyHomePage('John', 'Morison'),
      );
    }
  }
  
  class MyHomePage extends StatefulWidget {
    MyHomePage(this.fname, this.lname);
  
    final String fname;
    final String lname;
  
    @override
    _MyHomePageState createState() =&gt; _MyHomePageState(fname, lname);
  }
  
  class _MyHomePageState extends State&lt;MyHomePage&gt; {
    _MyHomePageState(this.fname, this.lname);
  
    final String fname;
    final String lname;
  
    @override
    Widget build(BuildContext context) {
      return Scaffold(
        body: Center(
          child: Text('Hello $fname $lname'),
        )
      );
    }
  }
  </code></pre>
  
  <p>That's weird and I had to do lot of work as there is more than two variables. Is there a better way?</p>