How to parse a String into an Int in Dart.
String myString = "1"; int.parse(myString);
Remember to use try and catch since it can throw FormatException.
Or you can try to parse it!
So no need to wrap it in a try catch, since it will return null in case it fails to parse that String into an integer.
You can use the same with double.
Note: onError callback is deprecated