mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
![]() This PR is a follow-up of a previous PR of mine: https://github.com/flutter/flutter/pull/141417. It was unfinished, i.e. I only implemented it and used it in `examples/hello_world`. No "flutter create" templates were modified. This change is theoretically breaking, but in practice, I am pretty sure nobody uses this. It was not accounced anywhere, the only app using it is `examples/hello_world`. I did not do that (that=update docs and templates) because I wanted a solution that is idiomatic in both Gradle and Kotlin, and only now I found time to do this. ### Without this change ```groovy defaultConfig { applicationId = "io.flutter.examples.hello_world" minSdk = flutter.minSdkVersion targetSdk = flutter.targetSdkVersion versionCode = flutter.versionCode() versionName = flutter.versionName() } ``` ### With this change ```groovy defaultConfig { applicationId = "io.flutter.examples.hello_world" minSdk = flutter.minSdkVersion targetSdk = flutter.targetSdkVersion versionCode = flutter.versionCode versionName = flutter.versionName } ``` Idiomatic getter - yay! It's consistent between assignment of all four props. ### Issue fixes https://github.com/flutter/flutter/issues/146067 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. --------- Co-authored-by: Reid Baker <reidbaker@google.com> |
||
---|---|---|
.. | ||
android | ||
ios | ||
lib | ||
linux | ||
macos | ||
raw | ||
rendering | ||
services | ||
test | ||
widgets | ||
windows | ||
.metadata | ||
analysis_options.yaml | ||
pubspec.yaml | ||
README.md |
Examples of Flutter's layered architecture
This directory contains several self-contained examples that illustrate Flutter's layered architecture.
-
raw/ These examples show how to program against the lowest layer of the system. They manually receive input packets and construct composited scenes.
-
rendering/ These examples use Flutter's render tree to structure your app using a retained tree of visual objects. These objects coordinate to determine their size and position on screen and to handle events.
-
widgets/ These examples use Flutter's widgets to build more elaborate apps using a reactive framework.
-
services/ These examples use services available in Flutter to interact with the host platform.
To run each example, specify the demo file on the flutter run
command line, for example:
flutter run raw/spinning_square.dart
flutter run rendering/spinning_square.dart
flutter run widgets/spinning_square.dart