Skip to main content

avoid-duplicate-exports

added in: 1.6.0
🛠

Warns when a file has multiple exports declarations with the same URI.

Example

❌ Bad:

import "package:flutter/material.dart";
import "package:flutter_bloc/flutter_bloc.dart";

export 'package:my_app/good_folder/something.dart';
export 'package:my_app/good_folder/something.dart'; // LINT

✅ Good:

import "package:flutter/material.dart";
import "package:flutter_bloc/flutter_bloc.dart";

export 'package:my_app/good_folder/something.dart';