ryParse.html">tryParse</a> to handle a parsing error.
Example:</p>
<pre class="language-dart"><code class="language-dart">var value = int.tryParse(text);
if (value == null) ... handle the problem
</code></pre>
<p>The <code>onError</code> parameter is deprecated and will be removed.
Instead of <code>int.parse(string, onError: (string) =&gt; ...)</code>,
you should use <code>int.tryParse(string) ?? (...)</code>.</p>
<p>When the source string is not valid and <code>onError</code> is provided,
whenever a <a hre