buildPanel2 method
Implementation
Widget buildPanel2(){
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("Input", style: TextStyle(
fontSize: 20,
color: Colors.grey[800]
),),
Spacer(flex: 1),
Transform.rotate(
angle: animation2.value * math.pi / 180,
child: IconButton(
icon: Icon(Icons.expand_more),
onPressed: (){togglePanel2();},
),
),
Container(width: 5, height: 0),
],
),
),
SizeTransition(
sizeFactor: animation2View,
child: Column(
children: <Widget>[
Container(
padding: EdgeInsets.all(15),
child: Column(
children: <Widget>[
Container(
padding: EdgeInsets.symmetric(horizontal: 10, vertical: 0),
decoration: new BoxDecoration(shape: BoxShape.rectangle, color: Colors.grey[200]),
child: TextField(
style: TextStyle(fontSize: 18),
decoration: InputDecoration(
hintText: "Name", hintStyle: TextStyle(color: Colors.grey),
border: InputBorder.none,
),
),
),
],
),
),
Row(
children: <Widget>[
Container(width: 10),
Radio(
value: "MALE",
groupValue: gender,
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
onChanged: (String? value) {
setState(() { gender = value;});
},
),
Text("Male")
],
),
Row(
children: <Widget>[
Container(width: 10),
Radio(
value: "FEMALE",
groupValue: gender,
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
onChanged: (String? value) {
setState(() { gender = value; });
},
),
Text("Female")
],
),
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: (){togglePanel2();},
),
TextButton(
style: TextButton.styleFrom(primary: Colors.transparent, padding: EdgeInsets.all(0)),
child: Text("SAVE", style: TextStyle(color: MyColors.accent)),
onPressed: (){togglePanel2();},
),
],
),
),
],
),
),
],
),
);
}