I want the arrow to change and display the visibility widget when about me is clicked on the image.
CodePudding user response:
int angle = 0;
RotatedBox(
quarterTurns: angle,
child: IconButton(
icon: Icon(Icons.arrow_forward_ios),
onPressed: () {
setState(() {
angle = 1;
});
},
),
),
CodePudding user response:
About your attached image, you can simply get the effect using ExpansionTile.
How-ever to change icon based on click
- create a
bool _isExpanded = false
insidestate
class. - On expand changes, use
setstate
to change the value. Using assigning the icon
Icon(_isExpanded?
Icons.arrow_downward
:Icons.arrow_upward,
),