blob: d888e5e26005522d61afc66b05a701830089afa5 [file] [log] [blame] [view]
Adam Barth948ae152016-02-13 00:52:56 -08001# Examples of Flutter's layered architecture
2
Yazeed Al-Khalafd41b1fb2020-07-23 04:23:47 +03003This directory contains several self-contained examples that illustrate
Adam Barth948ae152016-02-13 00:52:56 -08004Flutter's layered architecture.
5
6 * [*raw/*](raw/) These examples show how to program against the lowest layer of
7 the system. They manually receive input packets and construct composited
8 scenes.
9
10 * [*rendering/*](rendering/) These examples use Flutter's render tree to
11 structure your app using a retained tree of visual objects. These objects
12 coordinate to determine their size and position on screen and to handle
13 events.
14
15 * [*widgets/*](widgets/) These examples use Flutter's widgets to build more
16 elaborate apps using a reactive framework.
17
Adam Barthe4b1eab2016-03-08 16:35:23 -080018 * [*services/*](services/) These examples use services available in Flutter to
19 interact with the host platform.
20
Ian Hicksona52c7b42017-04-05 11:28:33 -070021To run each example, specify the demo file on the `flutter run`
22command line, for example:
Adam Barth948ae152016-02-13 00:52:56 -080023
24```
Ian Hicksona52c7b42017-04-05 11:28:33 -070025flutter run raw/spinning_square.dart
26flutter run rendering/spinning_square.dart
27flutter run widgets/spinning_square.dart
Adam Barth948ae152016-02-13 00:52:56 -080028```