|
@@ -19,6 +19,8 @@ class MenuItemWidget extends StatefulWidget {
|
|
|
final double borderRadius;
|
|
|
final Color? pressedColor;
|
|
|
final ExpandableController? expandableController;
|
|
|
+ final bool isBottomBorderRadiusRemoved;
|
|
|
+ final bool isTopBorderRadiusRemoved;
|
|
|
const MenuItemWidget({
|
|
|
required this.captionedTextWidget,
|
|
|
this.isExpandable = false,
|
|
@@ -34,6 +36,8 @@ class MenuItemWidget extends StatefulWidget {
|
|
|
this.borderRadius = 4.0,
|
|
|
this.pressedColor,
|
|
|
this.expandableController,
|
|
|
+ this.isBottomBorderRadiusRemoved = false,
|
|
|
+ this.isTopBorderRadiusRemoved = false,
|
|
|
Key? key,
|
|
|
}) : super(key: key);
|
|
|
|
|
@@ -86,7 +90,11 @@ class _MenuItemWidgetState extends State<MenuItemWidget> {
|
|
|
final enteColorScheme = Theme.of(context).colorScheme.enteTheme.colorScheme;
|
|
|
final borderRadius = Radius.circular(widget.borderRadius);
|
|
|
final isExpanded = widget.expandableController?.value;
|
|
|
- final bottomBorderRadius = isExpanded != null && isExpanded
|
|
|
+ final bottomBorderRadius =
|
|
|
+ (isExpanded != null && isExpanded) || widget.isBottomBorderRadiusRemoved
|
|
|
+ ? const Radius.circular(0)
|
|
|
+ : borderRadius;
|
|
|
+ final topBorderRadius = widget.isTopBorderRadiusRemoved
|
|
|
? const Radius.circular(0)
|
|
|
: borderRadius;
|
|
|
return AnimatedContainer(
|
|
@@ -95,8 +103,8 @@ class _MenuItemWidgetState extends State<MenuItemWidget> {
|
|
|
padding: const EdgeInsets.symmetric(horizontal: 12),
|
|
|
decoration: BoxDecoration(
|
|
|
borderRadius: BorderRadius.only(
|
|
|
- topLeft: borderRadius,
|
|
|
- topRight: borderRadius,
|
|
|
+ topLeft: topBorderRadius,
|
|
|
+ topRight: topBorderRadius,
|
|
|
bottomLeft: bottomBorderRadius,
|
|
|
bottomRight: bottomBorderRadius,
|
|
|
),
|