encodeInputDecorationTheme static method
Encodes the given value
to a JSON representation.
{
"activeIndicatorBorder": "<BorderSide>",
"alignLabelWithHint": "<bool>",
"border": "<InputBorder>",
"constraints": "<BoxConstraints>",
"contentPadding": "<EdgeInsetsGeometry>",
"counterStyle": "<TextStyle>",
"disabledBorder": "<InputBorder>",
"enabledBorder": "<InputBorder>",
"errorBorder": "<InputBorder>",
"errorMaxLines": "<int>",
"errorStyle": "<TextStyle>",
"fillColor": "<Color>",
"filled": "<bool>",
"floatingLabelAlignment": "<FloatingLabelAlignment>",
"floatingLabelBehavior": "<FloatingLabelBehavior>",
"floatingLabelStyle": "<TextStyle>",
"focusColor": "<Color>",
"focusedBorder": "<InputBorder>",
"focusedErrorBorder": "<InputBorder>",
"helperMaxLines": "<int>",
"helperStyle": "<TextStyle>",
"hintFadeDuration": "<Duration>",
"hintStyle": "<TextStyle>",
"hoverColor": "<Color>",
"iconColor": "<Color>",
"isCollapsed": "<bool>",
"isDense": "<bool>",
"labelStyle": "<TextStyle>",
"outlineBorder": "<BorderSide>",
"prefixIconColor": "<Color>",
"prefixStyle": "<TextStyle>",
"suffixStyle": "<Color>",
"suffixStyle": "<TextStyle>"
}
See also:
Implementation
static Map<String, dynamic>? encodeInputDecorationTheme(
InputDecorationTheme? value,
) {
Map<String, dynamic>? result;
if (value != null) {
result = <String, dynamic>{
'activeIndicatorBorder': encodeBorderSide(value.activeIndicatorBorder),
'alignLabelWithHint': value.alignLabelWithHint,
'border': encodeInputBorder(value.border),
'constraints': encodeBoxConstraints(value.constraints),
'contentPadding':
encodeEdgeInsetsGeometry(value.contentPadding as EdgeInsets?),
'counterStyle': encodeTextStyle(value.counterStyle),
'disabledBorder': encodeInputBorder(value.disabledBorder),
'enabledBorder': encodeInputBorder(value.enabledBorder),
'errorBorder': encodeInputBorder(value.errorBorder),
'errorMaxLines': value.errorMaxLines,
'errorStyle': encodeTextStyle(value.errorStyle),
'fillColor': encodeColor(value.fillColor),
'filled': value.filled,
'floatingLabelAlignment': encodeFloatingLabelAlignment(
value.floatingLabelAlignment,
),
'floatingLabelBehavior': encodeFloatingLabelBehavior(
value.floatingLabelBehavior,
),
'floatingLabelStyle': encodeTextStyle(value.floatingLabelStyle),
'focusColor': encodeColor(value.focusColor),
'focusedBorder': encodeInputBorder(value.focusedBorder),
'focusedErrorBorder': encodeInputBorder(value.focusedErrorBorder),
'helperMaxLines': value.helperMaxLines,
'helperStyle': encodeTextStyle(value.helperStyle),
'hintFadeDuration': value.hintFadeDuration?.inMilliseconds,
'hintStyle': encodeTextStyle(value.hintStyle),
'hoverColor': encodeColor(value.hoverColor),
'iconColor': encodeColor(value.iconColor),
'isCollapsed': value.isCollapsed,
'isDense': value.isDense,
'labelStyle': encodeTextStyle(value.labelStyle),
'outlineBorder': encodeBorderSide(value.outlineBorder),
'prefixIconColor': encodeColor(value.prefixIconColor),
'prefixStyle': encodeTextStyle(value.prefixStyle),
'suffixIconColor': encodeColor(value.suffixIconColor),
'suffixStyle': encodeTextStyle(value.suffixStyle),
};
}
return _stripDynamicNull(result);
}