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

implement AnimatedPadding widget #111

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

maurerdietmar
Copy link
Collaborator

Unfortunately, the provided example shows that the animation is not very smooth.
Not sure why...

Besides, do we want such widget at all? Flutter has several of them:

AnimatedSize, AnimatedAlign, AnimatedOpacity, AnimatedContainer, ...

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
@maan2003
Copy link
Collaborator

maybe we should just have AnimatedEnv? that changes env values according to animation?

Seems that setting the label size makes things better ??? ...

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
@maurerdietmar maurerdietmar force-pushed the implement-animated-padding branch from 372e962 to 28f84fe Compare January 31, 2022 12:31
@maurerdietmar
Copy link
Collaborator Author

maybe we should just have AnimatedEnv? that changes env values according to animation?

Oh, great idea. I will try to implement that - assuming it does not exist already?

@maurerdietmar
Copy link
Collaborator Author

maybe we should just have AnimatedEnv?

Thought a bit more about that, and this gets clumsy because:

  • You need to define a new Key for each animation, because Env is used by all sub-widget in the hierarchy.
  • But Keys are "key: &'static str", so you cannot do that for a reusable widget

@maan2003
Copy link
Collaborator

oh that is problem indeed

@richard-uk1
Copy link
Collaborator

It would be good to use the env here - perhaps it is a deficiency of how env works that could be changed in druid?

@maurerdietmar
Copy link
Collaborator Author

perhaps it is a deficiency of how env works that could be changed in druid?

I also don't know why they use static strings.

Anyways, using Env is still clumsy because you need to define/use a new key. You also duplicate the number of widgets required (two instead of one).

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.

3 participants