dependency_lens 0.1.3 copy "dependency_lens: ^0.1.3" to clipboard
dependency_lens: ^0.1.3 copied to clipboard

Platformweb

Flutter DevTools extension and CLI for visualizing local module dependencies and detecting cycles.

example/dependency_lens_example.dart

// ignore_for_file: avoid_print

import 'package:dependency_lens/dependency_lens.dart';

Future<void> main(List<String> arguments) async {
  final rootPath = arguments.isEmpty ? '.' : arguments.first;
  final report = await DependencyLensScanner.io(
    rootPath: rootPath,
    config: const DependencyLensConfig(
      localPackageRoots: <String>['modules', 'plugins', 'packages'],
      sourceRoots: <String>['lib', 'bin', 'test'],
      dependencySections: <String>['dependencies', 'dev_dependencies'],
    ),
  ).scan();

  if (report.hasCycles) {
    for (final cycle in report.cycles) {
      print('Cycle: ${cycle.packageNames.join(' -> ')}');
    }
  } else {
    print('No dependency cycles found.');
  }

  for (final unused in report.unusedDependencies) {
    print('Unused local dependency: ${unused.from} -> ${unused.to}');
  }
}
0
likes
160
points
36
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Flutter DevTools extension and CLI for visualizing local module dependencies and detecting cycles.

Repository (GitHub)
View/report issues

Topics

#architecture #dependencies #devtools #monorepo #modules

License

MIT (license)

Dependencies

args, dependency_lens_core, devtools_app_shared, devtools_extensions, dtd, flutter, path

More

Packages that depend on dependency_lens