title: NoSuchMethodError: invalid member on nul: "_set"
body: <p>I am new to flutter.
  I am trying make Total of Listview textfield.
  But when insert line below in ItemBuilder</p>
  <p><strong>t1[index] = TextEditingController();</strong></p>
  <p>it throows error
  <strong>NoSuchMethodError: invalid member on nul: &quot;_set&quot;</strong>
  but when.  I have declare variable of List T1
  for this purpose .Please solution for
  total of textfield in ListView.</p>
  <p>Sample code is attached.
  Thanks in advance.</p>
  <pre><code>
  import 'package:flutter/material.dart';
  
  void main() {
    runApp(MyApp());
  }
  
  class MyApp extends StatelessWidget {
    // This widget is the root of your application.
    @override
    Widget build(BuildContext context) {
      return MaterialApp(
        title: 'Flutter Demo',
        theme: ThemeData(
          primarySwatch: Colors.blue,
        ),
        home: MyHomePage(),
      );
    }
  }
  
  class MyHomePage extends StatefulWidget {
    @override
    _MyHomePageState createState() =&gt; _MyHomePageState();
  }
  
  class _MyHomePageState extends State&lt;MyHomePage&gt; {
    List data = [&quot;apple kg&quot;, &quot;banana kg&quot;, &quot;mango kg&quot;];
    List&lt;TextEditingController&gt; t1;
  
    @override
    Widget build(BuildContext context) {
      return Scaffold(
        body: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            Container(
              width: 400,
              height: 300,
              child: ListView.builder(
                itemCount: data.length,
                itemBuilder: (context, index) {
                  t1[index] = TextEditingController();
                  return Container(
                    width: 300,
                    decoration: BoxDecoration(
                      border: Border.all(color: Colors.blue, width: 0.5),
                    ),
                    child: Column(
                      children: [
                        Text(data[index]),
                        TextField(),
                      ],
                    ),
                  );
                },
              ),
            ),
            Text(&quot;TOTAL SALE&quot;),
          ],
        ),
      );
    }
  }
  
  </code></pre>