We start by creating a new Dart file, play_music.dart, and a stateful widget, PlayMusic. In this file, we will create the three buttons, as stated earlier, to perform the basic functions. The following steps describe how to create the UI:
- Define a buildGenerateButton() method to create the RaisedButton variable that will be used to generate new music files:
Widget buildGenerateButton() { return Padding( padding: EdgeInsets.only(left: 16, right: 16, top: 16), child: RaisedButton( child: Text("Generate Music"), color: Colors.blue, textColor: Colors.white, ), ); }
In the function defined previously, we create a RaisedButton with Generate Music text added as a child. The Colors.blue value of the color property is used to give ...