如何统一封装按钮样式?
class AppTheme {
static final ThemeData normalTheme = ThemeData(
primaryColor: Style.primary,
canvasColor: Style.body,
focusColor: Style.primary,
accentColor: Style.primary, // list滚动手势动画颜色
buttonTheme: ButtonThemeData(minWidth: 36.px, height: 30.px),
elevatedButtonTheme: ElevatedButtonThemeData(
style: ButtonStyle(
backgroundColor: MaterialStateProperty.all<Color>(Style.primary),
)));
}
网友评论