setOrMapLiteral abstract method

SetOrMapLiteral setOrMapLiteral({
  1. Token? constKeyword,
  2. TypeArgumentList? typeArguments,
  3. required Token leftBracket,
  4. required List<CollectionElement> elements,
  5. required Token rightBracket,
})

Returns a newly created set or map literal. The constKeyword can be null if the literal is not a constant. The typeArguments can be null if no type arguments were declared. The list of elements can be null if the set or map is empty.

Implementation

SetOrMapLiteral setOrMapLiteral(
    {Token? constKeyword,
    TypeArgumentList? typeArguments,
    required Token leftBracket,
    required List<CollectionElement> elements,
    required Token rightBracket});