JinjaValue class abstract
Base class for all runtime values under the Dinja type system.
- Implementers
- Annotations
-
- @immutable
Constructors
- JinjaValue()
-
const
Properties
- asBool → bool
-
Returns the truthy value of this object (for if/elif conditions).
no setter
- asDouble → double
-
no setter
- asInt → int
-
no setter
- asJinjaString → JinjaString
-
no setter
-
asList
→ List<
JinjaValue> -
no setter
-
asMap
→ Map<
String, JinjaValue> -
no setter
- asRepr → String
-
Returns a string representation for debugging (like Python's repr()).
no setter
- hashCode → int
-
The hash code for this object.
no setteroverride
- isCallable → bool
-
no setter
- isEnv → bool
-
Whether this value is the special 'env' object.
no setter
- isList → bool
-
no setter
- isMap → bool
-
no setter
- isNone → bool
-
no setter
- isNumeric → bool
-
no setter
- isSafe → bool
-
Returns true if this value is considered "safe" (not needing escaping).
no setter
- isString → bool
-
no setter
- isUndefined → bool
-
no setter
- name → String?
-
Optional name for this value (e.g. 'env').
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- typeName → String
-
Returns the type name for debugging and error messages (e.g., 'String', 'List').
no setter
Methods
-
getAttribute(
String name) → JinjaValue? -
Returns a custom attribute of this value, or null if not found.
Used for objects like
loopthat expose properties but aren't maps. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDart(
) → Object? - Converts this JinjaValue to a raw Dart object (Map, List, String, etc.).
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override