primaryButton static method
Widget
primaryButton(
- String data, {
- required VoidCallback? onPressed,
- double? height,
- 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',
),
),
);
}