toMap method
Converts the table snapshot to a map.
Implementation
Map<String, dynamic> toMap() {
return {
'name': name,
'columns': columns.map(
(key, value) => MapEntry(key, value.toMap()),
),
if (checks.isNotEmpty) 'checks': checks,
};
}