toWidget method

Widget toWidget(
  1. BuildContext context, {
  2. bool isLeft = true,
})

Implementation

Widget toWidget(BuildContext context,{bool isLeft = true}) => GestureDetector(
      behavior: HitTestBehavior.opaque,
      onTap: action,
      child: Padding(
        padding:
        padding ?? (isLeft ? EdgeInsets.only(right: TDTheme.of(context).spacer8) : EdgeInsets.only(left: TDTheme.of(context).spacer8)),
        child: iconWidget ??
            Icon(
              icon,
              size: iconSize,
              color: iconColor,
            ),
      ),
    );