ifElement abstract method

IfElement ifElement({
  1. required Token ifKeyword,
  2. required Token leftParenthesis,
  3. required Expression condition,
  4. required Token rightParenthesis,
  5. required CollectionElement thenElement,
  6. Token? elseKeyword,
  7. CollectionElement? elseElement,
})

Returns a newly created if element that can be part of a list, map or set literal.

Implementation

IfElement ifElement(
    {required Token ifKeyword,
    required Token leftParenthesis,
    required Expression condition,
    required Token rightParenthesis,
    required CollectionElement thenElement,
    Token? elseKeyword,
    CollectionElement? elseElement});