renderCard method

Card renderCard(
  1. DataRow row
)

Implementation

Card renderCard(DataRow row) {
  return Card(
    shape: RoundedRectangleBorder(
      borderRadius: BorderRadius.circular(15.0),
    ),
    elevation: 3,
    margin: EdgeInsets.all(
      4.0,
    ),
    child: InkWell(
      onTap: () {
        row.onSelectChanged!(true);
      },
      child: Padding(
        padding: const EdgeInsets.only(
          left: 8.0,
          right: 8.0,
          top: 16.0,
          bottom: 16.0,
        ),
        child: Column(
          children: row.cells
              .asMap()
              .entries
              .map(
                (cell) => Padding(
                  padding: const EdgeInsets.all(4.0),
                  child: Row(
                    mainAxisSize: MainAxisSize.max,
                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
                    children: [
                      columns[cell.key].label,
                      cell.value.child,
                    ],
                  ),
                ),
              )
              .toList(),
        ),
      ),
    ),
  );
}