index method Null safety

int index(
  1. int row,
  2. int col
)

Return index in storage for row, col value.

Implementation

int index(int row, int col) => (col * 2) + row;