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

Update file templates #226

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

Update file templates #226

wants to merge 4 commits into from

Conversation

pohuing
Copy link

@pohuing pohuing commented Sep 3, 2022

The new file templates for StatefulWidget and StatefulWidget with AnimationController both leak the private State implementations. The official plugin's live template already avoid this so I updated the templates to avoid that here as well.

The template for StatefulWidget with an AnimationController also does not compile, since _controller is not initialised in null safe code. I fixed that by making the declaration late.

Switch to State<_Type> to not leak private state class in public api
Don't leak private State class. Fix compile error from missing late in _controller declaration
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