GutterDecoration class

Represents a decoration in the gutter area (line numbers column).

Gutter decorations are useful for showing git diff status, breakpoints, bookmarks, or other line-level indicators.

Example - Git diff added indicator:

controller.addGutterDecoration(GutterDecoration(
  startLine: 10,
  endLine: 15,
  type: GutterDecorationType.colorBar,
  color: Colors.green,
));

Example - Breakpoint icon:

controller.addGutterDecoration(GutterDecoration(
  startLine: 25,
  endLine: 25,
  type: GutterDecorationType.icon,
  color: Colors.red,
  icon: Icons.circle,
));

Constructors

GutterDecoration({required String id, required int startLine, required int endLine, required GutterDecorationType type, required Color color, IconData? icon, double width = 3.0, String? tooltip, int priority = 0})
Creates a gutter decoration.
const

Properties

color → Color
The color of the decoration
final
endLine → int
The end line (0-based, inclusive) of the decoration range
final
hashCode → int
The hash code for this object.
no setteroverride
icon → IconData?
Icon to display (only used when type is GutterDecorationType.icon)
final
id → String
Unique identifier for this decoration
final
priority → int
Optional priority for overlapping decorations (higher = on top)
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
startLine → int
The start line (0-based) of the decoration range
final
tooltip → String?
Optional tooltip text shown on hover
final
type → GutterDecorationType
The type of gutter decoration
final
width → double
Width of the color bar (default: 3.0)
final

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.
override