Platform services exposed to Flutter apps.

To use, import package:flutter/services.dart.

This library depends only on core Dart libraries and the foundation library.

Typedefs

ImageListener(ImageInfo image, bool synchronousCall) → void

Signature for callbacks reporting that an image is available.

Properties

imageCache ImageCache

The singleton that implements the Flutter framework's image cache.

final
rootBundle AssetBundle

The AssetBundle from which this application was loaded.

final

Functions

decodeImageFromList(Uint8List list) Future<Image>

Creates an image from a list of bytes.

Enums

DeviceOrientation

Specifies a particular device orientation.

SystemSoundType

A sound provided by the system.

SystemUiOverlay

Specifies a system overlay at a particular location.

SystemUiOverlayStyle

Specifies a preference for the style of the system overlays.

TextAffinity

Whether a TextPosition is visually upstream or downstream of its offset.

TextInputAction

A action the user has requested the text input control to perform.

TextInputType

For which type of information to optimize the text input control.

Classes

ApplicationSwitcherDescription

Specifies a description of the application that is pertinent to the embedder's application switcher (also known as "recent tasks") user interface.

AssetBundle

A collection of resources used by the application.

AssetBundleImageKey

Key for the image obtained by an AssetImage or ExactAssetImage.

AssetBundleImageProvider

A subclass of ImageProvider that knows about AssetBundles.

AssetImage

Fetches an image from an AssetBundle, having determined the exact image to use based on the context.

BinaryCodec

MessageCodec with unencoded binary messages represented using ByteData.

CachingAssetBundle

An AssetBundle that permanently caches string and structured resources that have been fetched.

Clipboard

Utility methods for interacting with the system's clipboard.

ClipboardData

Data stored on the system clipboard.

ExactAssetImage

Fetches an image from an AssetBundle, associating it with the given scale.

FileImage

Decodes the given File object as an image, associating it with the given scale.

HapticFeedback

Allows access to the haptic feedback interface on the device.

ImageCache

Class for the imageCache object.

ImageConfiguration

Configuration information passed to the ImageProvider.resolve method to select a specific image.

ImageInfo

A ui.Image object with its corresponding scale.

ImageProvider

Identifies an image without committing to the precise final asset. This allows a set of images to be identified and for the precise image to later be resolved based on the environment, e.g. the device pixel ratio.

ImageStream

A handle to an image resource.

ImageStreamCompleter

Base class for those that manage the loading of ui.Image objects for ImageStreams.

JSONMessageCodec

MessageCodec with UTF-8 encoded JSON messages.

JSONMethodCodec

MethodCodec with UTF-8 encoded JSON method calls and result envelopes. Values supported as method arguments and result payloads are those supported by JSONMessageCodec.

MessageCodec

A message encoding/decoding mechanism.

MethodCodec

A codec for method calls and enveloped results.

NetworkAssetBundle

An AssetBundle that loads resources over the network.

NetworkImage

Fetches the given URL from the network, associating it with the given scale.

OneFrameImageStreamCompleter

Manages the loading of ui.Image objects for static ImageStreams (those with only one frame).

PathProvider

Returns commonly used locations on the filesystem.

PlatformAssetBundle

An AssetBundle that loads resources using platform messages.

PlatformMessageChannel

A named channel for communicating with platform plugins using asynchronous message passing.

PlatformMessages

Sends message to and receives messages from platform plugins.

PlatformMethodChannel

A named channel for communicating with platform plugins using asynchronous method calls and event streams.

RawKeyboard

An interface for listening to raw key events.

RawKeyDownEvent

The user has pressed a key on the keyboard.

RawKeyEvent

Base class for raw key events.

RawKeyEventData

Base class for platform specific key event data.

RawKeyEventDataAndroid

Platform-specific key event data for Android.

RawKeyEventDataFuchsia

Platform-specific key event data for Fuchsia.

RawKeyUpEvent

The user has released a key on the keyboard.

ServicesBinding

Listens for platform messages and directs them to PlatformMessages.

StandardMessageCodec

MessageCodec using the Flutter standard binary encoding.

StandardMethodCodec

MethodCodec using the Flutter standard binary encoding.

StringCodec

MessageCodec with UTF-8 encoded String messages.

SystemChrome

Controls specific aspects of the operating system's graphical interface and how it interacts with the application.

SystemNavigator

Controls specific aspects of the system navigation stack.

SystemSound

Provides access to the library of short system specific sounds for common tasks.

TextEditingState

The current text, selection, and composing state for editing a run of text.

TextInput

An interface to the system's text input control.

TextInputClient

An interface to receive information from TextInput.

TextInputConfiguration

Controls the visual appearance of the text input control.

TextInputConnection

A interface for interacting with a text input control.

UrlLauncher

Allows applications to delegate responsbility of handling certain URLs to the underlying platform.

Exceptions / Errors

PlatformException

Thrown to indicate that a platform interaction failed in the platform plugin.