0

I want to use Linear Gradient icon in my bottom navigation bar for selected icon property can anybody tell me how to do it ! Thank You.

Melvin
  • 63
  • 1
  • 5

1 Answers1

0

You can add the BottomNavigationBarItem Like as below.

BottomNavigationBarItem(
            icon: Icon(Icons.home),
            label: 'Home',
            activeIcon: ShaderMask(
              shaderCallback: (Rect bounds) {
                return LinearGradient(
                  colors: <Color>[
                    Colors.red,
                    Colors.blue
                  ],
                  tileMode: TileMode.repeated,
                ).createShader(bounds);
              },
              child: Icon(Icons.home),
            ),
          ),
ABV
  • 857
  • 2
  • 3