no_duplicate_imports

SeverityQuick FixOptions
Info

Details

DO avoid duplicate imports as they can lead to confusion.

Bad
import 'dart:math' as math show max;
import 'dart:math';

final a = math.max(1, 10);
final b = min(1, 10);
Good
import 'dart:math' as math show max, min;

final a = math.max(1, 10);
final b = math.min(1, 10);

Usage

To enable the no_duplicate_imports rule, add no_duplicate_imports under custom_lint > rules in your analysis_options.yaml file:

custom_lint:
  rules:
    - no_duplicate_imports