Abhilash-Chandran / number_inc_dec

A flutter widget to accept numeric inputs with button to increment and decrement.

Home Page:https://pub.dev/packages/number_inc_dec

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

_tryParse method not working correctly

nsvetlakov opened this issue · comments

/// try to parse the given string into a number. num? _tryParse(String value) { final newValue = num.tryParse(value) - forget here return newValue; }
you forget to add = ?? 0;

and one more

here

if (newValue.isEmpty) { // _defaultValidator(newValue) == null

you can check like this.

please fix this in your code.
An error comes

Thank you