isDirty method
Check if the model or specific attribute is dirty.
Implementation
bool isDirty([dynamic attributes]) {
final dirty = getDirty();
if (attributes == null) return dirty.isNotEmpty;
if (attributes is String) {
return dirty.containsKey(attributes);
}
if (attributes is List<String>) {
for (final key in attributes) {
if (dirty.containsKey(key)) return true;
}
}
return false;
}