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,
}) =>
    state.node.getAttributes[DBKeys.featherIcon] != null
        ? OpenWFeatherIcon(
            context: context,
            nodeState: state,
            width: state.node.getAttributes[DBKeys.width] as FSize,
            icon: state.node.getAttributes[DBKeys.featherIcon] ?? 'plus',
            fill: state.node.getAttributes[DBKeys.fill] as FFill,
          )
        : state.node.getAttributes[DBKeys.faIcon] != null
            ? OpenWFontAwesome(
                context: context,
                nodeState: state,
                width: state.node.getAttributes[DBKeys.width] as FSize,
                icon: state.node.getAttributes[DBKeys.faIcon] ?? 'plus',
                fill: state.node.getAttributes[DBKeys.fill] as FFill,
              )
            : OpenWIcon(
                context: context,
                nodeState: state,
                width: state.node.getAttributes[DBKeys.width] as FSize,
                icon: state.node.getAttributes[DBKeys.icon] ?? 'plus',
                fill: state.node.getAttributes[DBKeys.fill] as FFill,
              );