toWidget method

  1. @override
Widget toWidget({
  1. required BuildContext context,
  2. required dynamic state,
})

Implementation

@override
Widget toWidget({
  required final BuildContext context,
  required final WidgetState state,
}) =>
    OpenWSwitch(
      state: state,
      value: state.node.getAttributes[DBKeys.valueBool] as bool? ?? false,
      activeColor: state.node.getAttributes[DBKeys.activeColor] as FFill,
      activeTrackColor:
          state.node.getAttributes[DBKeys.activeTrackColor] as FFill,
      inactiveThumbColor:
          state.node.getAttributes[DBKeys.inactiveThumbColor] as FFill,
      inactiveTrackColor:
          state.node.getAttributes[DBKeys.inactiveTrackColor] as FFill,
      focusColor: state.node.getAttributes[DBKeys.focusColor] as FFill,
      hoverColor: state.node.getAttributes[DBKeys.hoverColor] as FFill,
    );