Skip to content

Intellij idea, macos, flutter hot reload does not work if tried to made in a file with new ? null operator in list #8336

@krll-kov

Description

@krll-kov

Steps to reproduce:

  • create app
  • replace main.dart file with these lines
void main() {
  print(123);
}
  • press Command + S to hot reload - it works
  • now replace that code with
void main() {
  print(123);

  String? a;
  String? b;
  final List<String> strings = [?a, ?b];
  print(strings);
}
  • press Command + S to hot reload - it does not work with an error
Image

And Dart analysis does not show any errors inside file

Image

flutter doctor -v

[✓] Flutter (Channel stable, 3.32.4, on macOS 15.5 24F74 darwin-arm64, locale en-US) [583ms]
    • Flutter version 3.32.4 on channel stable at /Users/swiftsoft/development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 6fba2447e9 (4 weeks ago), 2025-06-12 19:03:56 -0700
    • Engine revision 8cd19e509d
    • Dart version 3.8.1
    • DevTools version 2.45.1

[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0) [1,970ms]
    • Android SDK at /Users/swiftsoft/Library/Android/sdk
    • Platform android-35, build-tools 35.0.0
    • Java binary at: /opt/homebrew/opt/openjdk@17/bin/java
      This JDK was found in the system PATH.
      To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment Homebrew (build 17.0.14+0)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 16.3) [913ms]
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 16E140
    • CocoaPods version 1.16.2

[✓] Chrome - develop for the web [74ms]
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[!] Android Studio (not installed) [73ms]
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/to/macos-android-setup for detailed instructions).

[✓] IntelliJ IDEA Ultimate Edition (version 2024.3.5) [73ms]
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • Flutter plugin version 86.0.1
    • Dart plugin version 243.26753.1

[✓] Connected device (2 available) [5.8s]
    • macOS (desktop) • macos  • darwin-arm64   • macOS 15.5 24F74 darwin-arm64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 138.0.7204.101
    ! Error: Browsing on the local area network for Kyrylo’s iPhone. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code -27)

[✓] Network resources [599ms]
    • All expected network resources are available.

I tried to restart mac, restarted intellij idea, tried to click "Restart Dart Analysis Server", tried to run flutter analyze - nothing helps within a week

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions