0PricingLogin
Dart Academy · Lesson

Static Extension Members and Conflicts

Resolve clashes and add static helpers.

Two Helpers, Same Name

Import two extensions that both add a method called parse to String, and Dart no longer knows which one you meant.

Why Conflicts Happen

Extension members are not on the type itself, so two same-named methods are an ambiguity the compiler refuses to guess about.

All lessons in this course

  1. Writing Your First Extension
  2. Extensions on Generics
  3. Static Extension Members and Conflicts
  4. Extension Types for Zero-Cost Wrappers
← Back to Dart Academy