import 'package:badges/badges.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:toolheim/widgets/stats_widget.dart'; class HenchmengroupListTileWidget extends StatelessWidget { final henchmenGroup; HenchmengroupListTileWidget(this.henchmenGroup); @override Widget build(BuildContext context) { return ListTile( title: Padding( padding: const EdgeInsets.only(bottom: 7), child: Row(children: [ Padding( padding: const EdgeInsets.only(right: 5), child: Text(henchmenGroup.name), ), Text( '(' + henchmenGroup.type + ')', style: TextStyle(fontSize: 10), ), Spacer(), Badge( badgeColor: Colors.black12, shape: BadgeShape.square, borderRadius: 2, badgeContent: Text(henchmenGroup.number.toString() + 'x', style: TextStyle(color: Colors.white)), ), ]), ), leading: CircleAvatar( child: Row(children: [ Spacer(), Text(henchmenGroup.experience.toString(), style: TextStyle(color: Colors.white)), Text( 'xp', style: TextStyle(fontSize: 8), ), Spacer() ]), backgroundColor: Colors.orange, foregroundColor: Colors.white, ), subtitle: StatsWidget(henchmenGroup.stats), isThreeLine: true, onTap: () { //Navigator.pushNamed(context, '/unit', arguments: hero); }, ); } }