NodeTheme class
Theme configuration for node appearance and styling.
This class defines all visual properties for nodes in normal and selected states. It includes colors, borders, text styles, and padding.
Use NodeTheme.light or NodeTheme.dark for pre-configured themes, or create a custom theme with specific values.
Example usage:
final customTheme = NodeTheme.light.copyWith(
backgroundColor: Colors.blue.shade50,
selectedBorderColor: Colors.blue,
);
See also:
- NodeFlowTheme, which includes this as part of the overall theme
- NodeWidget, which uses this theme for rendering
Constructors
- NodeTheme({required Color backgroundColor, required Color selectedBackgroundColor, required Color borderColor, required Color selectedBorderColor, required double borderWidth, required double selectedBorderWidth, required BorderRadius borderRadius, required EdgeInsets padding, required TextStyle titleStyle, required TextStyle contentStyle})
-
Creates a new node theme with the specified properties.
const
Properties
- backgroundColor → Color
-
Background color for nodes in normal state.
final
- borderColor → Color
-
Border color for nodes in normal state.
final
- borderRadius → BorderRadius
-
Corner radius for node borders.
final
- borderWidth → double
-
Border width for nodes in normal state.
final
- contentStyle → TextStyle
-
Text style for the node content.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- padding → EdgeInsets
-
Padding inside the node container.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectedBackgroundColor → Color
-
Background color for selected nodes.
final
- selectedBorderColor → Color
-
Border color for selected nodes.
final
- selectedBorderWidth → double
-
Border width for selected nodes.
final
- titleStyle → TextStyle
-
Text style for the node title.
final
Methods
-
copyWith(
{Color? backgroundColor, Color? selectedBackgroundColor, Color? borderColor, Color? selectedBorderColor, double? borderWidth, double? selectedBorderWidth, BorderRadius? borderRadius, EdgeInsets? padding, TextStyle? titleStyle, TextStyle? contentStyle}) → NodeTheme - Creates a copy of this theme with the specified properties overridden.
-
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