custom static method

TButton custom({
  1. required Widget child,
  2. VoidCallback? onTap,
  3. String? tooltip,
  4. dynamic badge,
  5. Alignment badgeAlignment = Alignment.topRight,
  6. Color? badgeColor,
  7. Color? badgeTextColor,
})

Creates a custom button with minimal styling.

This factory provides a button with zero padding and normal shape, allowing complete customization via the child parameter.

Example:

TButton.custom(
  onTap: () => print('Custom button tapped'),
  child: Container(
    padding: EdgeInsets.all(16),
    decoration: BoxDecoration(
      gradient: LinearGradient(colors: [Colors.blue, Colors.purple]),
    ),
    child: Text('Custom Styled Button'),
  ),
)

Implementation

static TButton custom({
  required Widget child,
  VoidCallback? onTap,
  String? tooltip,
  dynamic badge,
  Alignment badgeAlignment = Alignment.topRight,
  Color? badgeColor,
  Color? badgeTextColor,
}) {
  return TButton(
    size: TButtonSize.zero,
    shape: TButtonShape.normal,
    onTap: onTap,
    tooltip: tooltip,
    badge: badge,
    badgeAlignment: badgeAlignment,
    badgeColor: badgeColor,
    badgeTextColor: badgeTextColor,
    child: child,
  );
}