# dart:ui library

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.

## Classes

AccessibilityFeatures
  Additional accessibility features that may be enabled by the platform. [...]
CallbackHandle
  A wrapper for a raw callback handle. [...]
Canvas
  An interface for recording graphical operations. [...]
Codec
  A handle to an image codec. [...]
Color
  An immutable 32 bit color value in ARGB format. [...]
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. [...]
EngineLayer
  A handle for the framework to hold and retain an engine layer across frames.
FontWeight
  The thickness of the glyphs used to draw the text
FrameInfo
  Information for a single frame of an animation. [...]
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.
IsolateNameServer
  Static methods to allow for simple sharing of SendPorts across Isolates. [...]
Locale
  An identifier used to select a user's language and formatting preferences. [...]
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 configuration used by ParagraphBuilder to position lines within a Paragraph of text.
Path
  A complex, one-dimensional subset of a plane. [...]
PathMetric
  Utilities for measuring a Path and extracting sub-paths. [...]
PathMetricIterator
  Tracks iteration from one segment of a path to the next for measurement.
PathMetrics
  An iterable collection of PathMetric objects describing a Path. [...]
Picture
  An object representing a sequence of recorded graphical operations. [...]
PictureRecorder
  Records a Picture containing a sequence of graphical operations. [...]
PluginUtilities
  Functionality for Flutter plugin authors. [...]
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 a given origin. [...]
RRect
  An immutable 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. [...]
SceneHost
  (Fuchsia-only) Hosts content provided by another application.
SemanticsAction
  The possible actions that can be conveyed from the operating system accessibility APIs to a semantics node.
SemanticsFlag
  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.
Shadow
  A single shadow. [...]
Size
  Holds a 2D floating-point size. [...]
StrutStyle
  See also: [...]
Tangent
  The geometric description of a tangent: the angle at a point. [...]
TextBox
  A rectangle enclosing a run of text. [...]
TextDecoration
  A linear decoration to draw near the text.
TextPosition
  A position in a string of text. [...]
TextStyle
  An opaque object that determines the size, position, and rendering of text. [...]
Vertices
  A set of vertex data used by Canvas.drawVertices.
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 view insets and padding that applications should place around their user interface, as exposed by Window.viewInsets and Window.padding. View insets and padding are preferably read via `MediaQuery.of`. [...]

## Properties

window → Window
  The Window singleton. This object exposes the size of the display, the core scheduler API, the input event callback, the graphics drawing API, and other such core services.
  final

## Functions

decodeImageFromList(Uint8List list, ImageDecoderCallback callback) → void
  Loads a single image frame from a byte array into an Image object. [...]
decodeImageFromPixels(Uint8List pixels, int width, int height, PixelFormat format, ImageDecoderCallback callback, { int rowBytes, double decodedCacheRatioCap: double.infinity }) → void
  Convert an array of pixel values into an Image object. [...]
hashList(Iterable<Object> arguments) → int
  Combine the Object.hashCode values of an arbitrary number of objects 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 objects' hash codes into one value. [...]
instantiateImageCodec(Uint8List list, { double decodedCacheRatioCap: double.infinity }) → Future<Codec>
  Instantiates an image codec Codec object. [...]
lerpDouble(num a, num b, double t) → double
  Linearly interpolate between two numbers.
loadFontFromList(Uint8List list, { String fontFamily }) → Future<void>
  Loads a font from a buffer and makes it available for rendering text. [...]
saveCompilationTrace() → List<int>
  Returns runtime Dart compilation trace as a UTF-8 encoded memory buffer. [...]

## Enums

AppLifecycleState
  States that an application can be in. [...]
BlendMode
  Algorithms to use when painting on the canvas. [...]
BlurStyle
  Styles to use for blurs in MaskFilter objects.
BoxHeightStyle
  Defines various ways to vertically bound the boxes returned by Paragraph.getBoxesForRange.
BoxWidthStyle
  Defines various ways to horizontally bound the boxes returned by Paragraph.getBoxesForRange.
Brightness
  Describes the contrast of a theme or color palette.
Clip
  Different ways to clip a widget's content.
ClipOp
  Defines how a new clip region should be merged with the existing clip region. [...]
FilterQuality
  Quality levels for image filters. [...]
FontStyle
  Whether to slant the glyphs in the font
ImageByteFormat
  The format in which image bytes should be returned when using Image.toByteData.
PaintingStyle
  Strategies for painting shapes and paths on a canvas. [...]
PathFillType
  Determines the winding rule that decides how the interior of a Path is calculated. [...]
PathOperation
  Strategies for combining paths. [...]
PixelFormat
  The format of pixel data given to decodeImageFromPixels.
PointerChange
  How the pointer has changed since the last report.
PointerDeviceKind
  The kind of pointer device.
PointerSignalKind
  The kind of `PointerDeviceKind.signal`.
PointMode
  Defines how a list of points is interpreted when drawing a set of points. [...]
StrokeCap
  Styles to use for line endings. [...]
StrokeJoin
  Styles to use for line segment joins. [...]
TextAffinity
  A way to disambiguate a TextPosition when its offset could match two different locations in the rendered string. [...]
TextAlign
  Whether and how 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. [...]
VertexMode
  Defines how a list of points is interpreted when drawing a set of triangles. [...]

## 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, ByteData args) → void
  Signature for Window.onSemanticsAction.
VoidCallback() → void
  Signature of callbacks that have no arguments and return no data.