CyberDataRow class
CyberDataRow - đại diện cho một row dữ liệu với memory leak protection
- Inheritance
-
- Object
- ChangeNotifier
- CyberDataRow
- Implemented types
- Available extensions
Constructors
-
CyberDataRow([Map<
String, dynamic> ? initialData])
Properties
-
changedFields
→ Set<
String> -
no setter
-
fieldNames
→ List<
String> -
no setter
- hasCustomIdentity → bool
-
Check if using custom identity
no setter
- hashCode → int
-
The hash code for this object.
no setteroverride
- hasListeners → bool
-
Whether any listeners are currently registered.
no setteroverride
- identityKey → Object
-
Get the identity key for this row
Returns stable, unique UUID suitable for widget keys, caching, comparison
no setteroverride
- internalId → String
-
Get internal UUID (even if custom identity is set)
no setter
- isDirty → bool
-
no setter
- isDisposed → bool
-
no setter
- isIdentityLocked → bool
-
✅ Check if identity is locked
no setter
- listenerCount → int
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
$(
String fieldName) → CyberBindingExpression -
Available on CyberDataRow, provided by the CyberDataRowBinding extension
Alias cho bind (ngắn gọn hơn) -
acceptChanges(
) → void -
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
override
-
batch(
void action()) → void -
beginBatch(
) → void - Batch mode operations
-
bind(
String fieldName) → CyberBindingExpression -
Available on CyberDataRow, provided by the CyberDataRowBinding extension
Tạo binding expression cho field Usage: drEdit.bind('name') thay vì drEdit'name' -
clearCustomIdentity(
) → void - Clear custom identity (revert to internal UUID) Throws StateError if identity is locked
-
copy(
) → CyberDataRow - Copy creates new entity with new UUID
-
dispose(
) → void -
Discards any resources used by the object.
override
-
disposeAllListeners(
) → void -
endBatch(
) → void -
get<
T> (String fieldName) → T? -
getChangedValues(
) → Map< String, dynamic> -
getOriginal(
String fieldName) → dynamic -
hasField(
String fieldName) → bool -
lockIdentity(
) → void - ✅ NEW: Explicitly lock identity Call this before binding row to UI (e.g., in ListView itemBuilder) After locking, setIdentityKey() will throw error
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
rejectChanges(
) → void -
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
override
-
setIdentityKey(
Object key) → void - Set custom identity key (advanced usage) Use when you want to override internal UUID with data-based key
-
setValue(
String fieldName, dynamic value) → void -
toMap(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
override
-
toXml(
String tableName, {List< String> ? includeColumns, List<String> ? excludeColumns}) → String -
V_Call(
BuildContext context) → void
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
-
operator [](
String fieldName) → dynamic -
operator []=(
String fieldName, dynamic value) → void