JsonIndentationSize enum encoder

Length of indentation per level.

Options:

  • tab: ' ' e.g. 4 x spaces
  • space: ' '
  • doubleSpace: ' ' e.g. 2 x space
Inheritance
Available extensions

Values

tab → const JsonIndentationSize

Indentation of 4 spaces.

Example output:

{
    "key": "value"
}
const JsonIndentationSize(4)
space → const JsonIndentationSize

Indentation of a single space.

Example output:

{
 "key": "value"
}
const JsonIndentationSize(1)
doubleSpace → const JsonIndentationSize

Indentation of 2 spaces.

Example output:

{
  "key": "value"
}
const JsonIndentationSize(2)

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
length int
Length of indentation in spaces.
final
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Constants

values → const List<JsonIndentationSize>
A constant List of the values in this enum, in order of their declaration.