NodeWidgetLeadingIcon constructor
const
NodeWidgetLeadingIcon({
- Key? key,
- Icon? expandIcon,
- Icon? collapseIcon,
- Icon leafIcon = const Icon(Icons.article_rounded),
- EdgeInsetsGeometry padding = const EdgeInsets.all(8.0),
- bool useFoldersOnly = false,
- Color? leafIconDisabledColor,
- double? splashRadius,
- VoidCallback? onPressed,
Creates a NodeWidgetLeadingIcon.
If you're using custom icons for expandIcon or collapseIcon, make
sure to give them Keys so that flutter animates the swap correctly.
Take a look at NodeWidgetLeadingIcon.kExpandIconKey and NodeWidgetLeadingIcon.kCollapseIconKey.
The leafIcon don't need a key as it doesn't get animated.
Implementation
const NodeWidgetLeadingIcon({
Key? key,
this.expandIcon,
this.collapseIcon,
this.leafIcon = const Icon(Icons.article_rounded),
this.padding = const EdgeInsets.all(8.0),
this.useFoldersOnly = false,
this.leafIconDisabledColor,
this.splashRadius,
this.onPressed,
}) : super(key: key);