Pub CI Dart SDK License: MIT

more_visibility_annotation

Standalone annotations used by the more_visibility lint package.

What’s inside

  • @mprotected: declaration/file usable from the same directory and any subdirectories.
  • @mdefault: declaration/file usable only from the same directory.

Usage

  1. Add dependency:
    dependencies:
      more_visibility_annotation: ^0.1.0
    
  2. Import and annotate:
    import 'package:more_visibility_annotation/more_visibility_annotation.dart';
    
    @mprotected
    class Shared {}
    
    @mdefault
    final local = 0;
    
  3. Enable lints by adding the more_visibility plugin plus custom_lint in your dev dependencies (in your main project).