resolve static method
- @internal
- BuildContext context, {
- required PullDownMenuRouteTheme? routeTheme,
The helper method to quickly resolve PullDownMenuRouteTheme from PullDownButtonTheme.routeTheme or PullDownMenuRouteTheme.defaults as well as from theme data from PullDownButton or showPullDownMenu.
Implementation
@internal
static PullDownMenuRouteTheme resolve(
BuildContext context, {
required PullDownMenuRouteTheme? routeTheme,
}) {
final theme = PullDownMenuRouteTheme.of(context);
final defaults = PullDownMenuRouteTheme.defaults(context);
return PullDownMenuRouteTheme(
backgroundColor: routeTheme?.backgroundColor ??
theme?.backgroundColor ??
defaults.backgroundColor!,
borderRadius: routeTheme?.borderRadius ??
theme?.borderRadius ??
defaults.borderRadius!,
beginShadow: routeTheme?.beginShadow ??
theme?.beginShadow ??
defaults.beginShadow!,
endShadow:
routeTheme?.endShadow ?? theme?.endShadow ?? defaults.endShadow!,
width: routeTheme?.width ?? theme?.width ?? defaults.width!,
topWidgetWidth: routeTheme?.topWidgetWidth ?? theme?.topWidgetWidth
);
}