buildAction method

  1. @override
Widget buildAction(
  1. BuildContext context
)
override

Implementation

@override
Widget buildAction(BuildContext context) => InkWell(
      onTap: () => onTap.call(context),
      child: Padding(
        padding: const EdgeInsets.symmetric(vertical: 20),
        child: SizedBox(
          child: Row(
            children: [
              Expanded(
                flex: 1,
                child: (icon != null)
                    ? Icon(
                        icon,
                        size: (style.fontSize ?? 16) * 1.5,
                        color: style.color,
                      )
                    : SizedBox(
                        width: leftTextOffset,
                      ),
              ),
              Expanded(
                flex: 3,
                child: Row(
                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
                  children: [
                    Text(
                      text,
                      style: style,
                    ),
                    if (trailingIcon != null) ...[
                      Icon(
                        trailingIcon,
                        size: style.fontSize ?? 16,
                        color: style.color,
                      ),
                    ],
                  ],
                ),
              ),
            ],
          ),
        ),
      ),
    );