flutter_design_annotation
Used by the code generator to create catalog to show in the design system viewer.
@Design
@Design@design
class SpecialWidget extends StatelessWidget {
...
}@Design(
// (Optional) Provide a name, if omitted/[null] will default to the class name
name: null,
// (Optional) Provide a description, if omitted/[null] will default to the class
// documentation (i.e the /// docs on the annotated widget).
// The description will be rendered in Markdown.
description: null,
// (Optional) Embed design tools (e.g. Figma) that will be shown in an iFrame
designLink:
'https://www.figma.com/embed?embed_host=share&url=https%3A%2F%2Fwww.figma.com%2Ffile%2Fzi9txHyO7XMo8TYTAv2rku%2FJARVIS%3Fnode-id%3D7188%253A46173',
// (Optional) Specify the initial values to be shown in the viewer. This will take
// priority over the default value in the constructor. Also it will be possible to
// assign initial values for `required` parameters.
viewerInitValueMap: {
'uri':
'https://static.independent.co.uk/2021/06/16/08/newFile-4.jpg?quality=75&width=982&height=726&auto=webp',
},
)
class SpecialWidget extends StatelessWidget {
...
}
Last updated