15
6
DO avoid duplicate imports as they can lead to confusion.
import 'dart:math' as math show max; import 'dart:math'; final a = math.max(1, 10); final b = min(1, 10);
import 'dart:math' as math show max, min; final a = math.max(1, 10); final b = math.min(1, 10);
To enable the no_duplicate_imports rule, add no_duplicate_imports under custom_lint > rules in your analysis_options.yaml file:
no_duplicate_imports
analysis_options.yaml
custom_lint: rules: - no_duplicate_imports