GutterBuilder class
Use the GutterBuilder to render custom content in the gutter. eg:
CodeForge(
gutterBuilder: GutterBuilder(
builder: (lineNumber, lineText) => if(lineNumber == 1) "[HEADER]" : null
)
)
Result:
[HEADER]| import os
2 | import sys
3 |
4 | def main():
5 | pass
To exclude the index from modified content. Set includeReplacedIndex to false.
eg:
CodeForge(
gutterBuilder: GutterBuilder(
includeReplacedIndex: false,
builder: (lineNumber, lineText) => if(lineNumber == 1) "[HEADER]" : null
)
)
Result:
[HEADER]| import os
1 | import sys
2 |
3 | def main():
4 | pass
Constructors
- GutterBuilder({required String? builder(int, String), bool includeReplacedIndex = true})
Properties
- builder → String? Function(int, String)
-
Builder that builds the custom gutter content.
Takes the int lineNumber and String lineText parameters and returns the custom
string content for the corresponding line.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- includeReplacedIndex → bool
-
To exclude the index from modified content. Set includeReplacedIndex to false.
eg:final - 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