You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One fix should be to add universal round. (not tested)
number universalRound (num number){
numDecimals = (number - number.toInt()).toString.length().clamp(0,10);
divisor = 10 ^ numDecimals;
// multiply by number of decimals add .5 then round then divide by the number of decimals and throw away the remainder.
number = (((number * divisor) + .5).round()) ~/ divisor) ;
return number;
Something like that ...
The text was updated successfully, but these errors were encountered:
The divisors is already set at 200. It is not giving me a decimal point, it
is giving me 15 decimal points...
FormBuilderSlider(
attribute: "slider",
validators: [FormBuilderValidators.min(6)],
onChanged: (val){
// _bidController.text = val;
_setBidValue(val);
},
min: 0.0,
max: 10000.0,
initialValue: 200.0,
divisions: 200,
activeColor: Colors.red,
inactiveColor: Colors.pink[100],
decoration: InputDecoration(
labelText: "Bid in Elan",
),
),
Writing a controller for the slider it can be positioned where .999999999999 or .0000000001 appears.
Did a work around to call a function that does round.
One fix should be to add universal round. (not tested)
The text was updated successfully, but these errors were encountered: