bool isDirty({String? key}) { if (key != null) { return _unsavedChanges[key] != null; } return _isDirty(true); }