Value class

A SassScript value.

All SassScript values are unmodifiable. New values can be constructed using subclass constructors like new SassString. Untyped values can be cast to particular types using assert*() functions like assertString, which throw user-friendly error messages if they fail.

Implementers

Constructors

Value()

Properties

asList List<Value>
This value as a list. [...]
read-only
hasBrackets bool
Whether this value as a list has brackets. [...]
read-only
isTruthy bool
Whether the value counts as true in an @if statement and other contexts.
read-only
separator ListSeparator
The separator for this value as a list. [...]
read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

assertBoolean([String name ]) SassBoolean
Throws a SassScriptException if this isn't a boolean. [...]
assertColor([String name ]) SassColor
Throws a SassScriptException if this isn't a color. [...]
assertFunction([String name ]) SassFunction
Throws a SassScriptException if this isn't a function reference. [...]
assertMap([String name ]) SassMap
Throws a SassScriptException if this isn't a map. [...]
assertNumber([String name ]) SassNumber
Throws a SassScriptException if this isn't a number. [...]
assertString([String name ]) SassString
Throws a SassScriptException if this isn't a string. [...]
sassIndexToListIndex(Value sassIndex, [ String name ]) int
Converts sassIndex into a Dart-style index into the list returned by asList. [...]
toCssString() String
Returns a valid CSS representation of this. [...]
toString() String
Returns a string representation of this. [...]
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited