custom static method
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,
);
}