SmoothListTileCard.icon constructor

SmoothListTileCard.icon({
  1. Widget? icon,
  2. Widget? title,
  3. Widget? subtitle,
  4. GestureTapCallback? onTap,
  5. EdgeInsetsGeometry? margin,
  6. Key? key,
})

Displays a ListTile inside a SmoothCard with a leading Column containing the specified icon

Implementation

SmoothListTileCard.icon({
  Widget? icon,
  Widget? title,
  Widget? subtitle,
  GestureTapCallback? onTap,
  EdgeInsetsGeometry? margin,
  Key? key,
}) : this(
       title: title,
       subtitle: subtitle,
       key: key,
       onTap: onTap,
       // we use a Column to have the icon centered vertically
       leading: Column(
         mainAxisAlignment: MainAxisAlignment.center,
         children: <Widget>[icon ?? const Icon(Icons.edit)],
       ),
       margin: margin,
     );