primaryButton static method

Widget primaryButton(
  1. String data, {
  2. required VoidCallback? onPressed,
  3. double? height,
  4. double? minWidth,
})

主要按钮

Implementation

static Widget primaryButton(
  String data, {
  required VoidCallback? onPressed,
  double? height,
  double? minWidth,
}) {
  return MaterialButton(
    elevation: 0,
    padding: EdgeInsets.symmetric(horizontal: 12.w),
    shape: RoundedRectangleBorder(
      side: BorderSide(color: WiseColor.colorPrimary(), width: 1.w),
      borderRadius: BorderRadius.all(Radius.circular(24.r)),
    ),
    color: WiseColor.colorPrimary(),
    height: height ?? 40.w,
    minWidth: minWidth,
    onPressed: onPressed,
    child: Text(
      data,
      style: TextStyle(
        color: Colors.white,
        fontSize: 16.sp,
        fontFamily: 'Regular',
      ),
    ),
  );
}