Open liyofx opened 8 months ago
I think removing it from analysis is a better solution. Because having the code generator check these cases can cause a lot of confusion.
Warnings can be hidden from the analysis_options.yaml file.
include: package:flutter_lints/flutter.yaml analyzer: exclude: [ build/**, lib/**.g.dart ] linter:
@emintolgahanpolat But this doesn't solve the underlying problem. As I know, a const field is more performant, than a final field.
@JuKu Yes you are right, a const field is more performant, than a final field.
But if _data wasn't null we couldn't use const. const_initialized_with_non_constant_value
If _data is null, const can be used. Do you think this will solve the problem?
If you think this will solve the problem I can create a PR.
@emintolgahanpolat I think this should work! :) And it should solve the problem very well.
Btw, I think these are the rules from the Flutter analyzer:
I think only the last rule is relevant for us, or?