Built-in types and core primitives for a Flutter application.
To use, import dart:ui
.
This library exposes the lowest-level services that Flutter frameworks use to bootstrap applications, such as classes for driving the input, graphics text, layout, and rendering subsystems.
Typedefs
-
FrameCallback(
Duration duration) → void -
Signature for Window.onBeginFrame.
-
ImageDecoderCallback(
Image result) → void -
Callback signature for decodeImageFromList.
-
PlatformMessageCallback(
String name, ByteData data, PlatformMessageResponseCallback callback) → void -
Signature for Window.onPlatformMessage.
-
PlatformMessageResponseCallback(
ByteData data) → void -
Signature for responses to platform messages.
-
PointerDataPacketCallback(
PointerDataPacket packet) → void -
Signature for Window.onPointerDataPacket.
-
SemanticsActionCallback(
int id, SemanticsAction action) → void -
Signature for Window.onSemanticsAction.
-
VoidCallback(
) → void -
Signature of callbacks that have no arguments and return no data.
Properties
Functions
-
decodeImageFromList(
Uint8List list, ImageDecoderCallback callback) → void -
Convert an image file from a byte array into an Image object.
-
hashList(
Iterable<Object> args) → int -
Combine the hashCodes of an arbitrary number of values from an Iterable into one value. This function will return the same value if given "null" as if given an empty list.
-
hashValues(
Object arg01, Object arg02, [ Object arg03 = _hashEnd, Object arg04 = _hashEnd, Object arg05 = _hashEnd, Object arg06 = _hashEnd, Object arg07 = _hashEnd, Object arg08 = _hashEnd, Object arg09 = _hashEnd, Object arg10 = _hashEnd, Object arg11 = _hashEnd, Object arg12 = _hashEnd, Object arg13 = _hashEnd, Object arg14 = _hashEnd, Object arg15 = _hashEnd, Object arg16 = _hashEnd, Object arg17 = _hashEnd, Object arg18 = _hashEnd, Object arg19 = _hashEnd, Object arg20 = _hashEnd ]) → int -
Combine up to twenty values' hashCodes into one value.
-
lerpDouble(
num a, num b, double t) → double -
Linearly interpolate between two numbers.
Enums
- AppLifecycleState
-
States that an application can be in.
- BlurStyle
-
Styles to use for blurs in MaskFilter objects.
- FilterQuality
-
Quality levels for image filters.
- FontStyle
-
Whether to slant the glyphs in the font
- PaintingStyle
-
Strategies for painting shapes and paths on a canvas.
- PathFillType
-
Determines how the interior of a Path is calculated.
- PointerChange
-
How the pointer has changed since the last report.
- PointerDeviceKind
-
The kind of pointer device.
- PointMode
-
Defines how a list of points is interpreted when drawing a set of points.
- StrokeCap
-
Styles to use for line endings.
- TextAffinity
-
Whether a TextPosition is visually upstream or downstream of its offset.
- TextAlign
-
Whether to align text horizontally
- TextBaseline
-
A horizontal line used for aligning text
- TextDecorationStyle
-
The style in which to draw a text decoration
- TextDirection
-
A direction in which text flows.
- TileMode
-
Defines what happens at the edge of the gradient.
- TransferMode
-
Algorithms to use when painting on the canvas.
- VertexMode
-
Defines how a list of points is interpreted when drawing a set of triangles.
Classes
- Canvas
-
An interface for recording graphical operations.
- Color
-
An immutable 32 bit color value in ARGB
- ColorFilter
-
A description of a color filter to apply when drawing a shape or compositing a layer with a particular Paint. A color filter is a function that takes two colors, and outputs one color. When applied during compositing, it is independently applied to each pixel of the layer being drawn before the entire layer is merged with the destination.
- FontWeight
-
The thickness of the glyphs used to draw the text
- Gradient
-
A shader (as used by Paint.shader) that renders a color gradient.
- Image
-
Opaque handle to raw decoded image data (pixels).
- ImageFilter
-
A filter operation to apply to a raster image.
- ImageShader
-
A shader (as used by Paint.shader) that tiles an image.
- Locale
-
An identifier used to select a user's language and formatting preferences, consisting of a language and a country. This is a subset of locale identifiers as defined by BCP 47.
- MaskFilter
-
A mask filter to apply to shapes as they are painted. A mask filter is a function that takes a bitmap of color pixels, and returns another bitmap of color pixels.
- Offset
-
An immutable 2D floating-point offset.
- OffsetBase
-
Base class for Size and Offset, which are both ways to describe a distance as a two-dimensional axis-aligned vector.
- Paint
-
A description of the style to use when drawing on a Canvas.
- Paragraph
-
A paragraph of text.
- ParagraphBuilder
-
Builds a Paragraph containing text with the given styling information.
- ParagraphConstraints
-
Layout constraints for Paragraph objects.
- ParagraphStyle
-
An opaque object that determines the position of lines within a paragraph of text.
- Path
-
A complex, one-dimensional subset of a plane.
- Picture
-
An object representing a sequence of recorded graphical operations.
- PictureRecorder
-
Records a Picture containing a sequence of graphical operations.
- Point
-
An immutable 2D floating-point x,y coordinate pair.
- PointerData
-
Information about the state of a pointer.
- PointerDataPacket
-
A sequence of reports about the state of pointers.
- Radius
-
A radius for either circular or elliptical shapes.
- Rect
-
An immutable 2D, axis-aligned, floating-point rectangle whose coordinates are relative to an origin point.
- RRect
-
A rounded rectangle with the custom radii for all four corners.
- RSTransform
-
A transform consisting of a translation, a rotation, and a uniform scale.
- Scene
-
An opaque object representing a composited scene.
- SceneBuilder
-
Builds a Scene containing the given visuals.
- SemanticsAction
-
The possible actions that can be conveyed from the operating system accessibility APIs to a semantics node.
- SemanticsFlags
-
A Boolean value that can be associated with a semantics node.
- SemanticsUpdate
-
An opaque object representing a batch of semantics updates.
- SemanticsUpdateBuilder
-
An object that creates SemanticsUpdate objects.
- Shader
-
Base class for objects such as Gradient and ImageShader which correspond to shaders as used by Paint.shader.
- Size
-
Holds a 2D floating-point size.
- TextBox
-
A rectangle enclosing a run of text.
- TextDecoration
-
A linear decoration to draw near the text
- TextPosition
-
A visual position in a string of text.
- TextStyle
-
An opaque object that determines the size, position, and rendering of text.
- Window
-
The most basic interface to the host operating system's user interface.
- WindowPadding
-
A representation of distances for each of the four edges of a rectangle, used to encode the padding that applications should place around their user interface, as exposed by Window.padding.