NavigationPaneThemeData.fromResources constructor
NavigationPaneThemeData.fromResources({
- required ResourceDictionary resources,
- required Duration animationDuration,
- required Curve animationCurve,
- required Color highlightColor,
- required Typography typography,
The default navigation pane theme data.
This is initialized on FluentThemeData with the required properties.
Implementation
factory NavigationPaneThemeData.fromResources({
required ResourceDictionary resources,
required Duration animationDuration,
required Curve animationCurve,
required Color highlightColor,
required Typography typography,
}) {
return NavigationPaneThemeData(
animationDuration: animationDuration,
animationCurve: animationCurve,
backgroundColor: resources.solidBackgroundFillColorBase,
overlayBackgroundColor: resources.systemFillColorSolidNeutralBackground,
highlightColor: highlightColor,
itemHeaderTextStyle: typography.bodyStrong,
selectedTextStyle: ButtonState.resolveWith((states) {
return typography.body?.copyWith(
color: states.isPressing
? resources.textFillColorSecondary
: states.isDisabled
? resources.textFillColorDisabled
: resources.textFillColorPrimary,
);
}),
unselectedTextStyle: ButtonState.resolveWith((states) {
return typography.body?.copyWith(
color: states.isPressing
? resources.textFillColorSecondary
: states.isDisabled
? resources.textFillColorDisabled
: resources.textFillColorPrimary,
);
}),
selectedTopTextStyle: ButtonState.resolveWith((states) {
return typography.body?.copyWith(
color: states.isPressing
? resources.textFillColorTertiary
: states.isHovering
? resources.textFillColorSecondary
: resources.textFillColorPrimary,
);
}),
unselectedTopTextStyle: ButtonState.resolveWith((states) {
return typography.body?.copyWith(
color: states.isPressing
? resources.textFillColorSecondary
: states.isDisabled
? resources.textFillColorDisabled
: resources.textFillColorPrimary,
);
}),
labelPadding: const EdgeInsetsDirectional.only(end: 10.0),
iconPadding: const EdgeInsets.symmetric(horizontal: 10.0),
headerPadding: const EdgeInsetsDirectional.only(top: 10.0),
paneNavigationButtonIcon: FluentIcons.global_nav_button,
);
}