Skip to content

Poor warnings when adding a Flutter plugin to a Dart app #47470

Open
@mit-mit

Description

@mit-mit

Repro steps:

  1. dart create repro
  2. add url_launcher:underdependencies:`
  3. dart pub get

=> No warning. Should we be saying something like Warning: Package url_launcher requires the Flutter SDK?

  1. Edit bin/repro.dart to contain:
import 'package:url_launcher/url_launcher.dart';

void main(List<String> arguments) {
  launch('https://drt.dev');
}
  1. dart analyze

=> No warning. Should we be saying something like "Error: package:url_launcher requires the Flutter SDK"?

  1. dart run

=> A huge amount of error output like:

: Error: Not found: 'dart:ui'
../…/foundation/basic_types.dart:9
export 'dart:ui' show VoidCallback;
^
: Error: Not found: 'dart:ui'
../…/foundation/binding.dart:8
import 'dart:ui' as ui show SingletonFlutterWindow, Brightness, PlatformDispatcher, window;
       ^
: Error: Not found: 'dart:ui'
../…/foundation/debug.dart:5
import 'dart:ui' as ui show Brightness;

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-dart-cliUse area-dart-cli for issues related to the 'dart' command like tool.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions