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

Add shadows to theme #335

Open
jorre127 opened this issue Nov 16, 2023 · 0 comments
Open

Add shadows to theme #335

jorre127 opened this issue Nov 16, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request improve code Improve the code

Comments

@jorre127
Copy link
Contributor

Add shadows to theme so they are easily reusable and all the shadows are the same in the app. Something like:

class FlutterTemplateShadows {
  late final List<BoxShadow> cardShadow;

  FlutterTemplateShadows({required Color shadow}) {
    cardShadow = [
      BoxShadow(
        color: shadow,
        offset: const Offset(1, 1),
        blurRadius: 2,
      ),
      BoxShadow(
        color: shadow,
        offset: const Offset(3, 3),
        blurRadius: 4,
      ),
    ];
  }
}

And then in your theme:

FlutterTemplateTheme._(
         ...
        shadows: SPShadows(shadow: colorTheme.shadow),
      );
@jorre127 jorre127 added enhancement New feature or request improve code Improve the code labels Nov 16, 2023
@jorre127 jorre127 self-assigned this Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request improve code Improve the code
Projects
Status: In Review
Development

No branches or pull requests

1 participant