0

I am trying to make bottomnavigationbar like this, BottomNavigationBar

But I am not able to add that white pointer, it's not getting stick to bottom. I've tried stack and column. facing issues to give fix bottom position to my active item pointer.

we can add 'activeIcon' with that pointer. yes I have not created any widget I'm just using 'BottomnavigationBarItem'.

can anyone help me with this ?

This is my sample code, if you want to look.

bottomNavigationBar: Container(
              height: 100.h,
              width: Get.size.width,
              decoration: BoxDecoration(
                borderRadius: BorderRadius.circular(
                  22.r,
                ),
              ),
              child: ClipRRect(
                borderRadius: BorderRadius.only(
                  topLeft: Radius.circular(
                    22.78.r,
                  ),
                  topRight: Radius.circular(
                    22.78.r,
                  ),
                ),
                child: Wrap(children: <Widget>[
                  Theme(
                    data: ThemeData(
                      highlightColor: Colors.transparent,
                      splashFactory: NoSplash.splashFactory,
                    ),
                    child: BottomNavigationBar(
                      type: BottomNavigationBarType.fixed,
                      backgroundColor: AppColors.color3C,
                      showSelectedLabels: false,
                      showUnselectedLabels: false,
                      selectedLabelStyle: const TextStyle(),
                      selectedItemColor: AppColors.color00,
                      unselectedItemColor: AppColors.colorFF,
                      currentIndex: controller.currentindex.value,
                      onTap: ((value) {
                        controller.changeIndex(value);
                      }),
                      items: [
                        BottomNavigationBarItem(
                          icon: Image.asset(
                            AppIcons.home,
                            height: 24.h,
                            width: 24.w,
                          ),
                          label: "",
                        ),
                        BottomNavigationBarItem(
                          icon: Column(
                            children: [
                              Image.asset(
                                AppIcons.second,
                                height: 22.h,
                                width: 22.w,
                              ),
                              // Image.asset(
                              //   AppIcons.active,
                              // ),
                            ],
                          ),
                          label: "",
                        ),
                        BottomNavigationBarItem(
                          icon: Container(
                            height: 65.17.h,
                            width: 65.17.w,
                            decoration: BoxDecoration(
                              color: AppColors.color00,
                              shape: BoxShape.circle,
                            ),
                            child: Padding(
                              padding: EdgeInsets.all(
                                24.h.w,
                              ),
                              child: Image.asset(
                                AppIcons.plus,
                                height: 13.38.h,
                                width: 13.38.w,
                              ),
                            ),
                          ),
                          label: "",
                        ),
                        BottomNavigationBarItem(
                          icon: Column(
                            children: [
                              Image.asset(
                                AppIcons.sub,
                                height: 22.h,
                                width: 22.w,
                              ),
                              // Image.asset(
                              //   AppIcons.active,
                              // ),
                            ],
                          ),
                          label: "",
                        ),
                        BottomNavigationBarItem(
                          icon: Column(
                            children: [
                              Image.asset(
                                AppIcons.option,
                                height: 22.h,
                                width: 22.w,
                              ),
                              // Image.asset(
                              //   AppIcons.active,
                              // ),
                            ],
                          ),
                          label: "",
                        ),
                      ],
                    ),
                  ),
                ]),
              ),
            ),
iamSahil
  • 1
  • 2

0 Answers0