RaisedButton
Widget _makeButton() {
return RaisedButton(
child: Text("PUSH ME"),
color: Colors.red,
onPressed: () {
print("OK!!");
}
);
}
RaisedButton + Border
Widget _makeButton() {
return RaisedButton(
child: Text("PUSH ME"),
shape: Border.all(),
color: Colors.red,
onPressed: () {
print("PUSHED");
},
);
}
RaisedButton + Border + Elevation
Widget _makeButton() {
return RaisedButton(
color: Colors.red,
elevation: 15,
child: Text("PUSH ME"),
shape: Border.all(),
onPressed: () {
print("PUSHED");
},
);
}
RaisedButton + Elevation + Round Shape
Widget _makeButton() {
return RaisedButton(
color: Colors.red,
elevation: 15,
shape: StadiumBorder(),
child: Text("PUSH ME"),
onPressed: () {
print("PUSHED");
},
);
}
RaisedButton + Border + Elevation + Round Shape and Border
Widget _makeButton() {
return RaisedButton(
color: Colors.red,
elevation: 15,
shape: StadiumBorder(side: BorderSide(color: Colors.black, width: 1)),
child: Text("PUSH ME"),
onPressed: () {
print("PUSHED");
},
);
}
RaisedButton + Border + Icon + Elevation + Round Shape and Border
Widget _makeButton() {
return RaisedButton(
color: Colors.red,
elevation: 15,
child: Row(
mainAxisSize: MainAxisSize.min,
children: <Widget>[Icon(Icons.access_alarm), Text("TIME ALARM")]),
shape: StadiumBorder(side: BorderSide(color: Colors.black, width: 1)),
onPressed: () {
print("PUSHED");
},
);
}
Top comments (0)