undefined_shown_name
The library '{0}' doesn't export a member with the shown name '{1}'.
Description
#The analyzer produces this diagnostic when a show combinator includes a name that isn't defined by the library being imported.
Example
#The following code produces this diagnostic because dart:math
doesn't
define the name String
:
dart
import 'dart:math' show min, String;
var x = min(0, 1);
Common fixes
#If a different name should be shown, then correct the name. Otherwise, remove the name from the list:
dart
import 'dart:math' show min;
var x = min(0, 1);
除非另有说明,文档之所提及适用于 Dart 3.7.3 版本,本页面最后更新时间: 2025-05-08。 查看文档源码 或者 报告页面问题。