londonappbrewery / xylophone-flutter

Starter code for the Xylophone project in the Complete Flutter Bootcamp

Home Page:https://www.appbrewery.co

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FlatButton to TextButton

hardiklakhalani opened this issue · comments

Console is saying FlatButton is outdated and suggests to use TextButton.
but TextButton is not accepting color. How do I do that?

DONE!

TextButton(
                style: ButtonStyle(
                    backgroundColor: MaterialStateProperty.all(Colors.red)),
                onPressed: () {
                  final player = AudioCache();
                  player.play('note1.wav');
                  print('Note1');
                },
                child: Text('Note1'),
              ),