The named parameter is required, but there's no corresponding argument Flutter / Dart Origin: On your device Last updated 4 Nov 2026

Dart: The named parameter 'key' is required, but there's no corresponding argument

A constructor or function marked required for a parameter was called without it.

Exact message you may see The named parameter is required, but there's no corresponding argumentThe named parameter 'title' is required, but there's no corresponding argumentRequired named parameter 'x' must be providedToo few positional arguments
Seen on: Flutter

Meaning

Pass the argument, or give the parameter a default value or make it nullable. After null-safety migration many old widgets need required params. For Key? key the usual signature is const MyWidget({super.key}).

Common causes

  • Missing required argument at the call site
  • Parameter declared required but never needed
  • Constructor changed in a package upgrade
  • Widget used without its mandatory data
  • Wrong named parameter name

⚡ Quick fix

  1. Supply the named argument
  2. Make it optional with this.value = defaultValue or nullable this.value
  3. Update call sites after package upgrades

Detailed fix by platform

Dart

  1. MyCard(title: 'Hello') where the constructor is const MyCard({super.key, required this.title});

How to diagnose

  1. Parameter — Name in the message?
  2. Call site — Passing it?
  3. Default — Possible?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: On your device. Errors that are often confused with or caused by this one (click to open):

Bad state: No element — Dart: Bad state: No element — .first, .last or .single on an empty list (Flutter / Dart)Bad state: No elementLateInitializationError: Field has not been initialized — Dart: LateInitializationError: Field 'controller' has not been initialized (Flutter / Dart)LateInitializationErr…Non-nullable instance field must be initialized — Dart: Non-nullable instance field 'name' must be initialized. Try adding an initializer expression, or a generative constructor that initializes it, or mark it 'late' (Flutter / Dart)Non-nullable instance…The argument type can't be assigned to the parameter type — Dart: The argument type 'String?' can't be assigned to the parameter type 'String' (Flutter / Dart)The argument type can…The getter/method isn't defined for the type — Dart: The getter 'name' isn't defined for the type 'User' / The method 'foo' isn't defined for the class (Flutter / Dart)The getter/method isn…The property/method can't be unconditionally accessed because the receiver can be null — Dart: The property 'length' can't be unconditionally accessed because the receiver can be 'null' (Flutter / Dart)The property/method c…type 'Null' is not a subtype of type 'String' — Dart: type 'Null' is not a subtype of type 'String' in type cast (Flutter / Dart)type 'Null' is not a …The named…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.