Posts

Showing posts with the label tip coding

[Flutter tip] How to ignore lowerCamelCase warnings for your whole project

Image
If you like me, are coding generally in C# or other Camel case based programming language and start to  code in Flutter / Dart, you will always see a warning like this:   The variable name 'xxxx' isn't a lowerCamelCase identifier. Try changing the name to follow the lowerCamelCase style. To solve that, you can add a specific comment at the begining of each file where you have this issue. But maybe the most interesting thing for you is to do it only once in your whole project. For that, you have to edit the following file: analysis_options.yaml Add the following statements:  non_constant_identifier_names: ignore # This file configures the analyzer, which statically analyzes Dart code to # check for errors, warnings, and lints. include: package:flutter_lints/flutter.yaml linter: rules: # avoid_print: false # Uncomment to disable the `avoid_print` rule # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule # Disable the non_con...