build method

  1. @override
Widget build(
  1. BuildContext context,
  2. TreeState state,
  3. dynamic nodeState
)
override

Implementation

@override
Widget build(final BuildContext context, final TreeState state,
    final WidgetState nodeState) {
  return IgnorePointer(
    ignoring: !state.forPlay,
    child: GestureDetector(
      onTap: () {
        onTap.call();
      },
      onDoubleTap: () {
        onDoubleTap.call();
      },
      onLongPress: () {
        onLongPress.call();
      },
      child: SizedBox(
        width: width.get(
          forPlay: state.forPlay,
          deviceType: state.deviceType,
          deviceInfo: state.deviceInfo,
          context: context,
          isWidth: true,
        ),
        height: height.get(
          forPlay: state.forPlay,
          deviceType: state.deviceType,
          deviceInfo: state.deviceInfo,
          context: context,
          isWidth: false,
        ),
        child: DecoratedBox(
          decoration: ThetaBoxDecoration.get(
            state: state,
            context: context,
            fill: fill.get(context, state.colorStyles, state.theme),
            borderRadius: borderRadius,
          ),
          child: Center(
            child: SizedBox(
              width: double.maxFinite,
              child: TextBuilder(
                nodeState: nodeState,
                textStyle: textStyle,
                value: value,
              ),
            ),
          ),
        ),
      ),
    ),
  );
}