Skip to content

material_ui 1.3.0 & cupertino_ui 1.1.0 on Flutter 3.44 Error: Undefined name 'awaitNotRequired'. #192839

Closed
flutter/packages
#12944

Description

@simonpham

The issue happens when I'm using Flutter 3.44.9 (or maybe any Flutter version <3.47).

material_ui 1.3.0 changelog have this:

Adds @awaitNotRequired annotations to asynchronous functions that do not need to be awaited.

But that @awaitNotRequired is added since Flutter 3.47.0:

Add @awaitNotRequired annotation to flutter sdk by @victorsanni in 181513

https://docs.flutter.dev/release/release-notes/release-notes-3.47.0

However, material_ui 1.3.0 doesn't bump Flutter requirements

https://github.com/flutter/packages/blob/a9630c6e9fdc30b77411a9c18eb99400e33c7b75/packages/material_ui/pubspec.yaml#L9

I expect to have something like this in the changelog of material_ui 1.3.0:
Updates minimum supported SDK version to Flutter 3.47

cupertino_ui 1.1.0 has the very same issue.

Adds awaitNotRequired annotation to showCupertinoModalPopup and showCupertinoDialog.

PS: The issue template for 1st-party packages issue don't have material_ui or cupertino_ui so I use a blank template.

Activity

  1. changed the title [-]material_ui 1.3.0 & cupertino_ui 1.1.0 Error: Undefined name 'awaitNotRequired'.[/-] [+]material_ui 1.3.0 & cupertino_ui 1.1.0 on Flutter 3.44 Error: Undefined name 'awaitNotRequired'.[/+] on Sep 16, 2026
  2. saurabh-mirajkar commented on Sep 16, 2026

    @saurabh-mirajkar
    Contributor

    @simonpham Thanks for the report. Could you please provide a minimal reproducible sample that produces the error, along with flutter doctor -v from that project? Thanks!

  3. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    needs repro infoAutomated crash report whose cause isn't yet known
    and removed
    in triagePresently being triaged by the triage team
    on Sep 16, 2026
  4. simonpham commented on Sep 16, 2026

    @simonpham
    ContributorAuthor

    @simonpham Thanks for the report. Could you please provide a minimal reproducible sample that produces the error, along with flutter doctor -v from that project? Thanks!

    you can just clone material_ui example and run it with Flutter 3.44.9

  5. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Sep 16, 2026
  6. saurabh-mirajkar commented on Sep 16, 2026

    @saurabh-mirajkar
    Contributor

    @simonpham Thanks for the clarification. I was able to reproduce the issue using the material_ui 1.3.0 example on Flutter 3.44.9, where the build fails with Undefined name 'awaitNotRequired'. The same example builds successfully on Flutter 3.47.4.

    The package declares Flutter >=3.44.0, so this is actionable as a package compatibility issue. Routing to the team for further evaluation.

  7. added
    p: material_uimaterial_ui package in flutter/packages
    p: cupertino_uicupertino_ui package in flutter/packages
    packageflutter/packages repository. See also p: labels.
    team-designOwned by Design Languages team
    and removed
    needs repro infoAutomated crash report whose cause isn't yet known
    on Sep 16, 2026
  8. wafir645fcqs12 commented on Sep 16, 2026

    @wafir645fcqs12
  9. WieFel commented on Sep 17, 2026

    @WieFel

    I have the same issue.
    I have an app running Flutter 3.44.2, and when I install a package which introduces material_ui as transitive dependency (e.g. https://pub.dev/packages/shimmer version 4.0.0, using flutter pub add <package>), I get the same error mentioned above:

    Error: Undefined name 'awaitNotRequired'.
    

    I would expect that, when running flutter pub add <package> and installing any package, Flutter should be able to detect the last compatible package version, which doesn't use material_ui yet. But that is not the case right now.

  10. github-actions commented on Oct 5, 2026

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  11. locked as resolved and limited conversation to collaborators on Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    p: cupertino_uicupertino_ui package in flutter/packagesp: material_uimaterial_ui package in flutter/packagespackageflutter/packages repository. See also p: labels.team-designOwned by Design Languages team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions