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
801 stars 150 forks source link

Tab transition animation not being played #166

Closed hwr12 closed 2 years ago

hwr12 commented 2 years ago

https://user-images.githubusercontent.com/54504396/157349240-e87e1b47-248a-4972-8881-267d10cda855.MP4

Hi, I encountered a problem while using your package, the animation of transitioning tab indicators is not being played whenever I press tab index 0 from another tab. (see the video) What might be blocking the animation? Thanks.

hwr12 commented 2 years ago
@override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: EmptyAppBar(),
      body: PageView(
        controller: _pageController,
        physics: NeverScrollableScrollPhysics(),
        children: _contentPages.map((Widget content) {
          return content;
        }).toList(),
      ),
      bottomNavigationBar: ConvexAppBar(
          style: TabStyle.reactCircle,
          backgroundColor: Color(0xff519EF8),
          color: Colors.white,
          activeColor: Colors.white,
          items: const [
            TabItem(icon: Icons.home, title: '건물/자산'),
            TabItem(icon: Icons.bookmark, title: '현황/통계'),
            TabItem(icon: Icons.menu, title: '전체'),
          ],
          initialActiveIndex: 0,//optional, default as 0
          onTap: (int i){
            _tapNav(i);
          },
      ),

    );
  }
FMorschel commented 2 years ago

For me sometimes it doesn't even go to the first index.

hwr12 commented 2 years ago

This was a temporary rendering bug and it works fine in release builds.