Skip to content

Using --dart-define when build ios not loaded at first run, only work after hot restart #128304

@thangldvn

Description

@thangldvn

Is there an existing issue for this?

Steps to reproduce

  1. Run app in debug mode
  2. Check environment variables on --dart--define

Actual results

Return empty string when get environment variables using String.fromEnvironment(), this environment only shown after hot restart app,
Currently i am using Flutter 3.7.3
This issue only happen when build app ios, works fine in build app android
Same issue on stackoverflow: https://stackoverflow.com/questions/76349221/flutter-dart-define-not-loading-on-first-build-only-on-hot-restart-for-ios

Logs

Logs
<!-- Paste your logs here -->

Flutter Doctor output

Doctor output
<!-- Paste your output here -->

Metadata

Metadata

Assignees

No one assigned

    Labels

    r: invalidIssue is closed as not valid

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions