CodeFormatter class
Converts a CodeNode to a formatted String, using the constructor parameters.
Using the official (dartfmt)https://github.com/dart-lang/dart_style/wiki/Formatting-Rules
with the dart_style package
Note that this formatter may throw parsing exceptions.
You can use the CodeFormatter.unFormatted method when you need a code partial that can not be parsed by the Dart formatter
Constructors
- CodeFormatter({String? lineEnding, int? pageWidth, int? indent})
Properties
- dartFormatter → DartFormatter
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
format(
CodeNode codeNode) → String -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
unFormatted(
CodeNode codeNode) → String
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited