Skip to content

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