CSButton constructor
CSButton(
- CSButtonType buttonType,
- String text,
- VoidCallback pressed, {
- CSWidgetStyle style = CS_DEFAULT_STYLE,
- double fontSize = CS_TITLE_FONT_SIZE,
Implementation
CSButton(
this.buttonType,
this.text,
this.pressed, {
CSWidgetStyle style = CS_DEFAULT_STYLE,
this.fontSize = CS_TITLE_FONT_SIZE,
}) : super(
Flex(
direction: Axis.horizontal,
children: <Widget>[
Expanded(
child: CupertinoButton(
padding: EdgeInsets.zero,
onPressed: pressed,
child: Container(
alignment: buttonType.alignment,
child: Text(
text,
style: TextStyle(
color: buttonType.color,
fontSize: fontSize,
),
),
),
),
),
],
),
style: style,
);