title: Flutter error : The constructor being called isn't a const constructor
body: <p>I'm working on my first Flutter project, I'm building a Login page, I created a variable to store a TextFormFieldController but I got the error above because I deleted the constructor.
  When I return this constructor I cant declare a global variable to store the TextFormFieldController.</p>
  <p>this is my code : (the Login page) :</p>
  <pre><code>import 'package:flutter/material.dart';
  
  class LoginScreen extends StatelessWidget {
    var loginUsernameController = TextEditingController();
  
    @override
    Widget build(BuildContext context) {
      return Scaffold(
        appBar: AppBar(),
        body: Padding(
          padding: const Edge
  
  Insets.all(20.0),
          child: Column(
            crossAxisAlignment: CrossAxisAlignment.start,
            children: [
              const Text(
                &quot;Login&quot;,
                style: TextStyle(fontSize: 40, fontWeight: FontWeight.bold),
              ),
              const SizedBox(
                height: 40,
              ),
              TextFormField(
                decoration: const InputDecoration(
                  labelText: &quot;Email Address&quot;,
                  border: OutlineInputBorder(),
                  prefixIcon: Icon(Icons.email),
                ),
                keyboardType: TextInputType.emailAddress,
              ),
              const SizedBox(
                height: 10,
              ),
      
  
      TextFormField(
                controller: TextEditingController(),
                obscureText: true,
                decoration: const InputDecoration(
                  labelText: &quot;Password&quot;,
                  border: OutlineInputBorder(),
                  prefixIcon: Icon(Icons.lock),
                  suffixIcon: Icon(Icons.remove_red_eye),
                ),
                keyboardType: TextInputType.emailAddress,
              ),
              const SizedBox(
                height: 20,
              ),
              Container(
                width: double.infinity,
                child: MaterialButton(
                  onPressed: () {},
                  child: const Text(
                    &quot;LOGIN&quot;,
                    style: TextStyle(color: Colors.white),
                  ),
                  color: Colors.blue,
                ),
              )
            ],
          ),
        ),
      );
    }
  }
  </code></pre>
  <p>this is the main.dart (Where I got the error) :</p>
  <pre><code>import 'package:flutter/material.dart';
  
  import 'login_screen.dart';
  
  void main() {
    runApp(MyApp());
  }
  
  class MyApp extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
      return const MaterialApp(
        debugShowCheckedModeBanner: false,
        home: LoginScreen(),
      );
    }
  }
  </code></pre>