design_widgets library
Widgets that draw design layers (DesignRectangle, DesignText); rendering.dart exposes their render objects.
Classes
- Appearance
- How a layer looks as a whole: a ShapeAppearance or a TextAppearance.
- AutoHeight
- A fixed width, and a height that fits the wrapped lines.
- AutoLineHeight
- The font's own line height.
- AutoWidth
- The box fits the text.
- CornerRadius
- One value for every corner, or a value per corner.
- DesignFonts
-
The fonts DesignText draws, known by the names inside their files; call load once before
runApp. - DesignRectangle
- A rectangle with layered fill, stroke and effects.
- DesignText
- A text with layered fill, stroke and effects, in a box that follows its letters as layout says. Its font must be loaded by DesignFonts.load first; its size ignores the system text scale.
- DropShadow
- Cast outside the shape, behind it.
- Effect
- Something a layer's effects list holds: a ShadowEffect, or a LayerBlur of the whole layer.
- Fill
- One paint layer of a fill or a stroke; in a list, the first is topmost.
- FixedSize
- A fixed width and height.
- FontFile
- What a font file says about one of its faces: its names and the measures a text layout needs.
- FontName
-
A font by the family and style names inside its file, such as
InterandBlack; an app can list its fonts as an enum implementing this. - GradientFill
- A linear or radial gradient.
- GradientHandle
-
A fraction of the box:
(0, 0)is top-left,(1, 1)bottom-right. - GradientStop
- A color stop: where along the gradient it sits, in percent, and its color.
- HexColor
- A 6-digit hex value plus an opacity percentage.
- InnerShadow
- Cast inside the shape, over its fill; the stroke paints over it.
- LayerBlur
- The whole layer blurred, its fill, stroke and shadows together: a UniformBlur, alike everywhere, or a ProgressiveBlur, changing from one handle to the other.
- Layout
- How much room a layer takes: a ShapeLayout or a TextLayout.
- LetterSpacing
- The space added between letters: after each but a line's last, so a line's width and alignment are its letters'.
- LinearGradientFill
- Stops run from begin to end; top-center to bottom-center by default.
- LineHeight
- The distance from one baseline to the next.
- LoadedFont
- A font DesignFonts can draw: its file's measures and how Flutter picks it.
- PercentLetterSpacing
- A letter spacing as a percent of the font size.
- PercentLineHeight
- A line height as a percent of the font size.
- PixelLetterSpacing
- A letter spacing in logical pixels.
- PixelLineHeight
- A line height in logical pixels.
- Position
- An offset in logical pixels, as the X and Y fields of an effect.
- ProgressiveBlur
- A blur that changes along a line, as a linear gradient's color does: startBlur at start, endBlur at end, in proportion between them, and past either handle that handle's.
- RadialGradientFill
- Stops run outward from center to the ellipse through end and width.
- ShadowEffect
- A shadow cast by a layer: a shape's ShapeShadow or a text's TextShadow.
- ShapeAppearance
- How a shape looks: its opacity, its corners and how it mixes with what's below it.
- ShapeEffect
- An effect of a shape: a DropShadow, an InnerShadow or a LayerBlur.
- ShapeLayout
- How much room a shape takes.
- ShapeShadow
- A shadow cast by a shape: a DropShadow or an InnerShadow.
- SolidFill
- A single flat color.
- Stroke
- A band painted along a shape's edge; weight and align apply to every layer of fill.
- TextAppearance
- How a text looks as a whole: its opacity.
- TextDropShadow
- Cast outside the letters and their stroke, behind them.
- TextEffect
- An effect of a text: a TextDropShadow, a TextInnerShadow or a LayerBlur.
- TextInnerShadow
- Cast inside the letters, over their fill; the stroke paints over it.
- TextLayout
- Which sides of the text's box follow the text, and the sizes of those that don't.
- TextShadow
- A shadow cast by text: a TextDropShadow or a TextInnerShadow. Text has no spread.
- UniformBlur
- The whole layer blurred alike.
Enums
- HorizontalTextAlign
- Where each line sits across the box.
- LayerBlendMode
- How a layer's colors mix with what is already drawn below it.
- StrokeAlign
- Where the stroke band sits relative to the shape's edge.
- VerticalTextAlign
- Where the lines sit in a box of fixed size.
- VerticalTrim
- How far the box reaches above the first line and below the last.
Functions
Typedefs
- FontFileBytes = ByteData Function(int offset, int length)
-
Reads
lengthbytes of a font file fromoffset.