hacktons / convex_bottom_bar

A Flutter package which implements a ConvexAppBar to show a convex tab in the bottom bar. Theming supported.
https://bar.hacktons.cn
Apache License 2.0
791 stars 147 forks source link

StyleHook issue #209

Open ZahidUrRehman13 opened 8 months ago

ZahidUrRehman13 commented 8 months ago

when insert svg image in place of icon and active icon, it overflow the circle and when i decrease the active icon size as per direction then it unfortunaltly does not change the icon size

bottomNavigationBar: StyleProvider( style: Style(), child: ConvexAppBar( items: [ tabWidget("asset/png/default/calende.svg"), tabWidget("asset/png/default/plate.svg"), tabWidget("asset/png/default/dashboard.svg"), tabWidget("asset/png/default/main.svg"), tabWidget("asset/png/default/file.svg"), ], onTap: (i) => setState(() => currentIndex = i), backgroundColor: ConstantColor.colorBottomStatusBar, activeColor: ConstantColor.colorOrangeTiger, initialActiveIndex: 2, top: -15, style: TabStyle.custom, ), ))

TabItem tabWidget(String images) { return TabItem( icon: SvgPicture.asset( images, color: ConstantColor.colorBlack, ), activeIcon: SvgPicture.asset( images, color: ConstantColor.colorWhite, ) ); }

class Style extends StyleHook { @override double get activeIconSize => 30;

@override double get activeIconMargin => 8;

@override double get iconSize => 30;

@override TextStyle textStyle(Color color, String? fontFamily) { return TextStyle(fontSize: 0, color: color); }