The widget architecture in Flutter makes this very simple: The child of the MaterialButton
is a Text
widget, which can be styled with its style
property:
new MaterialButton(
height: 140.0,
minWidth: double.infinity,
color: Theme.of(context).primaryColor,
textColor: Colors.white,
child: new Text(
"material button",
style: new TextStyle(
fontSize: 20.0,
color: Colors.yellow,
),
),
onPressed: () => {},
splashColor: Colors.redAccent,
);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…