renderChild method

Widget renderChild(
  1. BuildContext context
)

Implementation

Widget renderChild(BuildContext context) => GestureDetector(
      onTap: onTap,
      child: MouseRegion(
        cursor: SystemMouseCursors.click,
        child: Container(
          height: height,
          decoration: BoxDecoration(
            color: activeColor,
            border: Border(
              right: BorderSide(
                color: editorTheme.tabBorder ?? Colors.red,
              ),
              top: BorderSide(
                color: (isCurrent
                        ? editorTheme.tabActiveBorderTop
                        : editorTheme.tabBorder) ??
                    Colors.red,
              ),
              bottom: BorderSide(
                color: isCurrent
                    ? activeColor
                    : editorTheme.editorGroupHeaderTabsBorder ?? Colors.red,
              ),
            ),
          ),
          child: Padding(
            padding: const EdgeInsets.only(
              left: 10,
              right: 10,
              top: utils.AffogatoConstants.tabBarPadding,
              bottom: utils.AffogatoConstants.tabBarPadding,
            ),
            child: Row(
              mainAxisAlignment: MainAxisAlignment.center,
              crossAxisAlignment: CrossAxisAlignment.center,
              children: [
                Text(
                  label,
                  style: TextStyle(
                    color: isCurrent
                        ? editorTheme.tabActiveForeground
                        : editorTheme.tabInactiveForeground,
                  ),
                ),
                const SizedBox(width: 10),
                IconButton(
                  onPressed: onClose,
                  icon: Icon(
                    Icons.close,
                    size: 14,
                    color: isCurrent
                        ? editorTheme.tabActiveForeground
                        : editorTheme.tabInactiveForeground,
                  ),
                ),
              ],
            ),
          ),
        ),
      ),
    );