-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work listtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.
Milestone
Description
The Dart plugin registrant is generated once the app is initially compiled.
There's a case where a user may start a flutter run session, then change the pubspec.yaml in the middle, and then hot restart the app.
With the changes from #74469, these steps will yield into an error.
In the case the plugins were removed from pubpsec.yaml:
Error: Could not resolve the package 'url_launcher_linux' in 'package:url_launcher_linux/url_launcher_linux.dart'.
Error: Could not resolve the package 'url_launcher_macos' in 'package:url_launcher_macos/url_launcher_macos.dart'.
.dart_tool/flutter_build/generated_main.dart:9:8: Error: Not found: 'package:url_launcher_linux/url_launcher_linux.dart'
import 'package:url_launcher_linux/url_launcher_linux.dart';
^
.dart_tool/flutter_build/generated_main.dart:10:8: Error: Not found: 'package:url_launcher_macos/url_launcher_macos.dart'
import 'package:url_launcher_macos/url_launcher_macos.dart';
^
.dart_tool/flutter_build/generated_main.dart:15:7: Error: Getter not found: 'UrlLauncherPlugin'.
UrlLauncherPlugin.registerWith();
^^^^^^^^^^^^^^^^^
.dart_tool/flutter_build/generated_main.dart:17:7: Error: Getter not found: 'UrlLauncherPlugin'.
UrlLauncherPlugin.registerWith();
^^^^^^^^^^^^^^^^^
Performing hot restart... ⣾Error: Could not resolve the package 'url_launcher_linux' in 'package:url_launcher_linux/url_launcher_linux.dart'.
Error: Could not resolve the package 'url_launcher_macos' in 'package:url_launcher_macos/url_launcher_macos.dart'.
.dart_tool/flutter_build/generated_main.dart:9:8: Error: Not found: 'package:url_launcher_linux/url_launcher_linux.dart'
import 'package:url_launcher_linux/url_launcher_linux.dart';
^
.dart_tool/flutter_build/generated_main.dart:10:8: Error: Not found: 'package:url_launcher_macos/url_launcher_macos.dart'
import 'package:url_launcher_macos/url_launcher_macos.dart';
^
.dart_tool/flutter_build/generated_main.dart:15:7: Error: Getter not found: 'UrlLauncherPlugin'.
UrlLauncherPlugin.registerWith();
^^^^^^^^^^^^^^^^^
.dart_tool/flutter_build/generated_main.dart:17:7: Error: Getter not found: 'UrlLauncherPlugin'.
UrlLauncherPlugin.registerWith();
Metadata
Metadata
Assignees
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work listtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.