Flutter package

Welcome to the Flutter API reference documentation.

Flutter is Google’s mobile UI framework for crafting high-quality nativeinterfaces on iOS and Android in record time. Flutter works with existing code,is used by developers and organizations around the world, and is free and opensource.

The API reference herein covers all libraries that are exported by the FlutterSDK.

More Documentation

This site hosts Flutter's API documentation. Other documentation can be found atthe following locations:

Importing a Library

Framework Libraries

Libraries in the "Libraries" section below (or in the left navigation) are partof the core Flutter framework and are imported using'package:flutter/<library>.dart', like so:

  1. import 'package:flutter/material.dart';
  2. import 'package:flutter/services.dart';

Dart Libraries

Libraries in the "Dart" section exist in the 'dart:' namespace and are importedusing 'dart:<library>', like so:

  1. import 'dart:async';
  2. import 'dart:ui';

Except for 'dart:core', you must import a Dart library before you can use it.

Other Libraries

Libraries in other sections are supporting libraries that ship with Flutter.They are organized by package and are imported using'package:<package>/<library>.dart', like so:

  1. import 'package:flutter_test/flutter_test.dart';
  2. import 'package:file/local.dart';

Finding Other Libraries

Flutter has a rich community of packages that have been contributed by theopen-source community. You can browse those packages atpub.dev/flutter

Libraries

Dart

  • dart:ui
  • Built-in types and core primitives for a Flutter application. […]

Core

  • dart:async
  • Support for asynchronous programming,with classes such as Future and Stream. […]
  • dart:collection
  • Classes and utilities that supplement the collection support in dart:core. […]
  • dart:convert
  • Encoders and decoders for converting between different data representations,including JSON and UTF-8. […]
  • dart:core
  • Built-in types, collections,and other core functionality for every Dart program. […]
  • dart:developer
  • Interact with developer tools such as the debugger and inspector. […]
  • dart:math
  • Mathematical constants and functions, plus a random number generator. […]
  • dart:typed_data
  • Lists that efficiently handle fixed sized data(for example, unsigned 8 byte integers) and SIMD numeric types. […]

VM

  • dart:ffi
  • Foreign Function Interface for interoperability with the C programming language. […]
  • dart:io
  • File, socket, HTTP, and other I/O support for non-web applications. […]
  • dart:isolate
  • Concurrent programming using isolates:independent workers that are similar to threadsbut don't share memory,communicating only via messages. […]

Web

  • dart:html
  • HTML elements and other resources for web-based applications that need tointeract with the browser and the DOM (Document Object Model). […]
  • dart:js
  • Low-level support for interoperating with JavaScript. […]
  • dart:js_util
  • Utility methods to efficiently manipulate typed JSInterop objects in caseswhere the name to call is not known at runtime. You should only use thesemethods when the same effect cannot be achieved with @JS annotations.These methods would be extension methods on JSObject if Dart supportedextension methods.

platform_integration

flutter_test

flutter_driver

  • flutter_driver
  • Provides API to test Flutter applications that run on realdevices and emulators. […]
  • flutter_driver_extension
  • This library provides a Dart VM service extension that is required fortests that use package:flutter_driver to drive applications from aseparate process, similar to Selenium (web), Espresso (Android) and UIAutomation (iOS). […]

flutter_localizations

flutter_web_plugins

archive

async

boolean_selector

charcode

collection

convert

crypto

file

image

  • image
  • The image library aims to provide server-side programs the ability to load,manipulate, and save various image file formats.

intl

  • date_symbol_data_custom
  • date_symbol_data_file
  • This file should be imported, along with date_format.dart in order to readlocale data from files in the file system.
  • date_symbol_data_http_request
  • This file should be imported, along with date_format.dart in order to readlocale data via http requests to a web server..
  • date_symbol_data_local
  • Date/time formatting symbols for all locales. […]
  • date_symbols
  • date_time_patterns
  • Date/time formatting symbols for a large subset of locales. […]
  • intl
  • This library provides internationalization and localization. This includesmessage formatting and replacement, date and number formatting and parsing,and utilities for working with Bidirectional text. […]
  • intl_standalone
  • This provides facilities for Internationalization that are only availablewhen running standalone. You should import only one of this orintl_browser.dart. Right now the only thing provided here is findingthe operating system locale.
  • message_lookup_by_library
  • Message/plural format library with locale support. This can have differentimplementations based on the mechanism for finding the localized versions ofmessages. This version expects them to be in a library named e.g.'messages_en_US'. The prefix is set in the "initializeMessages" call, whichmust be made for a locale before any lookups can be done. […]
  • number_symbol_data
  • Date/time formatting symbols for all locales. […]
  • number_symbols

json_rpc_2

matcher

meta

  • meta
  • Constants for use in metadata annotations. […]
  • meta_dart2js
  • Constants for use in metadata annotations to provide hints to dart2js. […]

path

pedantic

petitparser

  • petitparser
  • This package contains the core library of PetitParser, a dynamic parsercombinator framework.
  • petitparser.debug
  • This package contains some simple debugging tools.
  • petitparser.reflection
  • This package contains tools to reflect on and transform parsers.

platform

process

pub_semver

quiver

source_span

stack_trace

stream_channel

string_scanner

term_glyph

test_api

typed_data

vector_math

web_socket_channel

xml

  • xml
  • Dart XML is a lightweight library for parsing, traversing, querying andbuilding XML documents.
  • xml_events
  • Dart XML Events is an event based library to asynchronously parse XMLdocuments and to convert them to other representations.