flutter button with icon and text
ElevatedButton.icon(
icon: Icon(Icons.home),
label: Text('ElevatedButton'),
onPressed: () {},
),
flutter button with icon and text
ElevatedButton.icon(
icon: Icon(Icons.home),
label: Text('ElevatedButton'),
onPressed: () {},
),
flutter change the icon of icon button on pressed
bool selected = true;
//...
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: IconButton(
icon: Icon( selected ? Icons.celebration : Icons.title),
onPressed: () {
setState(() {
selected = !selected;
});
},
), //IconButton
), //Center
); //Scaffold
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us