buttonStyle static method

dynamic buttonStyle({
  1. Color? color,
  2. Color? borderColor,
})

Implementation

static buttonStyle({Color? color, Color? borderColor}) {
  return ButtonStyle(
    backgroundColor: MaterialStateProperty.all(
        color ?? Get.find<PWThemeController>().theme.colorScheme.primary),
    shape: borderColor != null
        ? MaterialStateProperty.resolveWith(
            (states) => RoundedRectangleBorder(
                  borderRadius: BorderRadius.circular(8),
                  side: BorderSide(
                    color: borderColor,
                  ),
                ))
        : null,
  );
}