MapOp constructor

MapOp({
  1. @required dynamic input,
  2. String? as,
  3. @required dynamic inExpr,
})

Creates $map operator expression

  • input - An expression that resolves to an array.
  • as - Optional. A name for the variable that represents each individual element of the input array. If no name is specified, the variable name defaults to this.
  • inExpr - An expression that is applied to each element of the input array. The expression references each element individually with the variable

Implementation

MapOp({@required input, String? as, @required inExpr})
    : super(
          'map',
          AEObject({
            'input': input is List ? AEList(input) : input,
            if (as != null) 'as': as,
            'in': inExpr
          }));