Skip to content

Commit

Permalink
YaruPopupMenuButton improvements (#385)
Browse files Browse the repository at this point in the history
  • Loading branch information
Feichtmeier committed Nov 15, 2022
1 parent dde086d commit 088cb0a
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion lib/src/controls/yaru_popup_menu_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,14 @@ class YaruPopupMenuButton<T> extends StatelessWidget {
this.onSelected,
this.onCanceled,
this.tooltip,
this.position = PopupMenuPosition.under,
this.position = PopupMenuPosition.over,
this.padding = const EdgeInsets.symmetric(horizontal: 5),
this.childPadding = const EdgeInsets.symmetric(horizontal: 5),
this.enabled = true,
this.offset = const Offset(0, 40),
this.enableFeedback,
this.constraints,
this.elevation,
});

final T? initialValue;
Expand All @@ -29,6 +33,10 @@ class YaruPopupMenuButton<T> extends StatelessWidget {
final EdgeInsets padding;
final EdgeInsets childPadding;
final bool enabled;
final Offset offset;
final bool? enableFeedback;
final BoxConstraints? constraints;
final double? elevation;

@override
Widget build(BuildContext context) {
Expand All @@ -38,13 +46,17 @@ class YaruPopupMenuButton<T> extends StatelessWidget {
color: Colors.transparent,
child: PopupMenuButton(
enabled: enabled,
elevation: elevation,
position: position,
padding: EdgeInsets.zero,
initialValue: initialValue,
onSelected: onSelected,
onCanceled: onCanceled,
tooltip: tooltip,
itemBuilder: itemBuilder,
offset: offset,
enableFeedback: enableFeedback,
constraints: constraints,
child: _YaruPopupDecoration(
child: child,
padding: padding,
Expand Down

0 comments on commit 088cb0a

Please sign in to comment.