NxPrimaryButton constructor
const
NxPrimaryButton({
- required String text,
- required VoidCallback? onPressed,
- Key? key,
- TextStyle? buttonTextStyle,
- EdgeInsetsGeometry? margin = const EdgeInsets.symmetric(vertical: 16),
- double? buttonWidth = double.maxFinite,
- double? buttonHeight,
- ButtonStyle? buttonStyle,
Creates a primary button with filled style.
text
- The button's label textonPressed
- Callback when button is pressed, null disables the buttonbuttonTextStyle
- Optional text style for the labelmargin
- Space around the button, defaults to vertical margin of 16buttonWidth
- Button width, defaults to full widthbuttonHeight
- Optional fixed height for the buttonbuttonStyle
- Optional complete style override
Implementation
const NxPrimaryButton({
required this.text,
required this.onPressed,
super.key,
this.buttonTextStyle,
this.margin = const EdgeInsets.symmetric(vertical: 16),
this.buttonWidth = double.maxFinite,
this.buttonHeight,
this.buttonStyle,
});