SelectionTheme class
Theme configuration for the selection rectangle appearance.
SelectionTheme defines the visual styling of the selection rectangle that appears when dragging to select multiple nodes. It also affects the appearance of selected nodes and connections.
Example:
// Create a custom selection theme
final customTheme = SelectionTheme(
color: Colors.blue.withOpacity(0.2),
borderColor: Colors.blue,
borderWidth: 2.0,
);
// Or use a predefined theme
final lightTheme = SelectionTheme.light;
final darkTheme = SelectionTheme.dark;
Constructors
- SelectionTheme({required Color color, required Color borderColor, required double borderWidth})
-
Creates a selection theme with the specified visual properties.
const
Properties
- borderColor → Color
-
Border color for the selection rectangle.
final
- borderWidth → double
-
Border width for the selection rectangle in pixels.
final
- color → Color
-
Fill color for the selection rectangle.
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
-
copyWith(
{Color? color, Color? borderColor, double? borderWidth}) → SelectionTheme - 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 SelectionTheme
- A predefined dark theme for selection.
- light → const SelectionTheme
- A predefined light theme for selection.