- Migrated to null safety
-
autovalidate
has been replaced withautovalidateMode
. More details in TextFormField [docs](TextFormField class - material library - Dart API)-
In your code replace
autovalidate: true
toautovalidateMode: AutovalidateMode.always
-
In your code replace
autovalidate: false
toautovalidateMode: AutovalidateMode.disabled
-
-
autovalidateMode
is by default set toalways
. The morale behind this is to perform validations similar to html's<input type='number'>
tag kind validation performed in chrome. Its not up to the specification but at least mimics to its best. -
New attribute
enableMinMaxClamping
is created to and handles the behavior of clamping the values tomin
andmax
when provided. For example ifmin
is -2 and user enter -5 this is auto-corrected to -2. By default this is attribute is set totrue
. -
New attribute
onChanged
is introduced which when provided will be called whenever the user edits the value. Note this callback will not be called if any validation error exists. -
By default the numbers will be validated for stepped increments like in browser and suggest valid nearest possible values. The intention is to mimic the behavior of number field in Chrome.
-
Fixes the following bugs.
- "autovalidate" is deprecated. Use "autovalidateMode" parameter instead.
- Validation errors causes inc/dec button decoration to displace
- Entering negative numbers when text editing is not possible
- ClampAndUpdate inconsistent while editing.
- NumberInputPrefabbed class unnecessarily re-declares attributes
- onSubmitted callback doesn't update the controller
- While editing the numbers manually the incDecFactor is not considered.
- NumberInputPrefabbed.roundedEdgeButtons doesn't allow overriding the numberFieldDecoration property.
- Improve code coverage
- Add missing documentation
- Merged pull request which enables
onSubmitted
for the widget.- Thank you Andy Bulka 🥇 😄.
- increased test coverage.
- fixed lot of typo errors in documentation and code.
- Added
enable
andstyle
attribute to the widgets. - Replace deprecated WhiteListingTextFormatter with FilteringTextInputFormatter.
-
Added examples for
buttonArrangement
options. -
Added example for
onIncrement
&onDecrement
callbacks -
Fixed some spell check errors in readme.
-
Added 5 different prefabbed widgets for ease of use and as example.
-
Added scale factors for width and height.
-
Provided more options such as icon size, background color and decoration.
-
Added options for call back on Increment and Decrement
-
Added options for different layouts of the increment decrement buttons.
- A initial release of the NumberIncrementDecrement Widget
-
Expose all options of the TextFormField for more customized control.
-
Add more prefabbed widgets.
-
Write golden test cases.
-
Expose call back options
-
Expose more options for Icons.