CellDeputy constructor

CellDeputy({
  1. required Cell bind,
  2. TestObject<Cell>? test,
  3. 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: Either test or mapObject must be provided to

The deputy will:

  1. Apply its own validation first
  2. Delegate to the bound cell
  3. 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)
  ))
);