Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Flutter Code Quality CheckerNew to Visual Studio Code? Get it now.
Flutter Code Quality Checker

Flutter Code Quality Checker

Vishal Gole

|
2 installs
| (0) | Free
Comprehensive Dart/Flutter code quality analyzer — checks for print statements, missing const, BLoC anti-patterns, unnecessary rebuilds, and hardcoded values. Get a coding standard score with clickable issues and fix suggestions.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Flutter Code Quality Checker

VS Code Marketplace License: MIT

🛡️ A comprehensive Dart/Flutter code quality analyzer that helps you write cleaner, more maintainable Flutter applications.

Flutter Code Quality Checker

✨ Features

🔍 Five Powerful Analyzers

Analyzer What it Checks Severity
Print Statements print(), debugPrint(), stdout.write() left in code ⚠️ Warning
Missing Const Widget constructors that should use const keyword ℹ️ Info
BLoC Anti-Patterns Side effects in BlocBuilder, missing close(), no Equatable 🔴 Error / ⚠️ Warning
Unnecessary Rebuilds Controllers in build(), MediaQuery.of(), missing Keys 🔴 Error / ⚠️ Warning
Hardcoded Values Hardcoded strings, colors, URLs, dimensions in widgets ℹ️ Info / ⚠️ Warning

📊 Coding Standard Score

Get a 0-100 quality score for your code with color-coded grades:

  • 🟢 90-100: Excellent
  • 🟡 70-89: Good
  • 🟠 50-69: Needs Improvement
  • 🔴 0-49: Poor

🖥️ Beautiful Bottom Panel UI

  • Score Gauge: Animated circular progress indicator
  • Issue Cards: Color-coded severity breakdown (Errors, Warnings, Info, Hints)
  • Clickable Issues: Click any issue to jump directly to the problematic line
  • Filters & Sorting: Filter by category, severity; sort by file, line, or severity
  • Theme Support: Adapts to your VS Code theme (dark/light)

🎯 Flexible Scope

Choose what to analyze:

  • Check Current File — Analyze just the active Dart file
  • Check Entire Project — Scan all Dart files in your workspace

⚡ Smart Exclusions

Automatically skips:

  • Generated files (*.g.dart, *.freezed.dart, *.mocks.dart)
  • Test files (configurable)
  • Build directories and .dart_tool

🚀 Getting Started

Installation

  1. Open VS Code
  2. Go to Extensions (Ctrl+Shift+X / Cmd+Shift+X)
  3. Search for "Flutter Code Quality Checker"
  4. Click Install

Usage

  1. Open a Flutter/Dart project
  2. Open Command Palette (Ctrl+Shift+P / Cmd+Shift+P)
  3. Type "Flutter Quality: Analyze Code Quality"
  4. Select "Check Current File" or "Check Entire Project"
  5. View results in the Flutter Quality panel at the bottom

You can also:

  • Right-click in a Dart file → "Analyze Current File"
  • Click the shield icon in the editor title bar
  • Check the status bar for your last score

⚙️ Configuration

Open Settings (Ctrl+,) and search for "Flutter Quality Checker":

Setting Default Description
enablePrintCheck true Check for print statements
enableConstCheck true Check for missing const keywords
enableBlocCheck true Check for BLoC anti-patterns
enableRebuildCheck true Check for unnecessary rebuilds
enableHardcodedCheck true Check for hardcoded values
excludePatterns ["**/*.g.dart", ...] Glob patterns to exclude
excludeTestFiles true Exclude test files from analysis

📋 Rules Reference

Print Statements (warning)

// ❌ Bad
print('debug value: $value');
debugPrint('something');

// ✅ Good
if (kDebugMode) {
  debugPrint('debug value: $value');
}
// Or use a logging framework like `logger`

Missing Const (info)

// ❌ Bad
Text('Hello World')
SizedBox(height: 16)
EdgeInsets.all(8.0)

// ✅ Good
const Text('Hello World')
const SizedBox(height: 16)
const EdgeInsets.all(8.0)

BLoC Issues (error / warning)

// ❌ Bad - Side effect in BlocBuilder
BlocBuilder<MyBloc, MyState>(
  builder: (context, state) {
    if (state.isError) {
      Navigator.of(context).pop(); // Side effect!
    }
    return Container();
  },
);

// ✅ Good - Use BlocListener for side effects
BlocListener<MyBloc, MyState>(
  listener: (context, state) {
    if (state.isError) {
      Navigator.of(context).pop();
    }
  },
  child: BlocBuilder<MyBloc, MyState>(
    builder: (context, state) => Container(),
  ),
);

Unnecessary Rebuilds (error / warning)

// ❌ Bad - Controller created in build()
Widget build(BuildContext context) {
  final controller = TextEditingController(); // Recreated every build!
  return TextField(controller: controller);
}

// ✅ Good - Controller as class field
late final _controller = TextEditingController();

Widget build(BuildContext context) {
  return TextField(controller: _controller);
}

Hardcoded Values (info / warning)

// ❌ Bad
Text('Welcome to our app')
Container(color: Color(0xFF42A5F5))
Padding(padding: EdgeInsets.all(16.0))

// ✅ Good
Text(AppStrings.welcomeMessage)
Container(color: Theme.of(context).colorScheme.primary)
Padding(padding: const EdgeInsets.all(AppDimens.paddingMd))

🤝 Contributing

Contributions are welcome! Please feel free to submit issues and pull requests.

📄 License

This project is licensed under the MIT License — see the LICENSE file for details.


Made with ❤️ for the Flutter community

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft