我正在尝试在 app_test.dart 文件中获取设备 ID。但我收到以下错误。在执行以下命令时:flutter drive --target=test_driver/app.dart。
请在下面找到错误详细信息:
I/flutter (20622): Observatory listening on http://127.0.0.1:43149/9iUskIArAjk=/
../../../FlutterSDK/flutter/packages/flutter/lib/src/semantics/semantics.dart:2121:39: Warning: Operand of null-aware operation '!' has type 'List<SemanticsNode>' which excludes null.
- 'List' is from 'dart:core'.
- 'SemanticsNode' is from 'package:flutter/src/semantics/semantics.dart' ('../../../FlutterSDK/flutter/packages/flutter/lib/src/semantics/semantics.dart').
for (int position = 0; position < childrenInDefaultOrder!.length; position += 1) {
^
lib/utility/colors.dart:1:8: Error: Not found: 'dart:ui'
import 'dart:ui';
^
../../../FlutterSDK/flutter/packages/flutter/lib/src/widgets/app.dart:33:1: Error: Not found: 'dart:ui'
export 'dart:ui' show Locale;
^
../../../FlutterSDK/flutter/packages/flutter/lib/src/widgets/basic.dart:7:8: Error: Not found: 'dart:ui'
import 'dart:ui' as ui show Image, ImageFilter, TextHeightBehavior;
^
../../../FlutterSDK/flutter/packages/flutter/lib/src/widgets/binding.dart:9:8: Error: Not found: 'dart:ui'
import 'dart:ui' show AppLifecycleState, Locale, AccessibilityFeatures, FrameTiming, TimingsCallback;
^
../../../FlutterSDK/flutter/packages/flutter/lib/src/widgets/binding.dart:24:1: Error: Not found: 'dart:ui'
export 'dart:ui' show AppLifecycleState, Locale;
^
../../../FlutterSDK/flutter/packages/flutter/lib/src/widgets/bottom_navigation_bar_item.dart:7:8: Error: Not found: 'dart:ui'
import 'dart:ui' show Color;
^
../../../FlutterSDK/flutter/packages/flutter/lib/src/widgets/color_filter.dart:7:8: Error: Not found: 'dart:ui'
import 'dart:ui';
^
../../../FlutterSDK/flutter/packages/flutter/lib/src/widgets/editable_text.dart:9:8: Error: Not found: 'dart:ui'
import 'dart:ui' as ui hide TextStyle;
^
../../../FlutterSDK/flutter/packages/flutter/lib/src/widgets/focus_manager.dart:8:8: Error: Not found: 'dart:ui'
import 'dart:ui';
^
../../../FlutterSDK/flutter/packages/flutter/lib/src/widgets/focus_traversal.dart:7:8: Error: Not found: 'dart:ui'
import 'dart:ui';
^
Stopping application instance.
Driver tests failed: 254