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:
import 'dart:math' show min, max;
var x = min(0, 1);
Common fixes
#Either use the name or remove it:
import 'dart:math' show min;
var x = min(0, 1);
Unless stated otherwise, the documentation on this site reflects Dart 3.9.2. Page last updated on 2025-9-1. View source or report an issue.