🔥 DCM 1.36.0 includes 11 new rules for Flutter, Common, Equatable, & Mocktail categories. To learn how these rules can prevent potential issues and bugs, read: dcm.dev/blog/2026/03...
DCM
DCM
@dcm.dev
Advanced linter for Flutter and Dart developers dcm.dev. Join our discord https://discord.gg/Vzjprgk4sb. "its not AI, but it’s better!"
214 followers33 following180 posts
#Flutter devs: how many of these have you run into? We’ve rounded up 15 common Flutter & Dart mistakes you’ll definitely recognise: ⚠️ Memory leaks ⚠️ `setState` misuse ⚠️ Async pitfalls ⚠️ Testing gaps & more Find out how to spot and fix them before they break your app: dcm.dev/blog/2025/03...
🤔 Most teams can tell when a Flutter method feels too complex. The problem is that “too complex” is subjective. Read "Cyclomatic Complexity, #Flutter Guide" & learn how to shield your code and to refactor it down and protect your team now & later! dcm.dev/blog/2026/04...
✨ Still doing manual null checks in your collection literals? DCM’s prefer-null-aware-spread rule warns when you could use ...? in your #Flutter code instead. 🎥 Watch to learn how to fix it: youtu.be/92X6GXwW-N8
When it comes to #Flutter widget code, there are different expectation compared to plain domain logic. That’s why our guide separates widget metrics from non-widget metrics, so UI, services, and domain logic are measured differently: dcm.dev/docs/guides/...
🚀 Quality code tip: Use the variable you already created. It's easy to miss, but the "use-existing-variable" rule dcm.dev/docs/rules/c... catches repeated expressions when a variable already exists. 🪧 Less code 🔁 Less duplication ✅ Fewer inconsistencies
DCM has delivered measurable improvements for Appinio: ⚡ faster, smoother PR reviews 🐛 fewer runtime issues ✅ increased code consistency 👋 easier onboarding 🔄 continuous improvement without blocking development Read more: dcm.dev/customers/ap...
Is your #Flutter app silently excluding users? In our new blog: ✅ New accessibility features in Flutter 3.32 ✅ Fixing common pitfalls (labels, text scaling, contrast) ✅ Automated testing with meetsGuideline & more ✅ Practical code examples & tools dcm.dev/blog/2025/06...
A small #Flutter lint that can prevent confusing layout issues: avoid-flexible-outside-flex. This rule warns when Flexible is used outside a Flex widget, such as Row, Column, or Flex, helping keep widget tree layouts working correctly. Read more: dcm.dev/docs/rules/f...
Riverpod is one of the most used packages for #Flutter, and yet you might have missing points, including: ⚠️ ref .read inside build 🔄 ref .watch outside build ⏳ async gap + stale ref 🧹 missing onDispose cleanup Read more: dcm.dev/blog/2026/03...
Many teams want better code quality but struggle to know where to start. Techniques such as: 1⃣ preview all metrics first ✅ start with metrics-recommended ✏️ override thresholds for your project 👩💻 choose metrics based on your actual pain points Read more: dcm.dev/docs/guides/...
Complex conditions can impact readability in your #Flutter code. ❌ Instead of: (a && b) || (!a && c) ✅ Prefer: a ? b : c DCM’s "prefer-simpler-boolean-expressions" rule flags redundant #Dart boolean patterns and suggests more readable alternatives. Read more: dcm.dev/docs/rules/c...
Arrange, Act, Assert is the gold standard for unit testing 🧪 Why? It ensures tests are not doing "multiple rounds of arrange and act." DCM 1.32 introduced `prefer-test-structure` to warn when a test is not separated into these three sections. Read more: dcm.dev/docs/rules/c...
DCM reposted
Async mistakes can quietly slow down or break your #Flutter app. This post breaks down common pitfalls and how to fix them: 🔄 Misused `FutureOr` ⚠️ Unawaited futures in `initState()` 🔁 Redundant `async/await` 🚦 Inefficient parallel calls 🧵 Confusing `.then()` chains dcm.dev/blog/2025/05...
In fact, Nicholas, Team Lead at Zühlke, puts it nicely on how DCM is playing a role: “Integrate DCM from the start, before writing a single line of code. It saves enormous effort later.” Read the full case study: dcm.dev/customers/zu...
DCM reposted
#Flutter BLoC is everywhere, but hidden bugs are easy to miss: 💥 isClosed after await 🔁 same-state emits 🧠 create vs .value 🚫 public methods bypass events 🔒 sealed/immutable classes By reading BLoC source code, we see how to happen & prevent them: dcm.dev/blog/2026/03...
#Flutter BLoC is everywhere, but hidden bugs are easy to miss: 💥 isClosed after await 🔁 same-state emits 🧠 create vs .value 🚫 public methods bypass events 🔒 sealed/immutable classes By reading BLoC source code, we see how to happen & prevent them: dcm.dev/blog/2026/03...
Async mistakes can quietly slow down or break your #Flutter app. This post breaks down common pitfalls and how to fix them: 🔄 Misused `FutureOr` ⚠️ Unawaited futures in `initState()` 🔁 Redundant `async/await` 🚦 Inefficient parallel calls 🧵 Confusing `.then()` chains dcm.dev/blog/2025/05...
As Roman said: "We've been using DCM since day zero... we genuinely can't imagine working without it. Any serious project should adopt it.” Read the entire case study: dcm.dev/customers/ca...
Is your #Flutter widget tree full of Padding, Align, ClipRect and Transform widgets? In this video, we show how you can simplify those trees using a single Container widget and how the "prefer-container" rule helps you reduce unnecessary nesting: youtu.be/MdrU_8orso8
If you are using Zed and would like to have your code checked with DCM, check out the getting started docs for the Zed extension: dcm.dev/docs/ide-int...
DCM improved BoursoBank's Flutter runtime safety, catching errors early before production. Applied to 60+ packages, DCM gave developers confidence that sensitive payment and authentication flows are protected. Read the entire case study: dcm.dev/customers/bo...
Ever discovered a Flutter widget and thought, “Why didn’t I see this sooner?” 🤔 We’ve uncovered 10 under-the-radar widgets that even seasoned devs almost never use! 👇 dcm.dev/blog/2025/01... What widget surprised you the most?
Are silent bugs hiding in your #Flutter Provider code? You might be missing: 💥 .value trap 🚫 .dispose gap 👀 .read vs .watch ✋ .selector logic We explored the Provider's source code to uncover common architecture mistakes: dcm.dev/blog/2026/03...
Once you have multiple #Flutter projects, it's often required to manage different DCM versions. Our new guide covers: 🔄 Fast version switching 💻 Helper scripts (Zsh, Bash, Fish, PS) 💙 FVM support 🤝 Team consistency with dcm_global.yaml Read here: dcm.dev/docs/guides/...
🤷♂️ Assigning values that never get used? Enable the "avoid-unused-assignment" rule that warns when an assignment is not used in the following statements. 🎥 Watch to learn more: youtu.be/HajF6gXkAik
We recently published a case study with Betterment where the team adopted DCM into their workflow, which helped them to: - Cut feedback cycles from minutes to seconds - Focus on architecture review rather than styling - Ship faster & safer Full story: dcm.dev/customers/be...
🧠 Ever found a #Dart or #Flutter function that completely changed how you think about coding? We’ve rounded up 10 underrated functions that can simplify code, reduce boilerplate, and teach you something new about the language itself. 📖 dcm.dev/blog/2025/02...
DCM reposted
Dart 3.10's dot shorthands are game changers for #Flutter code: ✅ shorter enums, less boilerplate, and sharper syntax. ⚠️ But beware the hidden complexities! Learn about “Practical Rulebook for Teams” 👇 dcm.dev/blog/2025/11...
🖼️ Wrapping a #Flutter Image widget with an Opacity widget? That’s inefficient. The DCM rule "avoid-incorrect-image-opacity" warns you to use the "opacity" parameter directly instead. 🎥 Watch to learn how to fix it: youtu.be/ooKFXNhm_TU
Dart 3.10's dot shorthands are game changers for #Flutter code: ✅ shorter enums, less boilerplate, and sharper syntax. ⚠️ But beware the hidden complexities! Learn about “Practical Rulebook for Teams” 👇 dcm.dev/blog/2025/11...