Tim Sneath | 85f9d59 | 2020-05-11 12:10:02 -0700 | [diff] [blame] | 1 | **Welcome to the Flutter API reference documentation!** |
Todd Volkert | df57dc9 | 2018-11-11 22:36:47 -0800 | [diff] [blame] | 2 | |
Tim Sneath | 85f9d59 | 2020-05-11 12:10:02 -0700 | [diff] [blame] | 3 | Flutter is Google's SDK for crafting beautiful, fast user experiences for |
Yazeed Al-Khalaf | d41b1fb | 2020-07-23 04:23:47 +0300 | [diff] [blame] | 4 | mobile, web, and desktop from a single codebase. Flutter works with existing |
Tim Sneath | 85f9d59 | 2020-05-11 12:10:02 -0700 | [diff] [blame] | 5 | code, is used by developers and organizations around the world, and is free |
| 6 | and open source. |
jcollins-g | e954172 | 2018-03-30 12:19:44 -0700 | [diff] [blame] | 7 | |
Tim Sneath | 85f9d59 | 2020-05-11 12:10:02 -0700 | [diff] [blame] | 8 | This API reference covers all libraries that are exported by the Flutter |
Todd Volkert | df57dc9 | 2018-11-11 22:36:47 -0800 | [diff] [blame] | 9 | SDK. |
| 10 | |
| 11 | ### More Documentation |
jcollins-g | e954172 | 2018-03-30 12:19:44 -0700 | [diff] [blame] | 12 | |
Todd Volkert | 515dbcb | 2018-11-08 09:00:47 -0800 | [diff] [blame] | 13 | This site hosts Flutter's API documentation. Other documentation can be found at |
| 14 | the following locations: |
| 15 | |
Michael Goderbauer | f0c2be3 | 2019-03-20 14:42:46 -0700 | [diff] [blame] | 16 | * [flutter.dev](https://flutter.dev) (main site) |
| 17 | * [Installation](https://flutter.dev/docs/get-started/install) |
| 18 | * [Codelabs](https://flutter.dev/docs/codelabs) |
Todd Volkert | 515dbcb | 2018-11-08 09:00:47 -0800 | [diff] [blame] | 19 | * [Contributing to Flutter](https://github.com/flutter/flutter/blob/master/CONTRIBUTING.md) |
Todd Volkert | df57dc9 | 2018-11-11 22:36:47 -0800 | [diff] [blame] | 20 | |
| 21 | ### Importing a Library |
| 22 | |
| 23 | #### Framework Libraries |
| 24 | |
| 25 | Libraries in the "Libraries" section below (or in the left navigation) are part |
| 26 | of the core Flutter framework and are imported using |
| 27 | `'package:flutter/<library>.dart'`, like so: |
| 28 | |
| 29 | ```dart |
| 30 | import 'package:flutter/material.dart'; |
| 31 | import 'package:flutter/services.dart'; |
| 32 | ``` |
| 33 | |
| 34 | #### Dart Libraries |
| 35 | |
Tim Sneath | 85f9d59 | 2020-05-11 12:10:02 -0700 | [diff] [blame] | 36 | Libraries in the "Dart" section exist in the `dart:` namespace and are imported |
Todd Volkert | df57dc9 | 2018-11-11 22:36:47 -0800 | [diff] [blame] | 37 | using `'dart:<library>'`, like so: |
| 38 | |
| 39 | ```dart |
| 40 | import 'dart:async'; |
| 41 | import 'dart:ui'; |
| 42 | ``` |
| 43 | |
| 44 | Except for `'dart:core'`, you must import a Dart library before you can use it. |
| 45 | |
Tim Sneath | 85f9d59 | 2020-05-11 12:10:02 -0700 | [diff] [blame] | 46 | #### Supporting Libraries |
Todd Volkert | df57dc9 | 2018-11-11 22:36:47 -0800 | [diff] [blame] | 47 | |
| 48 | Libraries in other sections are supporting libraries that ship with Flutter. |
| 49 | They are organized by package and are imported using |
| 50 | `'package:<package>/<library>.dart'`, like so: |
| 51 | |
| 52 | ```dart |
| 53 | import 'package:flutter_test/flutter_test.dart'; |
| 54 | import 'package:file/local.dart'; |
| 55 | ``` |
| 56 | |
Tim Sneath | 85f9d59 | 2020-05-11 12:10:02 -0700 | [diff] [blame] | 57 | ### Packages on pub.dev |
Todd Volkert | df57dc9 | 2018-11-11 22:36:47 -0800 | [diff] [blame] | 58 | |
Tim Sneath | 85f9d59 | 2020-05-11 12:10:02 -0700 | [diff] [blame] | 59 | Flutter has a rich ecosystem of packages that have been contributed by the |
| 60 | Flutter team and the broader open source community to a central repository. |
Yazeed Al-Khalaf | d41b1fb | 2020-07-23 04:23:47 +0300 | [diff] [blame] | 61 | Among the thousands of packages, you'll find support for Firebase, Google |
Tim Sneath | 85f9d59 | 2020-05-11 12:10:02 -0700 | [diff] [blame] | 62 | Fonts, hardware services like Bluetooth and camera, new widgets and |
| 63 | animations, and integration with other popular web services. You can browse |
| 64 | those packages at [pub.dev](https://pub.dev). |