Modifier<T extends Object> class
A wrapper that distinguishes "set this value" from "leave unchanged" and
"explicitly set to null" — safer than nullable parameters for update()-
style APIs.
Usage:
Modifier(x)— set tox(includingfalse,0,"", empty maps).Modifier.nullable()— explicitly clear the field tonull.- Pass
null(omit the parameter) — leave the field unchanged.
Constructors
- Modifier(T? value)
-
Sets the field to
value.false,0, empty strings/maps/lists are treated as valid values, not as "no value".const - Modifier.nullable()
-
Explicitly clears the field to
null.const
Properties
Methods
-
modify(
{T? old}) → T? -
Resolves this modifier against an existing
oldvalue. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited