buildPanel1 method
Implementation
Widget buildPanel1(){
return Card(
shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(3),),
clipBehavior: Clip.antiAliasWithSaveLayer,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
alignment: Alignment.centerLeft,
height : 50,
child: Row(
children: <Widget>[
Container(width: 15, height: 0),
Text("Text", style: TextStyle(
fontSize: 20,
color: Colors.grey[800]
),),
Spacer(flex: 1),
Transform.rotate(
angle: animation1.value * math.pi / 180,
child: IconButton(
icon: Icon(Icons.expand_more),
onPressed: (){togglePanel1();},
),
),
Container(width: 5, height: 0),
],
),
),
SizeTransition(
sizeFactor: animation1View,
child: Column(
children: <Widget>[
Container(
padding: EdgeInsets.all(15),
child: Text(
MyStrings.lorem_ipsum,
style: TextStyle(fontSize: 18, color: Colors.grey),
),
),
Divider(height: 0, thickness: 0.5),
Container(
alignment: Alignment.centerLeft,
height : 50,
child: Row(
children: <Widget>[
Spacer(),
TextButton(
style: TextButton.styleFrom(
primary: Colors.transparent,
padding: EdgeInsets.all(0)
),
child: Text("HIDE", style: TextStyle(color: Colors.grey[800]),),
onPressed: (){togglePanel1();},
),
],
),
),
],
),
),
],
),
);
}