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 custom({required Widget child, VoidCallback? onTap, String? tooltip}) {
return TButton(
size: TButtonSize.zero,
shape: TButtonShape.normal,
onTap: onTap,
tooltip: tooltip,
child: child,
);
}