Skip to content
New issue

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

Feature/49 add box shadow #50

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Ahmadre
Copy link

@Ahmadre Ahmadre commented Feb 23, 2024

Related Issues

Context

This PR adds both SalomonItemDecoration as a global Decoration for each selected and unselected Items and also add boxShadow overrides for each item, so that users can control globally as seperatly the boxShadow.

I decided to create a controlled DataClass SalomonItemDecoration instead of Flutter's Decoration so users can't misuse the supported Decorations.

Example:

Global:

bottomNavigationBar: SalomonBottomBar(
          itemDecoration: SalomonItemDecoration(
            selectedBoxShadow: [
              BoxShadow(
                color: Colors.blue.withOpacity(.5),
                blurRadius: 25,
              ),
            ],
          ),
          ...

In each item:

items: [
            /// Home
            SalomonBottomBarItem(
              icon: Icon(Icons.home),
              title: Text("Home"),
              selectedColor: Colors.purple,
              selectedBoxShadow: [
                BoxShadow(
                  color: Colors.red.withOpacity(1),
                  blurRadius: 20,
                ),
              ],
            ),
          ...

@lukepighetti @imaNNeo please review this if you got time.

@Ahmadre
Copy link
Author

Ahmadre commented Feb 28, 2024

@lukepighetti

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant