title: Can't Update a String Variable After initializing it in Flutter
body: <p>I want to Update the new value of the 'holecode' variable in 'inputform.dart' then get this new value to the 'otpscreen.dart'
  The Problem that in each time I try to get the value of the 'holecode' string variable I get the 'default' value which I initialize it.I tried to make the 'holecode' variable as <code>late String holecode;</code> but it return Null in the second Screen in each time I try to get it's value.</p>
  <p>inputform.dart:</p>
  <pre><code>import 'package:flutter/material.dart';
  class Inputform extends StatefulWidget {
    List&lt;String&gt; code = [&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;];
    String holeCode = &quot;default&quot;;
    @override
    State&lt;Inputform&gt; createState() =&gt; InputformState();
  }
  
  class InputformState extends State&lt;Inputform&gt; {
    @override
    Widget build(BuildContext context) {
      return TextFormField(
                onChanged: (value) {
                  setState(() {
                    widget.code[0] = value;
                    widget.holeCode = widget.code[0] + 222205;
                  });
                  if (value.length == 1) {
                    FocusScope.of(context).nextFocus();
                   }
                  }
                 ),
                },
  </code></pre>
  <p>otp.dart:</p>
  <pre><code>import 'package:flutter/material.dart';
  
  class OtpVerification extends StatefulWidget {
    @override
    State&lt;StatefulWidget&gt; createState() =&gt; Otp();
  }
  class Otp extends State&lt;OtpVerification&gt; {
    final Inputform ani= new Inputform ();
  
    @override
    Widget build(BuildContext context) {
      return Scaffold(
          child: 
              FlatButton(
                onPressed: () {
                  // trying to print the new value in this screen but it 
                  //return the default value 'default'
                  print(ani.holeCode);
        ),
      );
    }
  </code></pre>