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.

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. [...]
BasicMessageChannel
A named channel for communicating with platform plugins using asynchronous message passing. [...]
BinaryCodec
MessageCodec with unencoded binary messages represented using ByteData. [...]
BinaryMessages
Sends binary messages to and receives binary messages from platform plugins. [...]
BlacklistingTextInputFormatter
A TextInputFormatter that prevents the insertion of blacklisted characters patterns. [...]
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. [...]
EventChannel
A named channel for communicating with platform plugins using event streams. [...]
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 dart: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 dart: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. [...]
LengthLimitingTextInputFormatter
A TextInputFormatter that prevents the insertion of more characters (currently defined as Unicode scalar values) than allowed. [...]
MemoryImage
Decodes the given Uint8List buffer as an image, associating it with the given scale. [...]
MessageCodec
A message encoding/decoding mechanism. [...]
MethodCall
An command object representing the invocation of a named method.
MethodChannel
A named channel for communicating with platform plugins using asynchronous method calls. [...]
MethodCodec
A codec for method calls and enveloped results. [...]
MultiFrameImageStreamCompleter
Manages the decoding and scheduling of image frames. [...]
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 dart:ui.Image objects for static ImageStreams (those with only one frame).
OptionalMethodChannel
A MethodChannel that ignores missing platform plugins. [...]
PlatformAssetBundle
An AssetBundle that loads resources using platform messages.
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 BinaryMessages. [...]
StandardMessageCodec
MessageCodec using the Flutter standard binary encoding. [...]
StandardMethodCodec
MethodCodec using the Flutter standard binary encoding. [...]
StringCodec
MessageCodec with UTF-8 encoded String messages. [...]
SystemChannels
Platform channels used by the Flutter system.
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.
TextEditingValue
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. [...]
TextInputFormatter
A TextInputFormatter can be optionally injected into an EditableText to provide as-you-type validation and formatting of the text being edited. [...]
TextPosition
A visual position in a string of text.
TextRange
A range of characters in a string of text.
TextSelection
A range of text that represents a selection.
WhitelistingTextInputFormatter
A TextInputFormatter that allows only the insertion of whitelisted characters patterns. [...]

Properties

createHttpClient ValueGetter<Client>
Create a new http.Client object. [...]
read / write
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
An action the user has requested the text input control to perform.
TextInputType
The type of information for which to optimize the text input control. [...]

Typedefs

ImageListener(ImageInfo image, bool synchronousCall) → void
Signature for callbacks reporting that an image is available. [...]
TextInputFormatFunction(TextEditingValue oldValue, TextEditingValue newValue) TextEditingValue
Function signature expected for creating custom TextInputFormatter shorthands via TextInputFormatter.withFunction;

Exceptions / Errors

MissingPluginException
Thrown to indicate that a platform interaction failed to find a handling plugin. [...]
PlatformException
Thrown to indicate that a platform interaction failed in the platform plugin. [...]