Skip to content

Latest commit

 

History

History
30 lines (19 loc) · 532 Bytes

library_annotations.md

File metadata and controls

30 lines (19 loc) · 532 Bytes

Pattern: Missing use of library directive for annotation

Issue: -

Description

Attach library annotations to library directives, rather than some other library-level element.

Example of incorrect code:

@TestOn('browser')

import 'package:test/test.dart';

void main() {}

Example of correct code:

@TestOn('browser')
library;

import 'package:test/test.dart';

void main() {}

Further Reading