duplicate_ hidden_ name
Duplicate hidden name.
Description
#
The analyzer produces this diagnostic when a name occurs multiple times in
a
hide
clause. Repeating the name is unnecessary.
Example
#
The following code produces this diagnostic because the name
min
is
hidden more than once:
import 'dart:math' hide min, min;
var x = pi;
Common fixes
#If the name was mistyped in one or more places, then correct the mistyped names:
import 'dart:math' hide max, min;
var x = pi;
If the name wasn't mistyped, then remove the unnecessary name from the list:
import 'dart:math' hide min;
var x = pi;
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.