Adam Barth | 948ae15 | 2016-02-13 00:52:56 -0800 | [diff] [blame] | 1 | # Examples of Flutter's layered architecture |
| 2 | |
Yazeed Al-Khalaf | d41b1fb | 2020-07-23 04:23:47 +0300 | [diff] [blame] | 3 | This directory contains several self-contained examples that illustrate |
Adam Barth | 948ae15 | 2016-02-13 00:52:56 -0800 | [diff] [blame] | 4 | Flutter'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 Barth | e4b1eab | 2016-03-08 16:35:23 -0800 | [diff] [blame] | 18 | * [*services/*](services/) These examples use services available in Flutter to |
| 19 | interact with the host platform. |
| 20 | |
Ian Hickson | a52c7b4 | 2017-04-05 11:28:33 -0700 | [diff] [blame] | 21 | To run each example, specify the demo file on the `flutter run` |
| 22 | command line, for example: |
Adam Barth | 948ae15 | 2016-02-13 00:52:56 -0800 | [diff] [blame] | 23 | |
| 24 | ``` |
Ian Hickson | a52c7b4 | 2017-04-05 11:28:33 -0700 | [diff] [blame] | 25 | flutter run raw/spinning_square.dart |
| 26 | flutter run rendering/spinning_square.dart |
| 27 | flutter run widgets/spinning_square.dart |
Adam Barth | 948ae15 | 2016-02-13 00:52:56 -0800 | [diff] [blame] | 28 | ``` |