title: Trying to convert TextFormField
body: <p>I am trying to convert <code>TextEditingController</code> into <code>int</code> because I want to delete the user ID from database by using <code>TextEditingController</code>.</p>
  <p>look at: (&lt;-------) in the code to understand.</p>
  <p>and here is my code:</p>
  <pre><code>import 'package:flutter/material.dart';
          import 'package:untitled/database.dart';
          import './model/columns.dart';
          import './database.dart';
          
          void main() {
            WidgetsFlutterBinding.ensureInitialized();
            runApp(MyApp());
          }
          
          class MyApp extends StatefulWidget {
            @override
            _MyAppState createState() =&gt; _MyAppState();
          }
          class _MyAppState extends State&lt;MyApp&gt; {
          
            @override
            void dispose() {
              textController.dispose();
              super.dispose();
            }
          
            final textController = TextEditingController();
            int? selectedId;
          
            @override
            Widget build(BuildContext context) {
              return MaterialApp(
                home: Scaffold(
                    appBar: AppBar(
                      title: Text(&quot;App&quot;),
                    ),
                    body: Form(
                      child: Column(
                        children: [
                          Padding(
                            padding: const EdgeInsets.all(8.0),
                            child: TextField(
                              controller: textController,
                              decoration: InputDecoration(
                                  labelText: &quot;Insert row&quot;,
                                  border: OutlineInputBorder(
                                      borderRadius: BorderRadius.circular(25))),
                            ),
                          ),
                          ElevatedButton(
                            child: Icon(Icons.save),
                            onPressed: () async {
                              await DatabaseHelper.instance
                                  .insert(Users(name: textController.text));
                              setState(() {
                                textController.clear();
                              });
                              print(&quot;Inserted!&quot;);
                            },
                          ),
          
                          Padding(
                            padding: const EdgeInsets.all(8.0),
                            child: TextFormField(
                              //controller: selectedId, // &lt;-------
                              decoration: InputDecoration(
                                  labelText: &quot;Delete ID&quot;,
                                  border: OutlineInputBorder(
                                      borderRadius: BorderRadius.circular(25))),
                              keyboardType: TextInputType.number,
                            ),
                          ),
                          ElevatedButton(
                            child: Icon(Icons.delete),
                            onPressed: () async {
                              DatabaseHelper.instance.delete(selectedId!); // &lt;-------
                            },
                          ),
                          ElevatedButton(
                            child: Text(&quot;Check all rows&quot;),
                            onPressed: () async {
                              print(await DatabaseHelper.instance.queryAll());
                            },
                          ),
                        ],
                      ),
                    )),
              );
            }
          }
  </code></pre>