customBtn static method

FButton customBtn({
  1. Key? key,
  2. VoidCallback? onPressed,
  3. double? width,
  4. double? height,
  5. String? text,
  6. Alignment? alignment = Alignment.center,
  7. Color color = Colors.white,
  8. Color highlightColor = Colors.white,
  9. double corner = 4,
  10. TextStyle? style,
  11. Color shadowColor = Colors.white,
  12. double shadowBlur = 0,
  13. Offset shadowOffset = Offset.zero,
})

Implementation

static FButton customBtn(
    {Key? key,
    VoidCallback? onPressed,
    double? width,
    double? height,
    String? text,
    Alignment? alignment = Alignment.center,
    Color color = Colors.white,
    Color highlightColor = Colors.white,
    double corner = 4,
    TextStyle? style,
    Color shadowColor = Colors.white,
    double shadowBlur = 0,
    Offset shadowOffset = Offset.zero}) {
  return FButton(
    key: key,
    onPressed: () {
      if (count == 0) {
        count = 1;
        onPressed?.call();
        2.delay(() {
          count = 0;
        });
      }
    },
    width: width,
    height: height,
    text: text,
    alignment: alignment,
    color: color,
    highlightColor: highlightColor,
    corner: FCorner.all(corner),
    style: style,
    shadowColor: shadowColor,
    shadowBlur: shadowBlur,
    shadowOffset: shadowOffset,
    // color: AppColor.orangeBtnGray,
    // highlightColor: AppColor.orangeBtnGray,
    // corner: FCorner.all(12),
    // style: MyTextStyle.s16w500(color: AppColor.mainColor),
    // shadowColor: AppColor.orangeBtnGray.withOpacity(0.3),
    // shadowBlur: 8,
    // shadowOffset: const Offset(0, 4),
  );
}