FlatButton to TextButton
hardiklakhalani opened this issue · comments
Hardik Lakhalani commented
Console is saying FlatButton is outdated and suggests to use TextButton.
but TextButton is not accepting color. How do I do that?
Hardik Lakhalani commented
DONE!
TextButton(
style: ButtonStyle(
backgroundColor: MaterialStateProperty.all(Colors.red)),
onPressed: () {
final player = AudioCache();
player.play('note1.wav');
print('Note1');
},
child: Text('Note1'),
),