Flutter
Is new design vision part implemented using new tokens?
Flutter
Is new design vision part implemented using new tokens?
OptimusNumberInput(
label: 'Label',
placeholder: 'Placeholder',
onChanged: () {},
min: 0,
max: 12,
allowNegate: false,
isEnabled: true,
size: OptimusWidgetSize.large,
precision: 2,
separatorVariant: OptimusNumberSeparatorVariant.commaAndStop,
step: 1,
),
OptimusStandaloneLink Example
Name |
Type |
Default Value |
Description |
---|---|---|---|
allowNegate |
bool |
false |
Whether negative values are allowed. Disabled by default. |
isEnabled |
boold |
true |
Whether the input is enabled. |
error |
String? |
|
Error message to be displayed. |
helperMessage |
Widget? |
|
Helper widget to be displayed below the input. |
isInlined |
bool |
false |
Whether the input is inlined. |
label |
String? |
|
Label widget to be displayed above the input. |
showLoader |
bool |
false |
Whether a loading indicator is displayed. |
max |
double |
12 |
Maximum value allowed. |
min |
double |
0 |
Minimum value allowed. In case of an error, the input will be set to this value. Default is 0. |
placeholder |
String? |
|
Placeholder text to be displayed when the input is empty. |
precision |
int |
2 |
Number of decimal places allowed. |
prefix |
Widget? |
|
Prefix widget to be displayed before the input. |
isRequired |
bool |
false |
Whether the input is required. |
separatorVariant |
OptimuNumberSeparatorVariant |
OptimusNumberSeparatorVariant.commaAndStop |
Separator variant to be used. |
size |
OptimusWidgetSize |
OptimusWidgetSize.large |
Size of the input widget. |
suffix |
Widget? |
|
Suffix widget to be displayed after the input. |
onChanged |
ValueChanged<String> |
|
A callback is called when the value changes. |
focusNode |
FocusNode? |
|
An optional focus node to be used. |
controller |
TextEditingController? |
|
An optional controller to be used. |
step |
double |
1 |
The step by which the value is increased or decreased. |
isReadOnly |
bool |
false |
Whether the input is read-only. |
onSubmitted |
ValueChanged<String>? |
|
Callback that is called with the actual value |