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

Customize the selected Gbutton size, solves issue #93 #106

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Vinicius-8
Copy link

Add custom size for selected GButton, solving issue #93

Example:

gbuttonSizeIssue.mp4

Implementation

Set the property selectedGbuttonSize with a Size.

Code Example

GNav(
  rippleColor: Colors.grey[300]!,
  hoverColor: Colors.grey[100]!,
  gap: 8,
  activeColor: Colors.black,
  iconSize: 24,
  padding: EdgeInsets.symmetric(horizontal: 20, vertical: 12),
  duration: Duration(milliseconds: 400),
  tabBackgroundColor: Colors.grey[100]!,
  color: Colors.black,
  selectedGbuttonSize: Size(500, 50), // <----- Here
  tabs: [
    GButton(
      icon: LineIcons.home,
      text: 'Home',
    ),
    GButton(
      icon: LineIcons.heart,
      text: 'Likes',
    ),
    GButton(
      icon: LineIcons.search,
      text: 'Search',
    ),
    GButton(
      icon: LineIcons.user,
      text: 'Profile',
    ),
  ],
  selectedIndex: _selectedIndex,
  onTabChange: (index) {
    setState(() {
      _selectedIndex = index;
    });
  },
)

Closes #93

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

Successfully merging this pull request may close these issues.

How can I set the fixed length of the activated GButton?
1 participant