JsonLibraryBuilder class
Builder for the .json file which contains the necessary information to generate code for Widgetbook. The information is saved as a .json file to be consumed by the WidgetbookGenerator
Constructors
- JsonLibraryBuilder(Generator generator, {required String formatOutput(String), required String generatedExtension})
- Create a new instance of a JsonLibraryBuilder based on the generator.
Properties
-
buildExtensions
→ Map<
String, List< String> > -
Mapping from input file extension to output file extensions.
no setter
- formatOutput → String Function(String)
-
A function that creates valid .json files from the information provided
by the generator.
final
- generatedExtension → String
-
The extension of the file.
Must end on .json but might contain additional 'domains'
for instance: .story.json
final
- generator → Generator
-
The generator resolving the specific annotation and returning the
information written to the .json file.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
build(
BuildStep buildStep) → Future -
Generates the outputs for a given
BuildStep
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited