MapFunction typedef

MapFunction = E Function<E>(E object, {Cell? cell, dynamic user})

A function signature for value transformations within a MapObject pipeline.

This typedef defines the contract for all mapping functions used by MapObject:

  • Transforms an input value of type E to output of the same type
  • Operates within an optional Cell context
  • Accepts additional user context

Signature Details:

E Function<E>(E object, {Cell? cell, dynamic user})

Key Characteristics:

  • Type Preservation: Input/output types must match
  • Context Awareness: Optional cell and user context
  • Null Safety: Should handle null inputs appropriately
  • Pure Function: Should avoid side effects

Implementation

typedef MapFunction = E Function<E>(E object, {Cell? cell, dynamic user});