generator library

Generator APIs that generate data and stories preview.

Incompatibilities with package:flutter

This library contains imports of package:analyzer, which is incompatible with package:flutter, so don't import such library into your package:flutter related code, or it will cause compile errors. And when testing with this library, package:flutter_test and flutter test is also not compatible, that you can only test corresponding code with package:test and the dart test command.

Classes

DartPackage
Utilities about a Dart package.
Generated
An annotation that tells the following contents are auto generated, especially inside the source code.
Generator
A general proposed abstract class for code generating on files.

Mixins

AutoStoriesAnnotation
A type for all annotations here, like a generics.

Extensions

CopyDirectory on Directory
Utilities about copy a directory.
CopyEnsureFile on File
Copy a file and create corresponding folders if necessary.

Constants

generated → const Generated
Annotate that current range is auto generated by package:auto_stories. Such code will be auto-generated once file saved, and it's strongly not recommended to modify it manually.
generatedInstanceName → const String
Static name of the generated instance.

Functions

containsImport(String code, String importIdentifier) bool
Whether a Dart code contains specified import.