dashboardKpis static method

Widget dashboardKpis({
  1. int count = 4,
  2. bool isWide = false,
})

Dashboard KPI cards skeleton (2 or 4 columns)

Implementation

static Widget dashboardKpis({int count = 4, bool isWide = false}) {
  return GridView.count(
    crossAxisCount: isWide ? 4 : 2,
    shrinkWrap: true,
    physics: const NeverScrollableScrollPhysics(),
    mainAxisSpacing: 10,
    crossAxisSpacing: 10,
    childAspectRatio: isWide ? 2.2 : 2.4,
    children: List.generate(count, (_) => _kpiCardSkeleton()),
  );
}