buildTrailingIcon method

Widget? buildTrailingIcon()

Implementation

Widget? buildTrailingIcon() {
  if (success && style.showSuccessIcon) {
    return Container(
      color: style.successIconBackground,
      width: 40,
      height: 40,
      child: Icon(
        Icons.check,
        size: 20,
        color: style.successIconColor,
      ),
    );
  }

  if (error && style.showErrorIcon) {
    return Container(
      color: style.errorIconBackground,
      width: 40,
      height: 40,
      child: Icon(
        Icons.error_outline,
        size: 20,
        color: style.errorIconColor,
      ),
    );
  }
  return null;
}