blob: 7cb28a93dd9860f4aef6dd9f7081c01c0ba3661a [file] [log] [blame] [view]
Tim Sneath85f9d592020-05-11 12:10:02 -07001**Welcome to the Flutter API reference documentation!**
Todd Volkertdf57dc92018-11-11 22:36:47 -08002
Tim Sneath85f9d592020-05-11 12:10:02 -07003Flutter is Google's SDK for crafting beautiful, fast user experiences for
Yazeed Al-Khalafd41b1fb2020-07-23 04:23:47 +03004mobile, web, and desktop from a single codebase. Flutter works with existing
Tim Sneath85f9d592020-05-11 12:10:02 -07005code, is used by developers and organizations around the world, and is free
6and open source.
jcollins-ge9541722018-03-30 12:19:44 -07007
Tim Sneath85f9d592020-05-11 12:10:02 -07008This API reference covers all libraries that are exported by the Flutter
Todd Volkertdf57dc92018-11-11 22:36:47 -08009SDK.
10
11### More Documentation
jcollins-ge9541722018-03-30 12:19:44 -070012
Todd Volkert515dbcb2018-11-08 09:00:47 -080013This site hosts Flutter's API documentation. Other documentation can be found at
14the following locations:
15
Michael Goderbauerf0c2be32019-03-20 14:42:46 -070016* [flutter.dev](https://flutter.dev) (main site)
17* [Installation](https://flutter.dev/docs/get-started/install)
18* [Codelabs](https://flutter.dev/docs/codelabs)
Todd Volkert515dbcb2018-11-08 09:00:47 -080019* [Contributing to Flutter](https://github.com/flutter/flutter/blob/master/CONTRIBUTING.md)
Todd Volkertdf57dc92018-11-11 22:36:47 -080020
21### Importing a Library
22
23#### Framework Libraries
24
25Libraries in the "Libraries" section below (or in the left navigation) are part
26of the core Flutter framework and are imported using
27`'package:flutter/<library>.dart'`, like so:
28
29```dart
30import 'package:flutter/material.dart';
31import 'package:flutter/services.dart';
32```
33
34#### Dart Libraries
35
Tim Sneath85f9d592020-05-11 12:10:02 -070036Libraries in the "Dart" section exist in the `dart:` namespace and are imported
Todd Volkertdf57dc92018-11-11 22:36:47 -080037using `'dart:<library>'`, like so:
38
39```dart
40import 'dart:async';
41import 'dart:ui';
42```
43
44Except for `'dart:core'`, you must import a Dart library before you can use it.
45
Tim Sneath85f9d592020-05-11 12:10:02 -070046#### Supporting Libraries
Todd Volkertdf57dc92018-11-11 22:36:47 -080047
48Libraries in other sections are supporting libraries that ship with Flutter.
49They are organized by package and are imported using
50`'package:<package>/<library>.dart'`, like so:
51
52```dart
53import 'package:flutter_test/flutter_test.dart';
54import 'package:file/local.dart';
55```
56
Tim Sneath85f9d592020-05-11 12:10:02 -070057### Packages on pub.dev
Todd Volkertdf57dc92018-11-11 22:36:47 -080058
Tim Sneath85f9d592020-05-11 12:10:02 -070059Flutter has a rich ecosystem of packages that have been contributed by the
60Flutter team and the broader open source community to a central repository.
Yazeed Al-Khalafd41b1fb2020-07-23 04:23:47 +030061Among the thousands of packages, you'll find support for Firebase, Google
Tim Sneath85f9d592020-05-11 12:10:02 -070062Fonts, hardware services like Bluetooth and camera, new widgets and
63animations, and integration with other popular web services. You can browse
64those packages at [pub.dev](https://pub.dev).