Indentation class
Change indentation in a String while preserving existing relative indentation.
For easier usage, see IndentedString
in string_extensions.dart.
Constructors
- Indentation(String _input)
-
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getLevel(
) → int -
Returns the indentation level of
_input
. -
indent(
int indentationLevel) → String -
Returns
_input
withindentationLevel
applied while preserving relative indentation. -
indentBy(
int howMuch) → String -
Returns
_input
with indentation level changed byhowMuch
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
trimMargin(
[String marginPrefix = '|']) → String -
Returns
_input
, but trims leading whitespace characters followed by the givenmarginPrefix
from each line. -
unindent(
) → String -
Returns
_input
with all extra indentation stripped while preserving relative indentation.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited