flutter-intellij icon indicating copy to clipboard operation
flutter-intellij copied to clipboard

Setting avoid_print: error in our analysis_options.yaml file will only generate an error. It won't prevent app running. I need alert dialog like vscode

Open vijaymsc opened this issue 1 year ago • 0 comments

Thanks for the feedback! If your issue is related to the Flutter framework itself, please open an issue at github.com/flutter/flutter.

Steps to Reproduce

main.dart
import 'package:flutter/material.dart';

void main() {
  runApp(  const myApp());
}

class myApp extends StatelessWidget {
  const myApp({super.key});
//final data = '';
  @override
  Widget build(BuildContext context) {
    print('jerkn');
    return MaterialApp(
      home: Scaffold(
        body: Center(
          child: ElevatedButton(
            onPressed: () {
              print('Button Pressed');
            },
            child: const Text('Press me'),
          ),
        ),
      ),
    );
  }
}
analysis_options.yaml

include: package:lint/analysis_options.yaml

# Not happy with the default? Customize the rules depending on your needs.
# Here are some examples:
analyzer:

  errors:
    avoid_print: error

linter:
  rules:
    
    avoid_print: true

Version info

Please paste the output of running flutter doctor -v here (available from the command line or from Tools > Flutter > Flutter Doctor). It will provide the version of the Flutter framework as well as of the IntelliJ plugin.

vijaymsc avatar May 31 '24 05:05 vijaymsc