getBody method

Widget getBody(
  1. BoxBorder border
)

Implementation

Widget getBody(BoxBorder border) {
  return Container(
    padding: widget.node.getPadding(),
    decoration: BoxDecoration(
      color: widget.node.getBackgroundColor(),
      border: border,
      borderRadius: widget.node.getBorderRadius(),
      boxShadow: widget.node.getShadow(),
      gradient: widget.node.getGradient(),
    ),
    constraints: BoxConstraints(minWidth: 30),
    child:
        widget.node.getChild() ??
        (!(widget.node.getMindMap()?.getReadOnly() ?? true) &&
                (widget.node.getMindMap()?.hasTextField() ?? false) &&
                widget.node.getSelected()
            ? Container(
                constraints: BoxConstraints(
                  maxWidth: widget.node.getSize() != null
                      ? ((widget.node.getSize()!.width -
                                    (widget.node.getPadding() == null
                                        ? 0
                                        : (widget.node.getPadding()!.left +
                                              widget.node
                                                  .getPadding()!
                                                  .right))) <
                                30
                            ? 30
                            : widget.node.getSize()!.width -
                                  (widget.node.getPadding() == null
                                      ? 0
                                      : (widget.node.getPadding()!.left +
                                            widget.node.getPadding()!.right)))
                      : 100,
                ),
                child: TextField(
                  autofocus: true,
                  focusNode: widget.node._focusNode,
                  controller: _editingController,
                  style: widget.node.getTextStyle(),
                  scrollPadding: EdgeInsets.zero,
                  decoration: InputDecoration(
                    isCollapsed: true,
                    border: InputBorder.none,
                    contentPadding: EdgeInsets.zero,
                  ),
                  onChanged: (value) {
                    widget.node.setTitle(_editingController.text);
                  },
                ),
              )
            : Text(
                widget.node.getTitle(),
                style: widget.node.getTextStyle(),
              )),
  );
}