RaisedButton
Widget _makeButton () {
return RaisedButton (
child: Text ( "PUSH ME" ),
color: Colors . red ,
onPressed: () {
print ( "OK!!" );
}
);
}
Enter fullscreen mode
Exit fullscreen mode
RaisedButton + Border
Widget _makeButton () {
return RaisedButton (
child: Text ( "PUSH ME" ),
shape: Border . all (),
color: Colors . red ,
onPressed: () {
print ( "PUSHED" );
},
);
}
Enter fullscreen mode
Exit fullscreen mode
RaisedButton + Border + Elevation
Widget _makeButton () {
return RaisedButton (
color: Colors . red ,
elevation: 15 ,
child: Text ( "PUSH ME" ),
shape: Border . all (),
onPressed: () {
print ( "PUSHED" );
},
);
}
Enter fullscreen mode
Exit fullscreen mode
RaisedButton + Elevation + Round Shape
Widget _makeButton () {
return RaisedButton (
color: Colors . red ,
elevation: 15 ,
shape: StadiumBorder (),
child: Text ( "PUSH ME" ),
onPressed: () {
print ( "PUSHED" );
},
);
}
Enter fullscreen mode
Exit fullscreen mode
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" );
},
);
}
Enter fullscreen mode
Exit fullscreen mode
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" );
},
);
}
Enter fullscreen mode
Exit fullscreen mode
Top comments (0)