CSButton constructor

CSButton(
  1. CSButtonType buttonType,
  2. String text,
  3. VoidCallback pressed, {
  4. CSWidgetStyle style = CS_DEFAULT_STYLE,
  5. 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,
      );