CellDeputy constructor
CellDeputy({
- required Cell bind,
- TestObject<
Cell> ? test, - MapObject? mapObject,
Creates a behavior-augmented view of a cell.
Parameters:
bind
: The cell to delegate to (required)test
: Additional validation rules (optional)mapObject
: Transformation rules (optional) (Note: Eithertest
ormapObject
must be provided to
The deputy will:
- Apply its own validation first
- Delegate to the bound cell
- Apply any mappings to results
Implementation
CellDeputy({required Cell bind, TestObject? test, MapObject? mapObject})
: super.fromProperties(Properties.fromRecord((
receptor: bind._properties.receptor,
bind: bind,
test: test != null ? TestObject.fromRules(rules: [test, bind.test]) : bind.test,
mapObject: _mapObject(bind, mapObject)
))
);