setShorthandGridRow static method

void setShorthandGridRow(
  1. Map<String, String?> properties,
  2. String shorthandValue
)

Implementation

static void setShorthandGridRow(Map<String, String?> properties, String shorthandValue) {
  List<String> parts = shorthandValue.split(_slashRegExp);
  String start = parts.isNotEmpty ? parts[0].trim() : '';
  String end = parts.length > 1 ? parts[1].trim() : '';

  if (start.isEmpty) start = 'auto';
  if (end.isEmpty) end = 'auto';

  properties[GRID_ROW_START] = start;
  properties[GRID_ROW_END] = end;
}