Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SideMenuItemTile Margins forcing icon and label to overlap #14

Open
aardrop opened this issue Dec 17, 2024 · 1 comment
Open

SideMenuItemTile Margins forcing icon and label to overlap #14

aardrop opened this issue Dec 17, 2024 · 1 comment

Comments

@aardrop
Copy link

aardrop commented Dec 17, 2024

Is there a way to prevent the icon and label from overlapping when you add margins? I adjusted the margin, figuring the interface would work the same as the little, but instead forced the icon on top of the label.

SideMenuItemDataTile(
      title: label,
      icon: Icon(icon),
      margin: EdgeInsetsDirectional.symmetric(horizontal: 20),
      isSelected: _selectedIndex == index,
      hasSelectedLine: false,
      onTap: () {
        setState(() {
          _selectedIndex = index;
        });
        tabsRouter.setActiveIndex(index);
      },
    );
Screenshot 2024-12-17 at 1 09 08 PM

In the example photo, the elements are more padding and condensed, which I'm trying to emulate. I am on the newest version of flutter and the newest release of this package.

@resfandiari
Copy link
Owner

It appears that it should not behave like this because of the structure of the base widget:

Row(
        children: [
          _icon(),
          if (widget.isOpen)
            Expanded(
              child: _title(context: context),
            ),
        ],
      );

I haven't tested it with the latest version of the stable channel. Let me check, and I will fix this as soon as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants