style: ElevatedButton.styleFrom(
primary: MyColors.color_main,
//change background color of button
onPrimary: Colors.white,
//change text color of button
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(25),
),
【ElevatedButton设置背景与字体颜色】
文章图片