JsonIndentationSize enum encoder

Length of indentation per level.

Options:

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

Constructors

JsonIndentationSize(int length)
Construct a JsonIndentationSize instance.
const

Values

tab → const JsonIndentationSize

Indentation of 4 spaces.

Example output:

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

Indentation of a single space.

Example output:

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

Indentation of 2 spaces.

Example output:

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

Properties

hashCode int
The hash code for this object.
read-onlyinherited
index int
A numeric identifier for the enumerated value.
read-onlyinherited
length int
Length of indentation in spaces.
final
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent 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.
[tab, space, doubleSpace]