I'm just starting to learn flutter.
Here is a repo of something I just started - so not a lot to see
https://github.com/sketchbuch/lonewolf
I have one test, and if I run
flutter test
it runs and passes.
If I just right click on the file and run the test (which I see in lots of tutorials) an error occurs and the test doesn't run. Here is the error
/some/path/Apps/Flutter/bin/cache/dart-sdk/bin/dart --enable-asserts --enable-vm-service:46177 /some/path/Android/Projects/lonewolf/test/widgets_para_test.dart
Observatory listening on http://127.0.0.1:46177/
file:///some/path/Apps/Flutter/packages/flutter_test/lib/src/accessibility.dart:8:8: Error: Not found: 'dart:ui'
import 'dart:ui' as ui;
^
file:///some/path/Apps/Flutter/packages/flutter_test/lib/src/binding.dart:8:8: Error: Not found: 'dart:ui'
import 'dart:ui' as ui;
^
file:///some/path/Apps/Flutter/packages/flutter_test/lib/src/matchers.dart:8:8: Error: Not found: 'dart:ui'
import 'dart:ui' as ui;
^
file:///some/path/Apps/Flutter/packages/flutter_test/lib/src/matchers.dart:9:8: Error: Not found: 'dart:ui'
import 'dart:ui';
^
file:///some/path/Apps/Flutter/packages/flutter_test/lib/src/test_pointer.dart:12:1: Error: Not found: 'dart:ui'
export 'dart:ui' show Offset;
^
file:///some/path/Apps/Flutter/packages/flutter/lib/src/material/animated_icons.dart:9:8: Error: Not found: 'dart:ui'
import 'dart:ui' as ui show Paint, Path, Canvas;
^
file:///some/path/Apps/Flutter/packages/flutter/lib/src/material/animated_icons.dart:10:8: Error: Not found: 'dart:ui'
import 'dart:ui' show lerpDouble;
^
file:///some/path/Apps/Flutter/packages/flutter/lib/src/material/arc.dart:6:8: Error: Not found: 'dart:ui'
import 'dart:ui' show lerpDouble;
^
file:///some/path/Apps/Flutter/packages/flutter/lib/src/material/colors.dart:5:8: Error: Not found: 'dart:ui'
import 'dart:ui' show Color;
^
file:///some/path/Apps/Flutter/packages/flutter/lib/src/material/dialog.dart:6:8: Error: Not found: 'dart:ui'
import 'dart:ui';
^
Process finished with exit code 254
Since the test runs via the command line I sure the problem is with how AS is configured. Can anyone tell me what exactly is wrong and how I can run a test just by selecting run in AS? I don't want to always run every test (which I think the commandline would do)
Aucun commentaire:
Enregistrer un commentaire