getBaseSetters method
Implementation
@override
Map<String, Function> getBaseSetters() {
Map<String, Function> setters = super.getBaseSetters();
setters.addAll({
'enabled': (value) => enabled = Utils.optionalBool(value),
'floatLabel': (value) =>
floatLabel = Utils.getBool(value, fallback: false),
'required': (value) => required = Utils.getBool(value, fallback: false),
'requiredMessage': (value) => requiredMessage =
Utils.getString(value, fallback: 'This field is required'),
'icon': (value) => icon = Utils.getIcon(value),
'maxWidth': (value) =>
maxWidth = Utils.optionalInt(value, min: 0, max: 5000),
'variant': (type) => variant = InputVariant.values.from(type),
'contentPadding': (value) => contentPadding = Utils.optionalInsets(value),
'filled': (value) => filled = Utils.optionalBool(value),
'fillColor': (value) => fillColor = Utils.getColor(value),
'borderRadius': (value) => borderRadius = Utils.getBorderRadius(value),
'borderWidth': (value) => borderWidth = Utils.optionalInt(value, min: 0),
'borderColor': (color) => borderColor = Utils.getColor(color),
'enabledBorderColor': (color) =>
enabledBorderColor = Utils.getColor(color),
'disabledBorderColor': (color) =>
disabledBorderColor = Utils.getColor(color),
'errorBorderColor': (color) => errorBorderColor = Utils.getColor(color),
'focusedBorderColor': (color) =>
focusedBorderColor = Utils.getColor(color),
'focusedErrorBorderColor': (color) =>
focusedErrorBorderColor = Utils.getColor(color),
'labelStyle': (style) => labelStyle = Utils.getTextStyle(style),
'errorStyle': (style) => errorStyle = Utils.getTextStyle(style),
'floatingLabelStyle': (style) =>
floatingLabelStyle = Utils.getTextStyle(style),
'label': (value) => label = Utils.optionalString(value),
'labelText': (value) => labelText = Utils.optionalString(value),
'labelHint': (value) => labelHint = Utils.optionalString(value),
'description': (value) => description = Utils.optionalString(value),
});
return setters;
}