TreeViewTheme class
Defines the appearance of the TreeView.
Used by TreeView to control the appearance of the sub-widgets in the TreeView widget.
Constructors
- TreeViewTheme({ColorScheme colorScheme = const ColorScheme.light(), IconThemeData iconTheme = const IconThemeData.fallback(), ExpanderThemeData expanderTheme = const ExpanderThemeData.fallback(), TextStyle labelStyle = const TextStyle(), TextStyle parentLabelStyle = const TextStyle(fontWeight: FontWeight.bold), TextOverflow? labelOverflow, TextOverflow? parentLabelOverflow, double levelPadding = _kDefaultLevelPadding, bool dense = true, double? verticalSpacing, double? horizontalSpacing, double iconPadding = 8, Duration expandSpeed = const Duration(milliseconds: _kExpandSpeed)})
-
const
- TreeViewTheme.fallback()
-
Creates a TreeView theme with some reasonable default values.
const
Properties
- colorScheme → ColorScheme
-
The ColorScheme for TreeView widget.
final
- dense → bool
-
Whether the TreeNode is vertically dense.
final
- expanderTheme → ExpanderThemeData
-
The appearance theme for TreeNode expander icons.
final
- expandSpeed → Duration
-
the speed at which expander icon animates.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- horizontalSpacing → double?
-
Horizontal spacing between tabs.
If this property is null then horizontal spacing between tabs is default
_treeView.theme.iconTheme.size + 5
final - iconPadding → double
-
Horizontal padding for node icons.
final
- iconTheme → IconThemeData
-
The default appearance theme for TreeNode icons.
final
- labelOverflow → TextOverflow?
-
The text overflow for child TreeNode text.
If this property is null then
softWrap
is true;final - labelStyle → TextStyle
-
The text style for child TreeNode text.
final
- levelPadding → double
-
The horizontal padding for the children of a TreeNode parent.
final
- parentLabelOverflow → TextOverflow?
-
The text overflow for parent TreeNode text.
If this property is null then
softWrap
is true;final - parentLabelStyle → TextStyle
-
The text style for parent TreeNode text.
final
- quickExpandSpeed → Duration
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- verticalSpacing → double?
-
Vertical spacing between tabs.
If this property is null then dense attribute will work and vice versa.
final
Methods
-
copyWith(
{ColorScheme? colorScheme, IconThemeData? iconTheme, ExpanderThemeData? expanderTheme, TextStyle? labelStyle, TextStyle? parentLabelStyle, TextOverflow? labelOverflow, TextOverflow? parentLabelOverflow, bool? dense, double? verticalSpacing, double? horizontalSpacing, double? iconPadding, double? levelPadding}) → TreeViewTheme - Creates a copy of this theme but with the given fields replaced with the new values.
-
merge(
TreeViewTheme other) → TreeViewTheme - Returns a new theme that matches this TreeView theme but with some values replaced by the non-null parameters of the given icon theme. If the given TreeViewTheme is null, simply returns this theme.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resolve(
BuildContext context) → TreeViewTheme -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override