setAttribute method
Sync the 'id' property with attributes.
Implementation
@override
void setAttribute(String key, dynamic value) {
super.setAttribute(key, value);
if (key == primaryKey) {
if (value is int) {
id = value;
} else if (value is String) {
id = int.tryParse(value);
}
}
}