toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() => {
  'rows': rows,
  'cols': cols,
  'grid': grid
      .map((row) => row.map((c) => c.toJson()).toList())
      .toList(),
};