<p dir="auto">I noticed a problem when wanting to have a TextField selection and then replacing the selected text when typing.</p>
<p dir="auto">I tried the Flutter Gallery app v0.5.1 and it has the same problem.</p>
<h2 dir="auto">Steps to Reproduce</h2>

<ol dir="auto">
<li>Open Flutter Gallery v0.5.1</li>
<li>Go to Material -&gt; Text fields</li>
<li>Write something in the Salary input</li>
<li>Select some numbers and then start writing new ones</li>
</ol>
<p dir="auto">I would expect the selected text to be replaced by the new one but instead it is added before the selection. The same behavior is seen on TextInputType.number and TextInputType.phone but not on TextInputType.text for example.</p>
<h2 dir="auto">Logs</h2>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate"></code></pre></div>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate"></code></pre></div>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate"></code></pre></div>
<p dir="auto">i write chat on websocket, I do not have access to the socket connection state, I found states in private sources(connecting, open etc)</p>
<p dir="auto">in current implementation unclear, client connected to socket or performed connection.</p>
<p dir="auto">in below example , onDone called with long delay, although pong not received and socket closed.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="var channel = IOWebSocketChannel.connect('ws://echo.websocket.org', pingInterval: Duration(milliseconds: 1000));
channel.stream.listen((d) {
  print(d);
}, onDone: () {
  print('done');
}, onError: (error) {
  print(error);
});"><pre class="notranslate"><code class="notranslate">var channel = IOWebSocketChannel.connect('ws://echo.websocket.org', pingInterval: Duration(milliseconds: 1000));
channel.stream.listen((d) {
  print(d);
}, onDone: () {
  print('done');
}, onError: (error) {
  print(error);
});
</code></pre></div>
<p dir="auto">what I want: example, stream of connection state(connecting, connected, error, closed, etc)<br>
i subscribed in page for change ui state(example show connection indicator(color dot). or make access to socket state, and run Timer with checking it value.</p>