Skip to content

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

Open
Vinicius-8 wants to merge 1 commit into
sooxt98:masterfrom
Vinicius-8:gbutton-custom-size
Open

Customize the selected Gbutton size, solves issue #93#106
Vinicius-8 wants to merge 1 commit into
sooxt98:masterfrom
Vinicius-8:gbutton-custom-size

Conversation

@Vinicius-8

Copy link
Copy Markdown

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