April 2020
Intermediate to advanced
380 pages
9h 24m
English
Next is building the row with button widgets. After placing our text title, we will now create a row of two buttons that will enable the user to pick an image either from the gallery or take a new image from the camera. Let's do this in the following steps:
Widget createButton(String imgSource) { return Expanded( child: Padding( padding: EdgeInsets.symmetric(horizontal: 8.0), child: RaisedButton( color: Colors.blue, textColor: Colors.white, splashColor: Colors.blueGrey, onPressed: () { onPickImageSelected(imgSource); }, child: new Text(imgSource) ), ) );}
The method returns a widget, that is, RaisedButton, after providing ...
Read now
Unlock full access