popupMenuThemeData static method
PopupMenuThemeData
popupMenuThemeData(
- Palette colors,
- TextTheme textTheme, [
- MonetShapes? shapes
Implementation
static PopupMenuThemeData popupMenuThemeData(
Palette colors,
TextTheme textTheme, [
MonetShapes? shapes,
]) {
shapes ??= _defaultShapes;
return PopupMenuThemeData(
mouseCursor: WidgetStateProperty.all(
SystemMouseCursors.click,
), // match default
color: colors.background, // Popup background
shape: shapes.border(side: BorderSide(color: colors.fill, width: 2)),
elevation: modalElevation, // Popup outline elevation
shadowColor: _singleShadowColorFor(colors.background),
surfaceTintColor: colors.background,
textStyle: textTheme.bodyMedium,
labelTextStyle: WidgetStateProperty.resolveWith((states) {
// Doesn't support hover or selected, only disabled, which we do not
// specify.
return textTheme.labelMedium!.apply(color: colors.text);
}),
iconColor: colors.fill,
enableFeedback: true,
position: PopupMenuPosition.under,
);
}