We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi , im using the repo to build a navigation bar , but the icon and text are not in same line.Im using custom icon build using svg files to font. Cross verified with inbuild icons still same. Below is the code and photo for referance. Widget build(BuildContext context) { return Scaffold( backgroundColor: Colors.transparent, extendBody: true, body: Column( children: [ Expanded(child: _buildFragmet()), ], ), bottomNavigationBar: Container( clipBehavior: Clip.hardEdge, margin: EdgeInsets.symmetric(horizontal: 15, vertical: 0), decoration: BoxDecoration( borderRadius: BorderRadius.circular(20), color: Colors.transparent), child: SafeArea( child: GNav( // rippleColor: Colors.pink, hoverColor: buttonBackground, gap: 5, style: GnavStyle.google, // textSize: 10, backgroundColor: buttonBackground, activeColor: Colors.black, iconSize: 15, padding: EdgeInsets.symmetric(horizontal: 5, vertical: 5), duration: Duration(milliseconds: 400), tabBackgroundColor: primaryColor, tabMargin: EdgeInsets.zero, color: primaryColor, tabs: [ GButton( margin: EdgeInsets.fromLTRB(10, 20, 0, 20), icon: CustomIcons.customhomeicon, text: 'Home', ), GButton( gap: 10, margin: EdgeInsets.symmetric(vertical: 20), icon: CustomIcons.customcontenticon, text: 'Content', ), GButton( margin: EdgeInsets.symmetric(vertical: 20), icon: CustomIcons.customstoriesicon, text: 'Stories', ), GButton( margin: EdgeInsets.symmetric(vertical: 20), icon: CustomIcons.customemotionicon, text: 'Emotions', ), GButton( margin: EdgeInsets.fromLTRB(0, 20, 10, 20), icon: CustomIcons.custommenuicon, text: 'Menu', ), ], selectedIndex: _selectedIndex, onTabChange: (index) { print(index); setState(() { _selectedIndex = index; }); }, ), ), ), ); }
The text was updated successfully, but these errors were encountered:
I have checked your code line number 140 in button.dart replace Stack as Row and bring up the icon in the first index . This will fix the issue.
Sorry, something went wrong.
No branches or pull requests
Hi , im using the repo to build a navigation bar , but the icon and text are not in same line.Im using custom icon build using svg files to font. Cross verified with inbuild icons still same.
Below is the code and photo for referance.
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.transparent,
extendBody: true,
body: Column(
children: [
Expanded(child: _buildFragmet()),
],
),
bottomNavigationBar: Container(
clipBehavior: Clip.hardEdge,
margin: EdgeInsets.symmetric(horizontal: 15, vertical: 0),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20), color: Colors.transparent),
child: SafeArea(
child: GNav(
// rippleColor: Colors.pink,
hoverColor: buttonBackground,
gap: 5,
style: GnavStyle.google,
// textSize: 10,
backgroundColor: buttonBackground,
activeColor: Colors.black,
iconSize: 15,
padding: EdgeInsets.symmetric(horizontal: 5, vertical: 5),
duration: Duration(milliseconds: 400),
tabBackgroundColor: primaryColor,
tabMargin: EdgeInsets.zero,
color: primaryColor,
tabs: [
GButton(
margin: EdgeInsets.fromLTRB(10, 20, 0, 20),
icon: CustomIcons.customhomeicon,
text: 'Home',
),
GButton(
gap: 10,
margin: EdgeInsets.symmetric(vertical: 20),
icon: CustomIcons.customcontenticon,
text: 'Content',
),
GButton(
margin: EdgeInsets.symmetric(vertical: 20),
icon: CustomIcons.customstoriesicon,
text: 'Stories',
),
GButton(
margin: EdgeInsets.symmetric(vertical: 20),
icon: CustomIcons.customemotionicon,
text: 'Emotions',
),
GButton(
margin: EdgeInsets.fromLTRB(0, 20, 10, 20),
icon: CustomIcons.custommenuicon,
text: 'Menu',
),
],
selectedIndex: _selectedIndex,
onTabChange: (index) {
print(index);
setState(() {
_selectedIndex = index;
});
},
),
),
),
);
}
The text was updated successfully, but these errors were encountered: