toWidget method
Implementation
@override
Widget toWidget({
required final BuildContext context,
required final WidgetState state,
}) =>
OpenWTextField(
state: state,
contentPadding:
state.node.getAttributes[DBKeys.contentPadding] as FMargins,
value: state.node.getAttributes[DBKeys.value] as FTextTypeInput? ??
const FTextTypeInput(),
textStyle: state.node.getAttributes[DBKeys.textStyle] as FTextStyle? ??
const FTextStyle(),
labelText:
state.node.getAttributes[DBKeys.labelText] as FTextTypeInput? ??
const FTextTypeInput(),
fill: state.node.getAttributes[DBKeys.fill] as FFill,
width: state.node.getAttributes[DBKeys.width] as FSize,
keyboardType:
state.node.getAttributes[DBKeys.keyboardType] as FKeyboardType,
borderRadius:
state.node.getAttributes[DBKeys.borderRadius] as FBorderRadius,
maxLenght: state.node.getAttributes[DBKeys.maxLenght] as FTextTypeInput,
maxLines: state.node.getAttributes[DBKeys.maxLines] as FTextTypeInput,
minLines: state.node.getAttributes[DBKeys.minLines] as FTextTypeInput,
showCursor:
state.node.getAttributes[DBKeys.showCursor] as bool? ?? false,
autoCorrect:
state.node.getAttributes[DBKeys.autoCorrect] as bool? ?? false,
obscureText:
state.node.getAttributes[DBKeys.obscureText] as bool? ?? false,
cursorColor: state.node.getAttributes[DBKeys.cursorColor] as FFill,
hintTextColor: state.node.getAttributes[DBKeys.hintTextColor] as FFill,
enabledBorderColor:
state.node.getAttributes[DBKeys.enabledBorderColor] as FFill,
focusedBorderColor:
state.node.getAttributes[DBKeys.focusedBorderColor] as FFill,
showBorders:
state.node.getAttributes[DBKeys.showBorders] as bool? ?? false,
bordersSize:
state.node.getAttributes[DBKeys.bordersSize] as FTextTypeInput,
);