13 questions
2
votes
2
answers
594
views
Flutter VS Code Not Showing 'const' Warning Automatically
Previously, VS Code would automatically show the warning:
Try adding the 'const' keyword to the constructor invocation
However, now it only appears if I explicitly add
prefer_const_constructors: true
...
1
vote
1
answer
94
views
Flutter linter rules unsafe_html
While going trough the linter rules I found the unsafe_html rule. I see that it has been removed and it's not really explained why. Did these turn out to be safe in the end? I would like to set a src ...
0
votes
1
answer
180
views
Why we can't create getter inside build method whereas we can create method?
On Flutter we can create method inside inside the build method, but why we can't create getter(get).
Minimal reproducible snippet
class A extends StatefulWidget {
const A({super.key});
@override
...
0
votes
2
answers
1k
views
I am getting issue in dependencies and packages. Where should I upgrade web, meta, and material_colo_utilities packages?
C:\src\flutter\bin\flutter.bat --no-color pub get
Resolving dependencies...
flutter_lints 2.0.3 (3.0.1 available)
lints 2.1.1 (3.0.0 available)
material_color_utilities 0.5.0 (0.8.0 available)
...
0
votes
2
answers
223
views
Do not use BuildContexts across async gaps lint error on presenter layer
Stateless Widget
CustomButton.build(
label: 'login',
onPressed: () {
presenter.login(context,username,password);
},
);
Presenter class (where we have all the logic)
class Presenter {
...
60
votes
1
answer
23k
views
"AVOID using library private types in public APIs" - lint warning, even in in cookbook examples?
I noticed the style error warning https://dart-lang.github.io/linter/lints/library_private_types_in_public_api.html pop up in some of my code but also in the some of the official Flutter/Dart ...
4
votes
7
answers
3k
views
Unexpected Flutter linter warning: depend_on_referenced_packages
After I recently upgraded flutter to 3.0.0 and flutter_lints to 2.0.1, I started getting the following warning:
Depend on referenced packages.
Here, the dependency that is imported is defined in the ...