Skip to content

Commit

Permalink
YaruPopupMenuButton: make radius changeable (#616)
Browse files Browse the repository at this point in the history
  • Loading branch information
Feichtmeier authored Feb 12, 2023
1 parent e228f2a commit 5d0a956
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/src/widgets/yaru_popup_menu_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ class YaruPopupMenuButton<T> extends StatelessWidget {
this.enableFeedback,
this.constraints,
this.elevation,
this.borderRadius = const BorderRadius.all(
Radius.circular(kYaruButtonRadius),
),
});

final T? initialValue;
Expand All @@ -39,6 +42,7 @@ class YaruPopupMenuButton<T> extends StatelessWidget {
final bool? enableFeedback;
final BoxConstraints? constraints;
final double? elevation;
final BorderRadius borderRadius;

@override
Widget build(BuildContext context) {
Expand All @@ -48,7 +52,7 @@ class YaruPopupMenuButton<T> extends StatelessWidget {
final shape = style?.shape?.resolve(state) ??
RoundedRectangleBorder(
side: BorderSide(color: Theme.of(context).dividerColor),
borderRadius: BorderRadius.circular(kYaruButtonRadius),
borderRadius: borderRadius,
);
return DecoratedBox(
decoration: ShapeDecoration(shape: shape.copyWith(side: side)),
Expand Down

0 comments on commit 5d0a956

Please sign in to comment.