Case constructor

Case({
  1. required AggregationExpr caseExpr,
  2. @required dynamic thenExpr,
})

Creates Case branch for Switch operator

  • caseExpr - Can be any valid expression that resolves to a boolean. If the result is not a boolean, it is coerced to a boolean value.
  • thenExpr - Can be any valid expression.

Implementation

Case({required AggregationExpr caseExpr, @required thenExpr})
    : super.internal({'case': caseExpr, 'then': thenExpr});