SassList class

A SassScript list.

Inheritance
Available extensions
Annotations
  • @sealed

Constructors

SassList(Iterable<Value> contents, ListSeparator _separator, {bool brackets = false})
Returns an empty list with the given separator and brackets.
SassList.empty({ListSeparator? separator, bool brackets = false})
Returns an empty list with the given separator and brackets.
const

Properties

asList List<Value>
This value as a list.
no setteroverride
hasBrackets bool
Whether this value as a list has brackets.
no setteroverride
hashCode int
The hash code for this object.
no setteroverride
isTruthy bool
Whether the value counts as true in an @if statement and other contexts.
no setterinherited
realNull Value?
Returns Dart's null value if this is sassNull, and returns this otherwise.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
separator ListSeparator
The separator for this value as a list.
no setteroverride

Methods

assertBoolean([String? name]) SassBoolean
Throws a SassScriptException if this isn't a boolean.
inherited
assertCalculation([String? name]) SassCalculation
Throws a SassScriptException if this isn't a calculation.
inherited
assertColor([String? name]) SassColor
Throws a SassScriptException if this isn't a color.
inherited
assertFunction([String? name]) SassFunction
Throws a SassScriptException if this isn't a function reference.
inherited
assertMap([String? name]) SassMap
Throws a SassScriptException if this isn't a map.
override
assertMixin([String? name]) SassMixin
Throws a SassScriptException if this isn't a mixin reference.
inherited
assertNumber([String? name]) SassNumber
Throws a SassScriptException if this isn't a number.
inherited
assertString([String? name]) SassString
Throws a SassScriptException if this isn't a string.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sassIndexToListIndex(Value sassIndex, [String? name]) int
Converts sassIndex into a Dart-style index into the list returned by asList.
inherited
toCssString({bool quote = true}) String
Returns a valid CSS representation of this.
inherited
toString() String
Add parentheses to the debug information for lists to help make the list bounds clear.
override
tryMap() SassMap?
Returns this as a SassMap if it is one (including empty lists, which count as empty maps) or returns null if it's not.
override
withListContents(Iterable<Value> contents, {ListSeparator? separator, bool? brackets}) SassList
Returns a new list containing contents that defaults to this value's separator and brackets.
inherited

Operators

operator ==(Object other) bool
The equality operator.
override