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

https://dart-lang.github.io/linter/lints/no_logic_in_create_state.html page lacks of advices #58647

Open
Nashev opened this issue Feb 2, 2022 · 2 comments
Assignees
Labels
analyzer-linter Issues with the analyzer's support for the linter package area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. linter-set-flutter P3 A lower priority bug or feature request type-documentation A request to add or improve documentation

Comments

@Nashev
Copy link

Nashev commented Feb 2, 2022

Describe the issue
When a newbie falls on linter check no_logic_in_create_state (#1875) and goes to that page, he can't realise how to write a workaround instead of bad code.

To Reproduce
Write code like https://github.com/aliyigitbireroglu/flutter-image-sequence-animator/blob/877234de33f6a6dea42ff762e8610360927b92db/image_sequence_animator/lib/image_sequence_animator.dart#L122, obtain linter warning and go to the documentation on page https://dart-lang.github.io/linter/lints/no_logic_in_create_state.html

Try to find a workaround. Miss them...

Expected behaviour
A clear and concise description of what you can do instead of using State's constructor arguments. Mentions of https://api.flutter.dev/flutter/widgets/State-class.html with links to initState and didChangeDependencies would be helpful there.

@srawlins srawlins added the type-documentation A request to add or improve documentation label Jun 29, 2022
@srawlins
Copy link
Member

I also can't read the very long sentence at https://dart-lang.github.io/linter/lints/no_logic_in_create_state.html.

And I agree, the GOOD example does not how/where to set field to 42.

@srawlins srawlins added the P3 A lower priority bug or feature request label Oct 25, 2022
@stereotype441
Copy link
Member

I'm going to take a stab at this.

@stereotype441 stereotype441 self-assigned this Feb 7, 2024
@devoncarew devoncarew added analyzer-linter Issues with the analyzer's support for the linter package area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. labels Nov 19, 2024
@devoncarew devoncarew transferred this issue from dart-lang/linter Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer-linter Issues with the analyzer's support for the linter package area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. linter-set-flutter P3 A lower priority bug or feature request type-documentation A request to add or improve documentation
Projects
None yet
Development

No branches or pull requests

5 participants