unused_shown_name
The name {0} is shown, but isn't used.
Description
#The analyzer produces this diagnostic when a show combinator includes a name that isn't used within the library. Because it isn't referenced, the name can be removed.
Example
#The following code produces this diagnostic because the function max
isn't used:
dart
import 'dart:math' show min, max;
var x = min(0, 1);
Common fixes
#Either use the name or remove it:
dart
import 'dart:math' show min;
var x = min(0, 1);
除非另有说明,文档之所提及适用于 Dart 3.7.3 版本,本页面最后更新时间: 2025-05-08。 查看文档源码 或者 报告页面问题。