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

[Views] - shadow modifier method #31

Open
4 tasks done
suragch opened this issue Jun 15, 2024 · 0 comments
Open
4 tasks done

[Views] - shadow modifier method #31

suragch opened this issue Jun 15, 2024 · 0 comments
Assignees

Comments

@suragch
Copy link
Collaborator

suragch commented Jun 15, 2024

In SwiftUI you add shadow to a View with the shadow modifier method:

Screenshot 2024-06-15 at 08 27 34
Rectangle()
    .fill(Color.purple)
    .shadow(color: .gray, radius: 10, x: 0, y: 10)
    .frame(width: 200, height: 100)

Note that this is a method on View and not on Shape. See #27. For that reason, shadows can be applied to any view. So in Flutter, we can make this a composable widget:

Shadow(
  color: Colors.grey,
  radius: 10.0,
  x: 0.0,
  y: 10.0,
  child: AnyWidget(),
)

Tasks:

  • Create SwiftUI examples
  • Implement Flutter widget with doc comments
  • Create Flutter examples
  • Add golden tests
@suragch suragch self-assigned this Jun 15, 2024
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

No branches or pull requests

1 participant