Dart Analyze logoDart Analyze/
DRT-W1316

Duplicate shown nameDRT-W1316

Major severityMajor
Bug Risk categoryBug Risk

The analyzer produces this diagnostic when a name occurs multiple times in a show clause. Repeating the name is unnecessary.

Example

The following code produces this diagnostic because the name min is shown more than once:

import 'dart:math' show min, min;

var x = min(2, min(0, 1));

Common fixes

If the name was mistyped in one or more places, then correct the mistyped names:

import 'dart:math' show max, min;

var x = max(2, min(0, 1));

If the name wasn't mistyped, then remove the unnecessary name from the list:

import 'dart:math' show min;

var x = min(2, min(0, 1));