toMap method

Map<String, dynamic> toMap()

Converts the column snapshot to a map.

Implementation

Map<String, dynamic> toMap() {
  return {
    'name': name,
    'type': type,
    'primaryKey': primaryKey,
    'isNullable': isNullable,
    if (autoIncrement) 'autoIncrement': autoIncrement,
    if (defaultValue != null) 'default': defaultValue,
    if (foreignKey != null) 'foreignKey': foreignKey!.toMap(),
  };
}