tertiaryButton method

Widget tertiaryButton({
  1. required String title,
  2. EdgeInsets? margin,
  3. bool isLoading = false,
  4. bool isDisabled = false,
  5. Color? titleColor,
  6. Color? disabledTitleColor,
  7. double? fontSize,
  8. dynamic onTap()?,
})

Component of Tertiary Button

Implementation

Widget tertiaryButton({
  required String title,

  /// change title
  EdgeInsets? margin,

  /// change margin
  bool isLoading = false,

  /// change state isLoading
  bool isDisabled = false,

  /// change state isDisable
  Color? titleColor,

  /// change title color
  Color? disabledTitleColor,

  /// change disable title color
  double? fontSize,
  Function()? onTap,

  /// call function using onTap
}) {
  return Padding(
    padding: margin ?? const EdgeInsets.symmetric(vertical: 4),
    child: GestureDetector(
      onTap: isLoading || isDisabled ? () {} : onTap,
      child: standardHeaderText(
          fontSize: fontSize ?? StandardFontSize.h6,
          text: title,
          color: isDisabled || isLoading
              ? disabledTitleColor ?? ColorTheme.grey700
              : titleColor ??
                  ColorTheme.tertiaryTitleColor ??
                  ColorTheme.black),
    ),
  );
}