Avoid `print` calls in production code Flutter
I started seeing this warning in all my print statements.print('Hello World');
It is because of the flutter_lints package which is implicitly added to new projects created after Flutter 2.3.0.
You can use any of the following solutions.
1. Use debugPrint
2. To remove the warning in that single line:
// ignore: avoid_printprint('Hello World');
3. To remove the warning in that file
// ignore_for_file: avoid_printprint('Hello World');
4. To remove the warning from the whole project.
Open analysis_options.yaml file and add this linter rule:
include: package:flutter_lints/flutter.yamllinter:rules:avoid_print: false