GridTheme class

Theme configuration for the grid background.

GridTheme defines the visual appearance of the grid rendered behind the node flow canvas. The grid provides visual reference points and can be used for alignment and snapping.

Example:

// Create a custom grid theme
final customTheme = GridTheme(
  color: Colors.grey.shade300,
  size: 25.0,
  thickness: 1.0,
  style: GridStyles.lines,
);

// Or use a predefined theme
final lightTheme = GridTheme.light;
final darkTheme = GridTheme.dark;

Constructors

GridTheme({required Color color, required double size, required double thickness, required GridStyle style})
Creates a grid theme with the specified visual properties.
const

Properties

color Color
Color of the grid lines or dots.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size double
Spacing between grid lines in pixels.
final
style GridStyle
The grid style to render on the canvas background.
final
thickness double
Thickness of grid lines in pixels.
final

Methods

copyWith({Color? color, double? size, double? thickness, GridStyle? style}) GridTheme
Creates a copy of this theme with the specified properties replaced.
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

Constants

dark → const GridTheme
A predefined dark theme for the grid.
light → const GridTheme
A predefined light theme for the grid.