title: How do i concatenate two strings where one needs to be a static variable from a Widget in flutter
body: <p>I have this code from a stateful widget which looks like</p>
  <pre><code> static String code = '+1';
   String phone;
   String finalphone = '$code' + '$phone';  =&gt;this declaration brings an error 
   that 'Only static members can be accessed in initializers'
  </code></pre>
  <p>How am I supposed to bring the two variables together so that i have something that looks like <code>+1535465345</code> i am collecting user information</p>
  <pre><code> //the widget
  
   Widget form() {
    return Form(
    key: _formKey,
      child: TextFormField(
        decoration: InputDecoration(
          contentPadding: EdgeInsets.all(0.0),
        ),
        style: TextStyle(
            letterSpacing: 2.0,
            fontSize: 19.0,
            fontWeight: FontWeight.bold,
            color: Colors.black87),
        onSaved: (value) =&gt; phone = value,               //the (value)  here is a 
                                                         //string which is 
                                                         //assigned 
                                                  //to phone variable declared at the top
      ),
    ),
  );
  }
  </code></pre>
  <p>also making the phone variable static and printing out the concatenated string brings out <code>+1null</code></p>