title: How can i get int data from TextEditingController in flutter
body: <p>i want to get int data entered in the TextField() in flutter, i using TextEditingController:</p>
  
  <pre><code>TextEditingController _section_id = new TextEditingController();
  </code></pre>
  
  <p>and using this controller in it:</p>
  
  <pre><code>TextField(controller: _section_id,
                  keyboardType: TextInputType.number,)
  </code></pre>
  
  <p>but now, how can i get int data?
  i try this way by </p>
  
  <pre><code>Repository().placeAddApiProvider(_section_id.text)
  </code></pre>
  
  <p>but its for just string, and try cast to int,</p>
  
  <pre><code>Repository().placeAddApiProvider(_section_id.text as int)
  
   but it is not work show me this error:
  Unhandled Exception: type 'String' is not a subtype of type 'int' in type cast
  E/flutter ( 6950): #0      AddPlaceState.build.&lt;anonymous closure&gt; (package:mosul/src/ui/users/add_place.dart:93:50)
  E/flutter ( 6950): &lt;asynchronous suspension&gt;
  E/flutter ( 6950): #1      _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:513:14)
  E/flutter ( 6950): #2      _InkResponseState.build.&lt;anonymous closure&gt; (package:flutter/src/material/ink_well.dart:568:30)
  E/flutter ( 6950): #3      GestureRecognizer.invokeCallback (package:flutter/src/gestu...
  </code></pre>
  
  <p>Thank you</p>