cbutton method

Widget cbutton({
  1. Color color = Colors.blue,
})

创建带颜色的圆角按钮

@param color 按钮背景颜色(默认蓝色) @return 返回配置好的ElevatedButton样式组件

Implementation

Widget cbutton({Color color = Colors.blue}) {
  return this
      .text(style: TextStyle(color: Colors.white, fontSize: 20))
      .center
      .box(cornerRadius: 4, color: color, height: 45);
}