statCard static method

Widget statCard(
  1. String title,
  2. String value,
  3. String sub,
  4. IconData icon,
  5. Color color,
  6. VoidCallback? onTap,
)

A headline figure with its caption, and an optional coloured note in the trailing slot.

Implementation

static Widget statCard(String title, String value, String sub, IconData icon, Color color, VoidCallback? onTap) => UCard(
  child: ListTile(
    contentPadding: const EdgeInsets.all(18),
    leading: UIconBackground(icon, color: color),
    title: UTextTitleMedium(value, fontWeight: FontWeight.w800, maxLines: 1),
    subtitle: UTextBodySmall(title, color: UAdminTheme.grey),
    trailing: sub.isNullOrEmpty() ? null : UTextBodySmall(sub, color: color, fontWeight: FontWeight.w600),
    onTap: onTap,
  ),
);