getItemView method
Implementation
Widget getItemView(BuildContext ctx, Menu obj) {
bool sub = obj.subs.isEmpty;
return Padding(
padding: EdgeInsets.symmetric(vertical: 6),
child: Row(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
sub ? Container( width: 40 ) : Padding(
padding: EdgeInsets.symmetric(horizontal: 10),
child: Icon(obj.icon, size: 20.0, color: Colors.blue,),
),
Center(
child: Text(obj.title,
style : TextStyle(
color: Colors.grey[100], fontWeight: FontWeight.normal, fontSize: 15
)
),
),
Container(
margin: EdgeInsets.fromLTRB(10, 4, 10, 0),
height: 6, width: 6,
child: CircleAvatar(backgroundColor: obj.newPage ? MyColors.accentDark.withOpacity(0.6) : Colors.transparent),
),
Spacer(),
sub ? Container() : Padding(
padding: EdgeInsets.symmetric(horizontal: 5),
child: Icon(
obj.expand ? Icons.arrow_drop_up : Icons.arrow_drop_down,
size: 24.0, color: Colors.blue,
),
),
],
),
);
}