Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
Files changed (50)
- .gitattributes+1
- flutter/examples/api/README.mdAdded+154
- flutter/examples/api/analysis_options.yamlAdded+10
- flutter/examples/api/pubspec.lockAdded+531
- flutter/examples/api/pubspec.yamlAdded+96
- flutter/examples/catalog/catalog.imlAdded+14
- flutter/examples/flutter_gallery/android.imlAdded+12
- flutter/examples/flutter_gallery/flutter_gallery.imlAdded+14
- flutter/examples/flutter_view/README.mdAdded+18
- flutter/examples/flutter_view/flutter_view.imlAdded+14
- flutter/examples/flutter_view/pubspec.lockAdded+55
- flutter/examples/flutter_view/pubspec.yamlAdded+22
- flutter/examples/hello_world/README.mdAdded+8
- flutter/examples/hello_world/android.imlAdded+12
- flutter/examples/hello_world/hello_world.imlAdded+14
- flutter/examples/hello_world/pubspec.lockAdded+494
- flutter/examples/hello_world/pubspec.yamlAdded+74
- flutter/examples/image_list/README.mdAdded+7
- flutter/examples/image_list/pubspec.lockAdded+196
- flutter/examples/image_list/pubspec.yamlAdded+60
- flutter/examples/layers/README.mdAdded+28
- flutter/examples/layers/analysis_options.yamlAdded+8
- flutter/examples/layers/android/build.gradleAdded+51
- flutter/examples/layers/android/buildscript-gradle.lockfileAdded+163
- flutter/examples/layers/android/gradle.propertiesAdded+3
- flutter/examples/layers/android/project-app.lockfileAdded+118
- flutter/examples/layers/android/settings.gradleAdded+21
- flutter/examples/layers/layers.imlAdded+14
- flutter/examples/layers/lib/main.dartAdded+16
- flutter/examples/layers/linux/CMakeLists.txtAdded+139
- flutter/examples/layers/linux/main.ccAdded+10
- flutter/examples/layers/linux/my_application.ccAdded+108
- flutter/examples/layers/linux/my_application.hAdded+22
- flutter/examples/layers/pubspec.lockAdded+188
- flutter/examples/layers/pubspec.yamlAdded+42
- flutter/examples/layers/raw/canvas.dartAdded+135
- flutter/examples/layers/raw/hello_world.dartAdded+57
- flutter/examples/layers/raw/spinning_square.dartAdded+69
- flutter/examples/layers/raw/text.dartAdded+102
- flutter/examples/layers/raw/touch_input.dartAdded+122
- flutter/examples/layers/rendering/custom_coordinate_systems.dartAdded+26
- flutter/examples/layers/rendering/flex_layout.dartAdded+91
- flutter/examples/layers/rendering/hello_world.dartAdded+30
- flutter/examples/platform_channel/README.mdAdded+22
- flutter/examples/platform_channel/android.imlAdded+12
- flutter/examples/platform_channel/android/app/build.gradleAdded+66
- flutter/examples/platform_channel/android/app/src/androidTest/java/com/example/platformchannel/ExampleInstrumentedTest.javaAdded+98
- flutter/examples/platform_channel/android/app/src/main/AndroidManifest.xmlAdded+44
- flutter/examples/platform_channel/android/app/src/main/java/com/example/platformchannel/MainActivity.javaAdded+100
- flutter/examples/platform_channel/android/app/src/main/res/values/strings.xmlAdded+8
12 unmodified lines13141512 unmodified linesnovelforge-sentinel-pro/images/writing-space.jpg filter=lfs diff=lfs merge=lfs -textnovelforge-project/novelforge-sentinel-pro/images/writing-space.jpg filter=lfs diff=lfs merge=lfs -textnovelforge-project/agent_workspace/docs/project_enhancement_completion_report.pdf filter=lfs diff=lfs merge=lfs -text12 unmodified lines1314151612 unmodified linesnovelforge-sentinel-pro/images/writing-space.jpg filter=lfs diff=lfs merge=lfs -textnovelforge-project/novelforge-sentinel-pro/images/writing-space.jpg filter=lfs diff=lfs merge=lfs -textnovelforge-project/agent_workspace/docs/project_enhancement_completion_report.pdf filter=lfs diff=lfs merge=lfs -textnovelforge-project/agent_workspace/novelforge-sentinel-pro/images/panel-bg.jpg filter=lfs diff=lfs merge=lfs -text
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154# API Example Code
This directory contains the API sample code that is referenced from the APIdocumentation in the framework.
The examples can be run individually by just specifying the path to the exampleon the command line (or in the run configuration of an IDE).
For example (no pun intended!), to run the first example from the `Curve2D`class in Chrome, you would run it like so from the [api](.) directory:
```% flutter run -d chrome lib/animation/curves/curve2_d.0.dart```
All of these same examples are available on the API docs site. For instance, theexample above is available on [this page](https://api.flutter.dev/flutter/animation/Curve2D-class.html#animation.Curve2D.1).Most of the samples are available as interactive examples in[Dartpad](https://dartpad.dev), but some (the ones marked with `{@tool sample}`in the framework source code), just don't make sense on the web, and so areavailable as standalone examples that can be run here. For instance, setting thesystem overlay style doesn't make sense on the web (it only changes thenotification area background color on Android), so you can run the example forthat on an Android device like so:
```% flutter run -d MyAndroidDevice lib/services/system_chrome/system_chrome.set_system_u_i_overlay_style.1.dart```
## Naming
> `lib/library/file/class_name.n.dart`>> `lib/library/file/class_name.member_name.n.dart`
The naming scheme for the files is similar to the hierarchy under[packages/flutter/lib/src](../../packages/flutter/lib/src), except that thefiles are represented as directories (without the `.dart` suffix), and eachsample in the file is a separate file in that directory. So, for the exampleabove, where the examples are from the[packages/flutter/lib/src/animation/curves.dart](../../packages/flutter/lib/src/animation/curves.dart)file, the `Curve2D` class, the first sample (hence the index "0") for thatsymbol resides in the file named[lib/animation/curves/curve2_d.0.dart](lib/animation/curves/curve2_d.0.dart).
Symbol names are converted from "CamelCase" to "snake_case". Dots are leftbetween symbol names, so the first example for symbol`InputDecoration.prefixIconConstraints` would be converted to`input_decoration.prefix_icon_constraints.0.dart`.
If the same example is linked to from multiple symbols, the source will be inthe canonical location for one of the symbols, and the link in the API docsblock for the other symbols will point to the first symbol's example location.
## Authoring
> For more detailed information about authoring examples, see> [the snippets package](https://pub.dev/packages/snippets).
When authoring examples, first place a block in the Dartdoc documentation forthe symbol you would like to attach it to. Here's what it might look like if youwanted to add a new example to the `Curve2D` class:
```dart/// {@tool dartpad}/// Write a description of the example here. This description will appear in the/// API web documentation to introduce the example.////// ** See code in examples/api/lib/animation/curves/curve2_d.0.dart **/// {@end-tool}```
The "See code in" line needs to be formatted exactly as above, with no wrappingor newlines, one space after the "`**`" at the beginning, and one space beforethe "`**`" at the end, and the words "See code in" at the beginning of the line.This is what the snippets tool use when finding the example source code that youare creating.
Use `{@tool dartpad}` for Dartpad examples, and use `{@tool sample}` forexamples that shouldn't be run/shown in Dartpad.
Once that comment block is inserted in the source code, create a new file at theappropriate path under [`examples/api`](.). See the[sample_templates](./lib/sample_templates/) directory for examples of differenttypes of samples with some best practices applied.
The filename should match the location of the source file it is linked from, andis named for the symbol it is attached to, in lower_snake_case, with an indexrelating to their order within the doc comment. So, for the `Curve2D` exampleabove, since it's in the `animation` library, in a file called `curves.dart`,and it's the first example, it should have the name`examples/api/lib/animation/curves/curve2_d.0.dart`.
You should also add tests for your sample code under[`examples/api/test`](./test), that matches their location under [lib](./lib),ending in `_test.dart`. See the section on [writing tests](#writing-tests) formore information on what kinds of tests to write.
The entire example should be in a single file, so that Dartpad can load it.
Only packages that can be loaded by Dartpad may be imported. If you use one thathasn't been used in an example before, you may have to add it to the[pubspec.yaml](pubspec.yaml) in the api directory.
## Snippets
There is another type of example that can also be authored, using `{@toolsnippet}`. Snippet examples are just written inline in the source, like so:
```dart/// {@tool dartpad}/// Write a description of the example here. This description will appear in the/// API web documentation to introduce the example.////// ```dart/// // Sample code goes here, e.g.:/// const Widget emptyBox = SizedBox();/// ```/// {@end-tool}```
The source for these snippets isn't stored under the [`examples/api`](.)directory, or available in Dartpad in the API docs, since they're not intendedto be runnable, they just show some incomplete snippet of example code. It mustcompile (in the context of the sample analyzer), but doesn't need to doanything. See [the snippets documentation](https://pub.dev/packages/snippets#snippet-tool) for more information about thecontext that the analyzer uses.
## Writing Tests
Examples are required to have tests. There is already a "smoke test" that simplybuilds and runs all the API examples, just to make sure that they start upwithout crashing. Functionality tests are required the examples, and generallyjust do what is normally done for writing tests. The one thing that makes itmore challenging to do for examples is that they can't really be written fortestability in any obvious way, since that would complicate the examples andmake them harder to explain.
As an example, in regular framework code, you might include a parameter for a`Platform` object that can be overridden by a test to supply a dummy platform,but in the example. This would be unnecessarily complex for the example. In allother ways, these are just normal tests. You don't need to re-test thefunctionality of the widget being used in the example, but you should test thefunctionality and integrity of the example itself.
Tests go into a directory under [test](./test) that matches their location under[lib](./lib). They are named the same as the example they are testing, with`_test.dart` at the end, like other tests. For instance, a `LayoutBuilder`example that resides in [`lib/widgets/layout_builder/layout_builder.0.dart`](./lib/widgets/layout_builder/layout_builder.0.dart) would have its tests in afile named [`test/widgets/layout_builder/layout_builder.0_test.dart`](./test/widgets/layout_builder/layout_builder.0_test.dart)12345678910# This file is also used by dev/bots/analyze_snippet_code.dart to analyze code snippets (`{@tool snippet}` sections).
include: ../../analysis_options.yaml
linter: rules: # Samples want to print things pretty often. avoid_print: false # Samples are sometimes incomplete and don't show usage of everything. unreachable_from_main: false123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531# Generated by pub# See https://dart.dev/tools/pub/glossary#lockfilepackages: _fe_analyzer_shared: dependency: "direct dev" description: name: _fe_analyzer_shared sha256: "36a321c3d2cbe01cbcb3540a87b8843846e0206df3e691fa7b23e19e78de6d49" url: "https://pub.dev" source: hosted version: "65.0.0" analyzer: dependency: "direct dev" description: name: analyzer sha256: dfe03b90ec022450e22513b5e5ca1f01c0c01de9c3fba2f7fd233cb57a6b9a07 url: "https://pub.dev" source: hosted version: "6.3.0" args: dependency: "direct dev" description: name: args sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596 url: "https://pub.dev" source: hosted version: "2.4.2" async: dependency: "direct dev" description: name: async sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" url: "https://pub.dev" source: hosted version: "2.11.0" boolean_selector: dependency: "direct dev" description: name: boolean_selector sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" url: "https://pub.dev" source: hosted version: "2.1.1" characters: dependency: "direct main" description: name: characters sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" url: "https://pub.dev" source: hosted version: "1.3.0" clock: dependency: "direct dev" description: name: clock sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf url: "https://pub.dev" source: hosted version: "1.1.1" collection: dependency: "direct main" description: name: collection sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a url: "https://pub.dev" source: hosted version: "1.18.0" convert: dependency: "direct dev" description: name: convert sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" url: "https://pub.dev" source: hosted version: "3.1.1" coverage: dependency: "direct dev" description: name: coverage sha256: "8acabb8306b57a409bf4c83522065672ee13179297a6bb0cb9ead73948df7c76" url: "https://pub.dev" source: hosted version: "1.7.2" crypto: dependency: "direct dev" description: name: crypto sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab url: "https://pub.dev" source: hosted version: "3.0.3" cupertino_icons: dependency: "direct main" description: name: cupertino_icons sha256: d57953e10f9f8327ce64a508a355f0b1ec902193f66288e8cb5070e7c47eeb2d url: "https://pub.dev" source: hosted version: "1.0.6" fake_async: dependency: "direct dev" description: name: fake_async sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" url: "https://pub.dev" source: hosted version: "1.3.1" file: dependency: "direct dev" description: name: file sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" url: "https://pub.dev" source: hosted version: "7.0.0" flutter: dependency: "direct main" description: flutter source: sdk version: "0.0.0" flutter_driver: dependency: "direct dev" description: flutter source: sdk version: "0.0.0" flutter_goldens: dependency: "direct dev" description: flutter source: sdk version: "0.0.0" flutter_localizations: dependency: "direct dev" description: flutter source: sdk version: "0.0.0" flutter_test: dependency: "direct dev" description: flutter source: sdk version: "0.0.0" flutter_web_plugins: dependency: "direct dev" description: flutter source: sdk version: "0.0.0" frontend_server_client: dependency: "direct dev" description: name: frontend_server_client sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612" url: "https://pub.dev" source: hosted version: "3.2.0" fuchsia_remote_debug_protocol: dependency: transitive description: flutter source: sdk version: "0.0.0" glob: dependency: "direct dev" description: name: glob sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" url: "https://pub.dev" source: hosted version: "2.1.2" http_multi_server: dependency: "direct dev" description: name: http_multi_server sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" url: "https://pub.dev" source: hosted version: "3.2.1" http_parser: dependency: "direct dev" description: name: http_parser sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" url: "https://pub.dev" source: hosted version: "4.0.2" integration_test: dependency: "direct dev" description: flutter source: sdk version: "0.0.0" intl: dependency: "direct dev" description: name: intl sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d" url: "https://pub.dev" source: hosted version: "0.18.1" io: dependency: "direct dev" description: name: io sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" url: "https://pub.dev" source: hosted version: "1.0.4" js: dependency: "direct dev" description: name: js sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 url: "https://pub.dev" source: hosted version: "0.6.7" leak_tracker: dependency: "direct dev" description: name: leak_tracker sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" url: "https://pub.dev" source: hosted version: "10.0.0" leak_tracker_flutter_testing: dependency: "direct dev" description: name: leak_tracker_flutter_testing sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 url: "https://pub.dev" source: hosted version: "2.0.1" leak_tracker_testing: dependency: "direct dev" description: name: leak_tracker_testing sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 url: "https://pub.dev" source: hosted version: "2.0.1" logging: dependency: "direct dev" description: name: logging sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" url: "https://pub.dev" source: hosted version: "1.2.0" matcher: dependency: "direct dev" description: name: matcher sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted version: "0.12.16+1" material_color_utilities: dependency: "direct main" description: name: material_color_utilities sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted version: "0.8.0" meta: dependency: "direct main" description: name: meta sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 url: "https://pub.dev" source: hosted version: "1.11.0" mime: dependency: "direct dev" description: name: mime sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e url: "https://pub.dev" source: hosted version: "1.0.4" node_preamble: dependency: "direct dev" description: name: node_preamble sha256: "6e7eac89047ab8a8d26cf16127b5ed26de65209847630400f9aefd7cd5c730db" url: "https://pub.dev" source: hosted version: "2.0.2" package_config: dependency: "direct dev" description: name: package_config sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" url: "https://pub.dev" source: hosted version: "2.1.0" path: dependency: "direct dev" description: name: path sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted version: "1.9.0" platform: dependency: "direct dev" description: name: platform sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec" url: "https://pub.dev" source: hosted version: "3.1.4" pool: dependency: "direct dev" description: name: pool sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" url: "https://pub.dev" source: hosted version: "1.5.1" process: dependency: "direct dev" description: name: process sha256: "21e54fd2faf1b5bdd5102afd25012184a6793927648ea81eea80552ac9405b32" url: "https://pub.dev" source: hosted version: "5.0.2" pub_semver: dependency: "direct dev" description: name: pub_semver sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" url: "https://pub.dev" source: hosted version: "2.1.4" shelf: dependency: "direct dev" description: name: shelf sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 url: "https://pub.dev" source: hosted version: "1.4.1" shelf_packages_handler: dependency: "direct dev" description: name: shelf_packages_handler sha256: "89f967eca29607c933ba9571d838be31d67f53f6e4ee15147d5dc2934fee1b1e" url: "https://pub.dev" source: hosted version: "3.0.2" shelf_static: dependency: "direct dev" description: name: shelf_static sha256: a41d3f53c4adf0f57480578c1d61d90342cd617de7fc8077b1304643c2d85c1e url: "https://pub.dev" source: hosted version: "1.1.2" shelf_web_socket: dependency: "direct dev" description: name: shelf_web_socket sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" url: "https://pub.dev" source: hosted version: "1.0.4" sky_engine: dependency: transitive description: flutter source: sdk version: "0.0.99" source_map_stack_trace: dependency: "direct dev" description: name: source_map_stack_trace sha256: "84cf769ad83aa6bb61e0aa5a18e53aea683395f196a6f39c4c881fb90ed4f7ae" url: "https://pub.dev" source: hosted version: "2.1.1" source_maps: dependency: "direct dev" description: name: source_maps sha256: "708b3f6b97248e5781f493b765c3337db11c5d2c81c3094f10904bfa8004c703" url: "https://pub.dev" source: hosted version: "0.10.12" source_span: dependency: "direct dev" description: name: source_span sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" url: "https://pub.dev" source: hosted version: "1.10.0" stack_trace: dependency: "direct dev" description: name: stack_trace sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" url: "https://pub.dev" source: hosted version: "1.11.1" stream_channel: dependency: "direct dev" description: name: stream_channel sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 url: "https://pub.dev" source: hosted version: "2.1.2" string_scanner: dependency: "direct dev" description: name: string_scanner sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" url: "https://pub.dev" source: hosted version: "1.2.0" sync_http: dependency: "direct dev" description: name: sync_http sha256: "7f0cd72eca000d2e026bcd6f990b81d0ca06022ef4e32fb257b30d3d1014a961" url: "https://pub.dev" source: hosted version: "0.3.1" term_glyph: dependency: "direct dev" description: name: term_glyph sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 url: "https://pub.dev" source: hosted version: "1.2.1" test: dependency: "direct dev" description: name: test sha256: a1f7595805820fcc05e5c52e3a231aedd0b72972cb333e8c738a8b1239448b6f url: "https://pub.dev" source: hosted version: "1.24.9" test_api: dependency: "direct dev" description: name: test_api sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" url: "https://pub.dev" source: hosted version: "0.6.1" test_core: dependency: "direct dev" description: name: test_core sha256: a757b14fc47507060a162cc2530d9a4a2f92f5100a952c7443b5cad5ef5b106a url: "https://pub.dev" source: hosted version: "0.5.9" typed_data: dependency: "direct dev" description: name: typed_data sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c url: "https://pub.dev" source: hosted version: "1.3.2" vector_math: dependency: "direct main" description: name: vector_math sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" url: "https://pub.dev" source: hosted version: "2.1.4" vm_service: dependency: "direct dev" description: name: vm_service sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 url: "https://pub.dev" source: hosted version: "13.0.0" watcher: dependency: "direct dev" description: name: watcher sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" url: "https://pub.dev" source: hosted version: "1.1.0" web: dependency: "direct dev" description: name: web sha256: edc8a9573dd8c5a83a183dae1af2b6fd4131377404706ca4e5420474784906fa url: "https://pub.dev" source: hosted version: "0.4.0" web_socket_channel: dependency: "direct dev" description: name: web_socket_channel sha256: "045ec2137c27bf1a32e6ffa0e734d532a6677bf9016a0d1a406c54e499ff945b" url: "https://pub.dev" source: hosted version: "2.4.1" webdriver: dependency: "direct dev" description: name: webdriver sha256: "003d7da9519e1e5f329422b36c4dcdf18d7d2978d1ba099ea4e45ba490ed845e" url: "https://pub.dev" source: hosted version: "3.0.3" webkit_inspection_protocol: dependency: "direct dev" description: name: webkit_inspection_protocol sha256: "87d3f2333bb240704cd3f1c6b5b7acd8a10e7f0bc28c28dcf14e782014f4a572" url: "https://pub.dev" source: hosted version: "1.2.1" yaml: dependency: "direct dev" description: name: yaml sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" url: "https://pub.dev" source: hosted version: "3.1.2"sdks: dart: ">=3.2.0 <4.0.0" flutter: ">=2.5.0-6.0.pre.30"123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596# This file is also used by dev/bots/analyze_snippet_code.dart to analyze code snippets (`{@tool snippet}` sections).
name: flutter_api_samplesdescription: API code samples for the Flutter repo.publish_to: 'none'
version: 1.0.0
environment: sdk: '>=3.2.0-0 <4.0.0' flutter: ">=2.5.0-6.0.pre.30 <3.0.0"
dependencies: cupertino_icons: 1.0.6 flutter: sdk: flutter
characters: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" collection: 1.18.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" material_color_utilities: 0.8.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" meta: 1.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vector_math: 2.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
dev_dependencies: integration_test: sdk: flutter flutter_driver: sdk: flutter flutter_goldens: sdk: flutter flutter_localizations: sdk: flutter flutter_test: sdk: flutter flutter_web_plugins: sdk: flutter test: 1.24.9
_fe_analyzer_shared: 65.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" analyzer: 6.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 2.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" clock: 1.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" coverage: 1.7.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" fake_async: 1.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" file: 7.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" glob: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" http_multi_server: 3.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" http_parser: 4.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" intl: 0.18.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" io: 1.0.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" js: 0.6.7 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" leak_tracker: 10.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" leak_tracker_flutter_testing: 2.0.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" leak_tracker_testing: 2.0.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" logging: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" matcher: 0.12.16+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" mime: 1.0.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" node_preamble: 2.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" package_config: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" path: 1.9.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" platform: 3.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" pool: 1.5.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" process: 5.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" pub_semver: 2.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" shelf: 1.4.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" shelf_packages_handler: 3.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" shelf_static: 1.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" shelf_web_socket: 1.0.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" source_map_stack_trace: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" source_maps: 0.10.12 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" source_span: 1.10.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" stack_trace: 1.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" stream_channel: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" string_scanner: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" sync_http: 0.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" term_glyph: 1.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" test_api: 0.6.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" test_core: 0.5.9 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" typed_data: 1.3.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vm_service: 13.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" watcher: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" web: 0.4.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" web_socket_channel: 2.4.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" webdriver: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" webkit_inspection_protocol: 1.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" yaml: 3.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
flutter: uses-material-design: true
# PUBSPEC CHECKSUM: e00b1234567891011121314<?xml version="1.0" encoding="UTF-8"?><module type="WEB_MODULE" version="4"> <component name="NewModuleRootManager" inherit-compiler-output="true"> <exclude-output /> <content url="file://$MODULE_DIR$"> <excludeFolder url="file://$MODULE_DIR$/.idea" /> <excludeFolder url="file://$MODULE_DIR$/build" /> </content> <orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="library" name="Dart SDK" level="project" /> <orderEntry type="library" name="Dart Packages" level="project" /> <orderEntry type="library" name="Flutter Plugins" level="project" /> </component></module>123456789101112<?xml version="1.0" encoding="UTF-8"?><module type="JAVA_MODULE" version="4"> <component name="NewModuleRootManager" inherit-compiler-output="true"> <exclude-output /> <content url="file://$MODULE_DIR$/android"> <sourceFolder url="file://$MODULE_DIR$/android/app/src/main/java" isTestSource="false" /> </content> <orderEntry type="jdk" jdkName="Android API 29 Platform" jdkType="Android SDK" /> <orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="library" name="Flutter for Android" level="project" /> </component></module>1234567891011121314<?xml version="1.0" encoding="UTF-8"?><module type="WEB_MODULE" version="4"> <component name="NewModuleRootManager" inherit-compiler-output="true"> <exclude-output /> <content url="file://$MODULE_DIR$"> <excludeFolder url="file://$MODULE_DIR$/.idea" /> <excludeFolder url="file://$MODULE_DIR$/build" /> </content> <orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="library" name="Dart Packages" level="project" /> <orderEntry type="library" name="Dart SDK" level="project" /> <orderEntry type="library" name="Flutter Plugins" level="project" /> </component></module>123456789101112131415161718# Example of embedding Flutter using FlutterView
This project demonstrates how to embed Flutter within an iOS or Androidapplication. On iOS, the iOS and Flutter components are built with Xcode. OnAndroid, the Android and Flutter components are built with Android Studio orGradle.
You can read more about[accessing platform and third-party services in Flutter](https://flutter.dev/platform-services/).
## iOS
You can open `ios/Runner.xcworkspace` in Xcode and build the project asusual.
## Android
You can open `android/` in Android Studio and build the project as usual.1234567891011121314<?xml version="1.0" encoding="UTF-8"?><module type="WEB_MODULE" version="4"> <component name="NewModuleRootManager" inherit-compiler-output="true"> <exclude-output /> <content url="file://$MODULE_DIR$"> <excludeFolder url="file://$MODULE_DIR$/.idea" /> <excludeFolder url="file://$MODULE_DIR$/build" /> </content> <orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="library" name="Dart SDK" level="project" /> <orderEntry type="library" name="Dart Packages" level="project" /> <orderEntry type="library" name="Flutter Plugins" level="project" /> </component></module>12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455# Generated by pub# See https://dart.dev/tools/pub/glossary#lockfilepackages: characters: dependency: "direct main" description: name: characters sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" url: "https://pub.dev" source: hosted version: "1.3.0" collection: dependency: "direct main" description: name: collection sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a url: "https://pub.dev" source: hosted version: "1.18.0" flutter: dependency: "direct main" description: flutter source: sdk version: "0.0.0" material_color_utilities: dependency: "direct main" description: name: material_color_utilities sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted version: "0.8.0" meta: dependency: "direct main" description: name: meta sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 url: "https://pub.dev" source: hosted version: "1.11.0" sky_engine: dependency: transitive description: flutter source: sdk version: "0.0.99" vector_math: dependency: "direct main" description: name: vector_math sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" url: "https://pub.dev" source: hosted version: "2.1.4"sdks: dart: ">=3.2.0-0 <4.0.0"12345678910111213141516171819202122name: flutter_viewdescription: A new flutter project.
environment: sdk: '>=3.2.0-0 <4.0.0'
dependencies: flutter: sdk: flutter
characters: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" collection: 1.18.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" material_color_utilities: 0.8.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" meta: 1.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vector_math: 2.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
flutter: uses-material-design: true assets: - assets/flutter-mark-square-64.png
# PUBSPEC CHECKSUM: 469412345678## To run the Hello World demo:```flutter run```## To run the Hello World demo showing Arabic:```flutter run lib/arabic.dart```123456789101112<?xml version="1.0" encoding="UTF-8"?><module type="JAVA_MODULE" version="4"> <component name="NewModuleRootManager" inherit-compiler-output="true"> <exclude-output /> <content url="file://$MODULE_DIR$/android"> <sourceFolder url="file://$MODULE_DIR$/android/app/src/main/java" isTestSource="false" /> </content> <orderEntry type="jdk" jdkName="Android API 29 Platform" jdkType="Android SDK" /> <orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="library" name="Flutter for Android" level="project" /> </component></module>1234567891011121314<?xml version="1.0" encoding="UTF-8"?><module type="WEB_MODULE" version="4"> <component name="NewModuleRootManager" inherit-compiler-output="true"> <exclude-output /> <content url="file://$MODULE_DIR$"> <excludeFolder url="file://$MODULE_DIR$/.idea" /> <excludeFolder url="file://$MODULE_DIR$/build" /> </content> <orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="library" name="Dart Packages" level="project" /> <orderEntry type="library" name="Dart SDK" level="project" /> <orderEntry type="library" name="Flutter Plugins" level="project" /> </component></module>123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494# Generated by pub# See https://dart.dev/tools/pub/glossary#lockfilepackages: _fe_analyzer_shared: dependency: "direct dev" description: name: _fe_analyzer_shared sha256: "36a321c3d2cbe01cbcb3540a87b8843846e0206df3e691fa7b23e19e78de6d49" url: "https://pub.dev" source: hosted version: "65.0.0" analyzer: dependency: "direct dev" description: name: analyzer sha256: dfe03b90ec022450e22513b5e5ca1f01c0c01de9c3fba2f7fd233cb57a6b9a07 url: "https://pub.dev" source: hosted version: "6.3.0" args: dependency: "direct dev" description: name: args sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596 url: "https://pub.dev" source: hosted version: "2.4.2" async: dependency: "direct dev" description: name: async sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" url: "https://pub.dev" source: hosted version: "2.11.0" boolean_selector: dependency: "direct dev" description: name: boolean_selector sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" url: "https://pub.dev" source: hosted version: "2.1.1" characters: dependency: "direct main" description: name: characters sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" url: "https://pub.dev" source: hosted version: "1.3.0" clock: dependency: "direct dev" description: name: clock sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf url: "https://pub.dev" source: hosted version: "1.1.1" collection: dependency: "direct main" description: name: collection sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a url: "https://pub.dev" source: hosted version: "1.18.0" convert: dependency: "direct dev" description: name: convert sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" url: "https://pub.dev" source: hosted version: "3.1.1" coverage: dependency: "direct dev" description: name: coverage sha256: "8acabb8306b57a409bf4c83522065672ee13179297a6bb0cb9ead73948df7c76" url: "https://pub.dev" source: hosted version: "1.7.2" crypto: dependency: "direct dev" description: name: crypto sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab url: "https://pub.dev" source: hosted version: "3.0.3" fake_async: dependency: "direct dev" description: name: fake_async sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" url: "https://pub.dev" source: hosted version: "1.3.1" file: dependency: "direct dev" description: name: file sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" url: "https://pub.dev" source: hosted version: "7.0.0" flutter: dependency: "direct main" description: flutter source: sdk version: "0.0.0" flutter_driver: dependency: "direct dev" description: flutter source: sdk version: "0.0.0" flutter_test: dependency: "direct dev" description: flutter source: sdk version: "0.0.0" frontend_server_client: dependency: "direct dev" description: name: frontend_server_client sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612" url: "https://pub.dev" source: hosted version: "3.2.0" fuchsia_remote_debug_protocol: dependency: transitive description: flutter source: sdk version: "0.0.0" glob: dependency: "direct dev" description: name: glob sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" url: "https://pub.dev" source: hosted version: "2.1.2" http_multi_server: dependency: "direct dev" description: name: http_multi_server sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" url: "https://pub.dev" source: hosted version: "3.2.1" http_parser: dependency: "direct dev" description: name: http_parser sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" url: "https://pub.dev" source: hosted version: "4.0.2" io: dependency: "direct dev" description: name: io sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" url: "https://pub.dev" source: hosted version: "1.0.4" js: dependency: "direct dev" description: name: js sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 url: "https://pub.dev" source: hosted version: "0.6.7" leak_tracker: dependency: "direct dev" description: name: leak_tracker sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" url: "https://pub.dev" source: hosted version: "10.0.0" leak_tracker_flutter_testing: dependency: "direct dev" description: name: leak_tracker_flutter_testing sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 url: "https://pub.dev" source: hosted version: "2.0.1" leak_tracker_testing: dependency: "direct dev" description: name: leak_tracker_testing sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 url: "https://pub.dev" source: hosted version: "2.0.1" logging: dependency: "direct dev" description: name: logging sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" url: "https://pub.dev" source: hosted version: "1.2.0" matcher: dependency: "direct dev" description: name: matcher sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted version: "0.12.16+1" material_color_utilities: dependency: "direct main" description: name: material_color_utilities sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted version: "0.8.0" meta: dependency: "direct main" description: name: meta sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 url: "https://pub.dev" source: hosted version: "1.11.0" mime: dependency: "direct dev" description: name: mime sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e url: "https://pub.dev" source: hosted version: "1.0.4" node_preamble: dependency: "direct dev" description: name: node_preamble sha256: "6e7eac89047ab8a8d26cf16127b5ed26de65209847630400f9aefd7cd5c730db" url: "https://pub.dev" source: hosted version: "2.0.2" package_config: dependency: "direct dev" description: name: package_config sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" url: "https://pub.dev" source: hosted version: "2.1.0" path: dependency: "direct dev" description: name: path sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted version: "1.9.0" platform: dependency: transitive description: name: platform sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec" url: "https://pub.dev" source: hosted version: "3.1.4" pool: dependency: "direct dev" description: name: pool sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" url: "https://pub.dev" source: hosted version: "1.5.1" process: dependency: transitive description: name: process sha256: "21e54fd2faf1b5bdd5102afd25012184a6793927648ea81eea80552ac9405b32" url: "https://pub.dev" source: hosted version: "5.0.2" pub_semver: dependency: "direct dev" description: name: pub_semver sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" url: "https://pub.dev" source: hosted version: "2.1.4" shelf: dependency: "direct dev" description: name: shelf sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 url: "https://pub.dev" source: hosted version: "1.4.1" shelf_packages_handler: dependency: "direct dev" description: name: shelf_packages_handler sha256: "89f967eca29607c933ba9571d838be31d67f53f6e4ee15147d5dc2934fee1b1e" url: "https://pub.dev" source: hosted version: "3.0.2" shelf_static: dependency: "direct dev" description: name: shelf_static sha256: a41d3f53c4adf0f57480578c1d61d90342cd617de7fc8077b1304643c2d85c1e url: "https://pub.dev" source: hosted version: "1.1.2" shelf_web_socket: dependency: "direct dev" description: name: shelf_web_socket sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" url: "https://pub.dev" source: hosted version: "1.0.4" sky_engine: dependency: transitive description: flutter source: sdk version: "0.0.99" source_map_stack_trace: dependency: "direct dev" description: name: source_map_stack_trace sha256: "84cf769ad83aa6bb61e0aa5a18e53aea683395f196a6f39c4c881fb90ed4f7ae" url: "https://pub.dev" source: hosted version: "2.1.1" source_maps: dependency: "direct dev" description: name: source_maps sha256: "708b3f6b97248e5781f493b765c3337db11c5d2c81c3094f10904bfa8004c703" url: "https://pub.dev" source: hosted version: "0.10.12" source_span: dependency: "direct dev" description: name: source_span sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" url: "https://pub.dev" source: hosted version: "1.10.0" stack_trace: dependency: "direct dev" description: name: stack_trace sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" url: "https://pub.dev" source: hosted version: "1.11.1" stream_channel: dependency: "direct dev" description: name: stream_channel sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 url: "https://pub.dev" source: hosted version: "2.1.2" string_scanner: dependency: "direct dev" description: name: string_scanner sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" url: "https://pub.dev" source: hosted version: "1.2.0" sync_http: dependency: "direct dev" description: name: sync_http sha256: "7f0cd72eca000d2e026bcd6f990b81d0ca06022ef4e32fb257b30d3d1014a961" url: "https://pub.dev" source: hosted version: "0.3.1" term_glyph: dependency: "direct dev" description: name: term_glyph sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 url: "https://pub.dev" source: hosted version: "1.2.1" test: dependency: "direct dev" description: name: test sha256: a1f7595805820fcc05e5c52e3a231aedd0b72972cb333e8c738a8b1239448b6f url: "https://pub.dev" source: hosted version: "1.24.9" test_api: dependency: "direct dev" description: name: test_api sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" url: "https://pub.dev" source: hosted version: "0.6.1" test_core: dependency: "direct dev" description: name: test_core sha256: a757b14fc47507060a162cc2530d9a4a2f92f5100a952c7443b5cad5ef5b106a url: "https://pub.dev" source: hosted version: "0.5.9" typed_data: dependency: "direct dev" description: name: typed_data sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c url: "https://pub.dev" source: hosted version: "1.3.2" vector_math: dependency: "direct main" description: name: vector_math sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" url: "https://pub.dev" source: hosted version: "2.1.4" vm_service: dependency: "direct dev" description: name: vm_service sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 url: "https://pub.dev" source: hosted version: "13.0.0" watcher: dependency: "direct dev" description: name: watcher sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" url: "https://pub.dev" source: hosted version: "1.1.0" web: dependency: "direct dev" description: name: web sha256: edc8a9573dd8c5a83a183dae1af2b6fd4131377404706ca4e5420474784906fa url: "https://pub.dev" source: hosted version: "0.4.0" web_socket_channel: dependency: "direct dev" description: name: web_socket_channel sha256: "045ec2137c27bf1a32e6ffa0e734d532a6677bf9016a0d1a406c54e499ff945b" url: "https://pub.dev" source: hosted version: "2.4.1" webdriver: dependency: "direct dev" description: name: webdriver sha256: "003d7da9519e1e5f329422b36c4dcdf18d7d2978d1ba099ea4e45ba490ed845e" url: "https://pub.dev" source: hosted version: "3.0.3" webkit_inspection_protocol: dependency: "direct dev" description: name: webkit_inspection_protocol sha256: "87d3f2333bb240704cd3f1c6b5b7acd8a10e7f0bc28c28dcf14e782014f4a572" url: "https://pub.dev" source: hosted version: "1.2.1" yaml: dependency: "direct dev" description: name: yaml sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" url: "https://pub.dev" source: hosted version: "3.1.2"sdks: dart: ">=3.2.0 <4.0.0"1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374name: hello_world
environment: sdk: '>=3.2.0-0 <4.0.0'
dependencies: flutter: sdk: flutter
characters: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" collection: 1.18.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" material_color_utilities: 0.8.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" meta: 1.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vector_math: 2.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
dev_dependencies: flutter_driver: sdk: flutter flutter_test: sdk: flutter test: 1.24.9
_fe_analyzer_shared: 65.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" analyzer: 6.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 2.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" clock: 1.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" convert: 3.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" coverage: 1.7.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" crypto: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" fake_async: 1.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" file: 7.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" frontend_server_client: 3.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" glob: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" http_multi_server: 3.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" http_parser: 4.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" io: 1.0.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" js: 0.6.7 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" leak_tracker: 10.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" leak_tracker_flutter_testing: 2.0.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" leak_tracker_testing: 2.0.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" logging: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" matcher: 0.12.16+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" mime: 1.0.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" node_preamble: 2.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" package_config: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" path: 1.9.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" pool: 1.5.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" pub_semver: 2.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" shelf: 1.4.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" shelf_packages_handler: 3.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" shelf_static: 1.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" shelf_web_socket: 1.0.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" source_map_stack_trace: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" source_maps: 0.10.12 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" source_span: 1.10.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" stack_trace: 1.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" stream_channel: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" string_scanner: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" sync_http: 0.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" term_glyph: 1.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" test_api: 0.6.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" test_core: 0.5.9 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" typed_data: 1.3.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vm_service: 13.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" watcher: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" web: 0.4.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" web_socket_channel: 2.4.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" webdriver: 3.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" webkit_inspection_protocol: 1.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" yaml: 3.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
# PUBSPEC CHECKSUM: 60201234567# Image List
An example that sets up a local HTTP server for serving oneimage then creates a single flutter widget with five copies of requestedimage and prints how long the loading took.
This is used in [$FH/flutter/devicelab/bin/tasks/image_list_reported_duration.dart] test.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196# Generated by pub# See https://dart.dev/tools/pub/glossary#lockfilepackages: async: dependency: "direct dev" description: name: async sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" url: "https://pub.dev" source: hosted version: "2.11.0" boolean_selector: dependency: "direct dev" description: name: boolean_selector sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" url: "https://pub.dev" source: hosted version: "2.1.1" characters: dependency: "direct main" description: name: characters sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" url: "https://pub.dev" source: hosted version: "1.3.0" clock: dependency: "direct dev" description: name: clock sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf url: "https://pub.dev" source: hosted version: "1.1.1" collection: dependency: "direct main" description: name: collection sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a url: "https://pub.dev" source: hosted version: "1.18.0" cupertino_icons: dependency: "direct main" description: name: cupertino_icons sha256: d57953e10f9f8327ce64a508a355f0b1ec902193f66288e8cb5070e7c47eeb2d url: "https://pub.dev" source: hosted version: "1.0.6" fake_async: dependency: "direct dev" description: name: fake_async sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" url: "https://pub.dev" source: hosted version: "1.3.1" flutter: dependency: "direct main" description: flutter source: sdk version: "0.0.0" flutter_test: dependency: "direct dev" description: flutter source: sdk version: "0.0.0" leak_tracker: dependency: "direct dev" description: name: leak_tracker sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" url: "https://pub.dev" source: hosted version: "10.0.0" leak_tracker_flutter_testing: dependency: "direct dev" description: name: leak_tracker_flutter_testing sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 url: "https://pub.dev" source: hosted version: "2.0.1" leak_tracker_testing: dependency: "direct dev" description: name: leak_tracker_testing sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 url: "https://pub.dev" source: hosted version: "2.0.1" matcher: dependency: "direct dev" description: name: matcher sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted version: "0.12.16+1" material_color_utilities: dependency: "direct main" description: name: material_color_utilities sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted version: "0.8.0" meta: dependency: "direct main" description: name: meta sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 url: "https://pub.dev" source: hosted version: "1.11.0" path: dependency: "direct dev" description: name: path sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted version: "1.9.0" sky_engine: dependency: transitive description: flutter source: sdk version: "0.0.99" source_span: dependency: "direct dev" description: name: source_span sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" url: "https://pub.dev" source: hosted version: "1.10.0" stack_trace: dependency: "direct dev" description: name: stack_trace sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" url: "https://pub.dev" source: hosted version: "1.11.1" stream_channel: dependency: "direct dev" description: name: stream_channel sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 url: "https://pub.dev" source: hosted version: "2.1.2" string_scanner: dependency: "direct dev" description: name: string_scanner sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" url: "https://pub.dev" source: hosted version: "1.2.0" term_glyph: dependency: "direct dev" description: name: term_glyph sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 url: "https://pub.dev" source: hosted version: "1.2.1" test_api: dependency: "direct dev" description: name: test_api sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" url: "https://pub.dev" source: hosted version: "0.6.1" vector_math: dependency: "direct main" description: name: vector_math sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" url: "https://pub.dev" source: hosted version: "2.1.4" vm_service: dependency: "direct dev" description: name: vm_service sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 url: "https://pub.dev" source: hosted version: "13.0.0"sdks: dart: ">=3.2.0-0 <4.0.0"123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960name: image_listdescription: Simple Flutter project used for benchmarking image loading over network.
version: 1.0.0+1
environment: sdk: '>=3.2.0-0 <4.0.0'
dependencies: flutter: sdk: flutter
# The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: 1.0.6
characters: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" collection: 1.18.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" material_color_utilities: 0.8.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" meta: 1.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vector_math: 2.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
dev_dependencies: flutter_test: sdk: flutter
# For information on the generic Dart part of this file, see the# following page: https://dart.dev/tools/pub/pubspec
# The following section is specific to Flutter.
async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" clock: 1.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" fake_async: 1.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" leak_tracker: 10.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" leak_tracker_flutter_testing: 2.0.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" leak_tracker_testing: 2.0.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" matcher: 0.12.16+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" path: 1.9.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" source_span: 1.10.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" stack_trace: 1.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" stream_channel: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" string_scanner: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" term_glyph: 1.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" test_api: 0.6.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vm_service: 13.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
flutter:
# The following line ensures that the Material Icons font is # included with your application, so that you can use the icons in # the material Icons class. uses-material-design: true
# To add assets to your application, add an assets section, like this: assets: - images/coast.jpg
# PUBSPEC CHECKSUM: 58cb12345678910111213141516171819202122232425262728# Examples of Flutter's layered architecture
This directory contains several self-contained examples that illustrateFlutter's layered architecture.
* [*raw/*](raw/) These examples show how to program against the lowest layer of the system. They manually receive input packets and construct composited scenes.
* [*rendering/*](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/*](widgets/) These examples use Flutter's widgets to build more elaborate apps using a reactive framework.
* [*services/*](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.dartflutter run rendering/spinning_square.dartflutter run widgets/spinning_square.dart```12345678# This file is also used by dev/bots/analyze_snippet_code.dart to analyze code snippets (`{@tool snippet}` sections).
include: ../../analysis_options.yaml
linter: rules: # Samples want to print things pretty often. avoid_print: false123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051// Copyright 2014 The Flutter Authors. All rights reserved.// Use of this source code is governed by a BSD-style license that can be// found in the LICENSE file.
// This file is auto generated.// To update all the build.gradle files in the Flutter repo,// See dev/tools/bin/generate_gradle_lockfiles.dart.
buildscript { ext.kotlin_version = '1.5.31' repositories { google() mavenCentral() }
dependencies { classpath 'com.android.tools.build:gradle:7.2.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" }
configurations.classpath { resolutionStrategy.activateDependencyLocking() }}
allprojects { repositories { google() mavenCentral() }}
rootProject.buildDir = '../build'
subprojects { project.buildDir = "${rootProject.buildDir}/${project.name}"}subprojects { project.evaluationDependsOn(':app') dependencyLocking { ignoredDependencies.add('io.flutter:*') lockFile = file("${rootProject.projectDir}/project-${project.name}.lockfile") if (!project.hasProperty('local-engine-repo')) { lockAllConfigurations() } }}
tasks.register("clean", Delete) { delete rootProject.buildDir}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163# This is a Gradle generated file for dependency locking.# Manual edits can break the build and are not advised.# This file is expected to be part of source control.androidx.databinding:databinding-common:7.2.0=classpathandroidx.databinding:databinding-compiler-common:7.2.0=classpathcom.android.databinding:baseLibrary:7.2.0=classpathcom.android.tools.analytics-library:crash:30.2.0=classpathcom.android.tools.analytics-library:protos:30.2.0=classpathcom.android.tools.analytics-library:shared:30.2.0=classpathcom.android.tools.analytics-library:tracker:30.2.0=classpathcom.android.tools.build.jetifier:jetifier-core:1.0.0-beta09=classpathcom.android.tools.build.jetifier:jetifier-processor:1.0.0-beta09=classpathcom.android.tools.build:aapt2-proto:7.2.0-7984345=classpathcom.android.tools.build:aaptcompiler:7.2.0=classpathcom.android.tools.build:apksig:7.2.0=classpathcom.android.tools.build:apkzlib:7.2.0=classpathcom.android.tools.build:builder-model:7.2.0=classpathcom.android.tools.build:builder-test-api:7.2.0=classpathcom.android.tools.build:builder:7.2.0=classpathcom.android.tools.build:bundletool:1.8.2=classpathcom.android.tools.build:gradle-api:7.2.0=classpathcom.android.tools.build:gradle:7.2.0=classpathcom.android.tools.build:manifest-merger:30.2.0=classpathcom.android.tools.build:transform-api:2.0.0-deprecated-use-gradle-api=classpathcom.android.tools.ddms:ddmlib:30.2.0=classpathcom.android.tools.layoutlib:layoutlib-api:30.2.0=classpathcom.android.tools.lint:lint-model:30.2.0=classpathcom.android.tools.lint:lint-typedef-remover:30.2.0=classpathcom.android.tools.utp:android-device-provider-ddmlib-proto:30.2.0=classpathcom.android.tools.utp:android-device-provider-gradle-proto:30.2.0=classpathcom.android.tools.utp:android-test-plugin-host-additional-test-output-proto:30.2.0=classpathcom.android.tools.utp:android-test-plugin-host-coverage-proto:30.2.0=classpathcom.android.tools.utp:android-test-plugin-host-retention-proto:30.2.0=classpathcom.android.tools.utp:android-test-plugin-result-listener-gradle-proto:30.2.0=classpathcom.android.tools:annotations:30.2.0=classpathcom.android.tools:common:30.2.0=classpathcom.android.tools:dvlib:30.2.0=classpathcom.android.tools:repository:30.2.0=classpathcom.android.tools:sdk-common:30.2.0=classpathcom.android.tools:sdklib:30.2.0=classpathcom.android:signflinger:7.2.0=classpathcom.android:zipflinger:7.2.0=classpathcom.fasterxml.jackson.core:jackson-annotations:2.11.1=classpathcom.fasterxml.jackson.core:jackson-core:2.11.1=classpathcom.fasterxml.jackson.core:jackson-databind:2.11.1=classpathcom.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.11.1=classpathcom.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.11.1=classpathcom.fasterxml.jackson.module:jackson-module-kotlin:2.11.1=classpathcom.fasterxml.woodstox:woodstox-core:6.2.1=classpathcom.github.gundy:semver4j:0.16.4=classpathcom.google.android:annotations:4.1.1.4=classpathcom.google.api.grpc:proto-google-common-protos:1.12.0=classpathcom.google.auto.value:auto-value-annotations:1.6.2=classpathcom.google.code.findbugs:jsr305:3.0.2=classpathcom.google.code.gson:gson:2.8.6=classpathcom.google.crypto.tink:tink:1.3.0-rc2=classpathcom.google.dagger:dagger:2.28.3=classpathcom.google.errorprone:error_prone_annotations:2.3.4=classpathcom.google.flatbuffers:flatbuffers-java:1.12.0=classpathcom.google.guava:failureaccess:1.0.1=classpathcom.google.guava:guava:30.1-jre=classpathcom.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=classpathcom.google.j2objc:j2objc-annotations:1.3=classpathcom.google.jimfs:jimfs:1.1=classpathcom.google.protobuf:protobuf-java-util:3.10.0=classpathcom.google.protobuf:protobuf-java:3.10.0=classpathcom.google.testing.platform:core-proto:0.0.8-alpha07=classpathcom.googlecode.json-simple:json-simple:1.1=classpathcom.googlecode.juniversalchardet:juniversalchardet:1.0.3=classpathcom.squareup:javapoet:1.10.0=classpathcom.squareup:javawriter:2.5.0=classpathcom.sun.activation:javax.activation:1.2.0=classpathcom.sun.istack:istack-commons-runtime:3.0.8=classpathcom.sun.xml.fastinfoset:FastInfoset:1.2.16=classpathcommons-codec:commons-codec:1.11=classpathcommons-io:commons-io:2.4=classpathcommons-logging:commons-logging:1.2=classpathde.undercouch:gradle-download-task:4.1.1=classpathio.grpc:grpc-api:1.21.1=classpathio.grpc:grpc-context:1.21.1=classpathio.grpc:grpc-core:1.21.1=classpathio.grpc:grpc-netty:1.21.1=classpathio.grpc:grpc-protobuf-lite:1.21.1=classpathio.grpc:grpc-protobuf:1.21.1=classpathio.grpc:grpc-stub:1.21.1=classpathio.netty:netty-buffer:4.1.34.Final=classpathio.netty:netty-codec-http2:4.1.34.Final=classpathio.netty:netty-codec-http:4.1.34.Final=classpathio.netty:netty-codec-socks:4.1.34.Final=classpathio.netty:netty-codec:4.1.34.Final=classpathio.netty:netty-common:4.1.34.Final=classpathio.netty:netty-handler-proxy:4.1.34.Final=classpathio.netty:netty-handler:4.1.34.Final=classpathio.netty:netty-resolver:4.1.34.Final=classpathio.netty:netty-transport:4.1.34.Final=classpathio.opencensus:opencensus-api:0.21.0=classpathio.opencensus:opencensus-contrib-grpc-metrics:0.21.0=classpathit.unimi.dsi:fastutil:8.4.0=classpathjakarta.activation:jakarta.activation-api:1.2.1=classpathjakarta.xml.bind:jakarta.xml.bind-api:2.3.2=classpathjavax.inject:javax.inject:1=classpathnet.java.dev.jna:jna-platform:5.6.0=classpathnet.java.dev.jna:jna:5.6.0=classpathnet.sf.jopt-simple:jopt-simple:4.9=classpathnet.sf.kxml:kxml2:2.3.0=classpathorg.apache.commons:commons-compress:1.20=classpathorg.apache.httpcomponents:httpclient:4.5.9=classpathorg.apache.httpcomponents:httpcore:4.4.11=classpathorg.apache.httpcomponents:httpmime:4.5.6=classpathorg.bitbucket.b_c:jose4j:0.7.0=classpathorg.bouncycastle:bcpkix-jdk15on:1.56=classpathorg.bouncycastle:bcprov-jdk15on:1.56=classpathorg.checkerframework:checker-qual:3.5.0=classpathorg.codehaus.mojo:animal-sniffer-annotations:1.17=classpathorg.codehaus.woodstox:stax2-api:4.2.1=classpathorg.glassfish.jaxb:jaxb-runtime:2.3.2=classpathorg.glassfish.jaxb:txw2:2.3.2=classpathorg.jdom:jdom2:2.0.6=classpathorg.jetbrains.dokka:dokka-core:1.4.32=classpathorg.jetbrains.intellij.deps:trove4j:1.0.20181211=classpathorg.jetbrains.kotlin:kotlin-android-extensions:1.5.31=classpathorg.jetbrains.kotlin:kotlin-annotation-processing-gradle:1.5.31=classpathorg.jetbrains.kotlin:kotlin-build-common:1.5.31=classpathorg.jetbrains.kotlin:kotlin-compiler-embeddable:1.5.31=classpathorg.jetbrains.kotlin:kotlin-compiler-runner:1.5.31=classpathorg.jetbrains.kotlin:kotlin-daemon-client:1.5.31=classpathorg.jetbrains.kotlin:kotlin-daemon-embeddable:1.5.31=classpathorg.jetbrains.kotlin:kotlin-gradle-plugin-api:1.5.31=classpathorg.jetbrains.kotlin:kotlin-gradle-plugin-model:1.5.31=classpathorg.jetbrains.kotlin:kotlin-gradle-plugin:1.5.31=classpathorg.jetbrains.kotlin:kotlin-klib-commonizer-api:1.5.31=classpathorg.jetbrains.kotlin:kotlin-native-utils:1.5.31=classpathorg.jetbrains.kotlin:kotlin-project-model:1.5.31=classpathorg.jetbrains.kotlin:kotlin-reflect:1.5.31=classpathorg.jetbrains.kotlin:kotlin-scripting-common:1.5.31=classpathorg.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.5.31=classpathorg.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.5.31=classpathorg.jetbrains.kotlin:kotlin-scripting-jvm:1.5.31=classpathorg.jetbrains.kotlin:kotlin-stdlib-common:1.5.31=classpathorg.jetbrains.kotlin:kotlin-stdlib-jdk7:1.5.31=classpathorg.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.31=classpathorg.jetbrains.kotlin:kotlin-stdlib:1.5.31=classpathorg.jetbrains.kotlin:kotlin-tooling-metadata:1.5.31=classpathorg.jetbrains.kotlin:kotlin-util-io:1.5.31=classpathorg.jetbrains.kotlin:kotlin-util-klib:1.5.31=classpathorg.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.5.0=classpathorg.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0=classpathorg.jetbrains:annotations:13.0=classpathorg.jetbrains:markdown-jvm:0.2.1=classpathorg.jetbrains:markdown:0.2.1=classpathorg.json:json:20180813=classpathorg.jsoup:jsoup:1.13.1=classpathorg.jvnet.staxex:stax-ex:1.8.1=classpathorg.ow2.asm:asm-analysis:9.1=classpathorg.ow2.asm:asm-commons:9.1=classpathorg.ow2.asm:asm-tree:9.1=classpathorg.ow2.asm:asm-util:9.1=classpathorg.ow2.asm:asm:9.1=classpathorg.slf4j:slf4j-api:1.7.30=classpathorg.tensorflow:tensorflow-lite-metadata:0.1.0-rc2=classpathxerces:xercesImpl:2.12.0=classpathxml-apis:xml-apis:1.4.01=classpathempty=123org.gradle.jvmargs=-Xmx4Gandroid.useAndroidX=trueandroid.enableJetifier=true123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118# This is a Gradle generated file for dependency locking.# Manual edits can break the build and are not advised.# This file is expected to be part of source control.androidx.activity:activity:1.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspathandroidx.annotation:annotation-experimental:1.1.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspathandroidx.annotation:annotation:1.2.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspathandroidx.arch.core:core-common:2.1.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspathandroidx.arch.core:core-runtime:2.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspathandroidx.collection:collection:1.1.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspathandroidx.core:core:1.6.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspathandroidx.customview:customview:1.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspathandroidx.fragment:fragment:1.1.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspathandroidx.lifecycle:lifecycle-common-java8:2.2.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspathandroidx.lifecycle:lifecycle-common:2.2.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspathandroidx.lifecycle:lifecycle-livedata-core:2.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspathandroidx.lifecycle:lifecycle-livedata:2.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspathandroidx.lifecycle:lifecycle-runtime:2.2.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspathandroidx.lifecycle:lifecycle-viewmodel:2.1.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspathandroidx.loader:loader:1.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspathandroidx.savedstate:savedstate:1.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspathandroidx.tracing:tracing:1.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspathandroidx.versionedparcelable:versionedparcelable:1.1.1=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspathandroidx.viewpager:viewpager:1.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspathandroidx.window:window-java:1.0.0-beta04=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspathandroidx.window:window:1.0.0-beta04=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspathcom.android.tools.analytics-library:protos:27.1.3=lintClassPathcom.android.tools.analytics-library:shared:27.1.3=lintClassPathcom.android.tools.analytics-library:tracker:27.1.3=lintClassPathcom.android.tools.build:aapt2-proto:4.1.0-alpha01-6193524=lintClassPathcom.android.tools.build:aapt2:4.1.3-6503028=_internal_aapt2_binarycom.android.tools.build:apksig:4.1.3=lintClassPathcom.android.tools.build:apkzlib:4.1.3=lintClassPathcom.android.tools.build:builder-model:4.1.3=lintClassPathcom.android.tools.build:builder-test-api:4.1.3=lintClassPathcom.android.tools.build:builder:4.1.3=lintClassPathcom.android.tools.build:gradle-api:4.1.3=lintClassPathcom.android.tools.build:manifest-merger:27.1.3=lintClassPathcom.android.tools.ddms:ddmlib:27.1.3=lintClassPathcom.android.tools.external.com-intellij:intellij-core:27.1.3=lintClassPathcom.android.tools.external.com-intellij:kotlin-compiler:27.1.3=lintClassPathcom.android.tools.external.org-jetbrains:uast:27.1.3=lintClassPathcom.android.tools.layoutlib:layoutlib-api:27.1.3=lintClassPathcom.android.tools.lint:lint-api:27.1.3=lintClassPathcom.android.tools.lint:lint-checks:27.1.3=lintClassPathcom.android.tools.lint:lint-gradle-api:27.1.3=lintClassPathcom.android.tools.lint:lint-gradle:27.1.3=lintClassPathcom.android.tools.lint:lint-model:27.1.3=lintClassPathcom.android.tools.lint:lint:27.1.3=lintClassPathcom.android.tools:annotations:27.1.3=lintClassPathcom.android.tools:common:27.1.3=lintClassPathcom.android.tools:dvlib:27.1.3=lintClassPathcom.android.tools:repository:27.1.3=lintClassPathcom.android.tools:sdk-common:27.1.3=lintClassPathcom.android.tools:sdklib:27.1.3=lintClassPathcom.android:signflinger:4.1.3=lintClassPathcom.android:zipflinger:4.1.3=lintClassPathcom.google.code.findbugs:jsr305:3.0.2=lintClassPathcom.google.code.gson:gson:2.8.5=lintClassPathcom.google.errorprone:error_prone_annotations:2.3.2=lintClassPathcom.google.guava:failureaccess:1.0.1=lintClassPathcom.google.guava:guava:28.1-jre=lintClassPathcom.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=lintClassPathcom.google.j2objc:j2objc-annotations:1.3=lintClassPathcom.google.jimfs:jimfs:1.1=lintClassPathcom.google.protobuf:protobuf-java:3.10.0=lintClassPathcom.googlecode.json-simple:json-simple:1.1=lintClassPathcom.squareup:javawriter:2.5.0=lintClassPathcom.sun.activation:javax.activation:1.2.0=lintClassPathcom.sun.istack:istack-commons-runtime:3.0.7=lintClassPathcom.sun.xml.fastinfoset:FastInfoset:1.2.15=lintClassPathcommons-codec:commons-codec:1.10=lintClassPathcommons-logging:commons-logging:1.2=lintClassPathit.unimi.dsi:fastutil:7.2.0=lintClassPathjavax.activation:javax.activation-api:1.2.0=lintClassPathjavax.inject:javax.inject:1=lintClassPathjavax.xml.bind:jaxb-api:2.3.1=lintClassPathnet.sf.jopt-simple:jopt-simple:4.9=lintClassPathnet.sf.kxml:kxml2:2.3.0=lintClassPathorg.apache.commons:commons-compress:1.12=lintClassPathorg.apache.httpcomponents:httpclient:4.5.6=lintClassPathorg.apache.httpcomponents:httpcore:4.4.10=lintClassPathorg.apache.httpcomponents:httpmime:4.5.6=lintClassPathorg.bouncycastle:bcpkix-jdk15on:1.56=lintClassPathorg.bouncycastle:bcprov-jdk15on:1.56=lintClassPathorg.checkerframework:checker-qual:2.8.1=lintClassPathorg.codehaus.groovy:groovy-all:2.4.15=lintClassPathorg.codehaus.mojo:animal-sniffer-annotations:1.18=lintClassPathorg.glassfish.jaxb:jaxb-runtime:2.3.1=lintClassPathorg.glassfish.jaxb:txw2:2.3.1=lintClassPathorg.jacoco:org.jacoco.agent:0.8.7=androidJacocoAntorg.jacoco:org.jacoco.ant:0.8.7=androidJacocoAntorg.jacoco:org.jacoco.core:0.8.7=androidJacocoAntorg.jacoco:org.jacoco.report:0.8.7=androidJacocoAntorg.jetbrains.kotlin:kotlin-reflect:1.3.72=lintClassPathorg.jetbrains.kotlin:kotlin-stdlib-common:1.3.72=lintClassPathorg.jetbrains.kotlin:kotlin-stdlib-common:1.5.31=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspathorg.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.72=lintClassPathorg.jetbrains.kotlin:kotlin-stdlib-jdk7:1.5.30=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspathorg.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.72=lintClassPathorg.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.30=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspathorg.jetbrains.kotlin:kotlin-stdlib:1.3.72=lintClassPathorg.jetbrains.kotlin:kotlin-stdlib:1.5.31=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspathorg.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspathorg.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.5.2=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspathorg.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspathorg.jetbrains.trove4j:trove4j:20160824=lintClassPathorg.jetbrains:annotations:13.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,lintClassPath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspathorg.jvnet.staxex:stax-ex:1.8=lintClassPathorg.ow2.asm:asm-analysis:7.0=lintClassPathorg.ow2.asm:asm-analysis:9.1=androidJacocoAntorg.ow2.asm:asm-commons:7.0=lintClassPathorg.ow2.asm:asm-commons:9.1=androidJacocoAntorg.ow2.asm:asm-tree:7.0=lintClassPathorg.ow2.asm:asm-tree:9.1=androidJacocoAntorg.ow2.asm:asm-util:7.0=lintClassPathorg.ow2.asm:asm:7.0=lintClassPathorg.ow2.asm:asm:9.1=androidJacocoAntempty=androidApis,androidJdkImage,androidTestUtil,compile,coreLibraryDesugaring,debugAndroidTestAnnotationProcessorClasspath,debugAndroidTestRuntimeClasspath,debugAnnotationProcessorClasspath,debugReverseMetadataValues,debugUnitTestAnnotationProcessorClasspath,debugWearBundling,lintChecks,lintPublish,profileAnnotationProcessorClasspath,profileReverseMetadataValues,profileUnitTestAnnotationProcessorClasspath,profileWearBundling,releaseAnnotationProcessorClasspath,releaseReverseMetadataValues,releaseUnitTestAnnotationProcessorClasspath,releaseWearBundling,testCompile123456789101112131415161718192021// Copyright 2014 The Flutter Authors. All rights reserved.// Use of this source code is governed by a BSD-style license that can be// found in the LICENSE file.
// This file is auto generated.// To update all the settings.gradle files in the Flutter repo,// See dev/tools/bin/generate_gradle_lockfiles.dart.
include ':app'
enableFeaturePreview('ONE_LOCKFILE_PER_PROJECT')
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")def properties = new Properties()
assert localPropertiesFile.exists()localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
def flutterSdkPath = properties.getProperty("flutter.sdk")assert flutterSdkPath != null, "flutter.sdk not set in local.properties"apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"1234567891011121314<?xml version="1.0" encoding="UTF-8"?><module type="WEB_MODULE" version="4"> <component name="NewModuleRootManager" inherit-compiler-output="true"> <exclude-output /> <content url="file://$MODULE_DIR$"> <excludeFolder url="file://$MODULE_DIR$/.idea" /> <excludeFolder url="file://$MODULE_DIR$/build" /> </content> <orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="library" name="Dart SDK" level="project" /> <orderEntry type="library" name="Dart Packages" level="project" /> <orderEntry type="library" name="Flutter Plugins" level="project" /> </component></module>12345678910111213141516// Copyright 2014 The Flutter Authors. All rights reserved.// Use of this source code is governed by a BSD-style license that can be// found in the LICENSE file.
import 'package:flutter/widgets.dart';
void main() { runApp( const Center( child: Text( 'Instead run:\nflutter run xxx/yyy.dart', textDirection: TextDirection.ltr, ), ), );}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139# Project-level configuration.cmake_minimum_required(VERSION 3.10)project(runner LANGUAGES CXX)
# The name of the executable created for the application. Change this to change# the on-disk name of your application.set(BINARY_NAME "layers")# The unique GTK application identifier for this application. See:# https://wiki.gnome.org/HowDoI/ChooseApplicationIDset(APPLICATION_ID "io.flutter.examples.layers")
# Explicitly opt in to modern CMake behaviors to avoid warnings with recent# versions of CMake.cmake_policy(SET CMP0063 NEW)
# Load bundled libraries from the lib/ directory relative to the binary.set(CMAKE_INSTALL_RPATH "$ORIGIN/lib")
# Root filesystem for cross-building.if(FLUTTER_TARGET_PLATFORM_SYSROOT) set(CMAKE_SYSROOT ${FLUTTER_TARGET_PLATFORM_SYSROOT}) set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT}) set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)endif()
# Define build configuration options.if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Flutter build mode" FORCE) set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Profile" "Release")endif()
# Compilation settings that should be applied to most targets.## Be cautious about adding new options here, as plugins use this function by# default. In most cases, you should add new options to specific targets instead# of modifying this function.function(APPLY_STANDARD_SETTINGS TARGET) target_compile_features(${TARGET} PUBLIC cxx_std_14) target_compile_options(${TARGET} PRIVATE -Wall -Werror) target_compile_options(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:-O3>") target_compile_definitions(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:NDEBUG>")endfunction()
# Flutter library and tool build rules.set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter")add_subdirectory(${FLUTTER_MANAGED_DIR})
# System-level dependencies.find_package(PkgConfig REQUIRED)pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}")
# Define the application target. To change its name, change BINARY_NAME above,# not the value here, or `flutter run` will no longer work.## Any new source files that you add to the application should be added here.add_executable(${BINARY_NAME} "main.cc" "my_application.cc" "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc")
# Apply the standard set of build settings. This can be removed for applications# that need different build settings.apply_standard_settings(${BINARY_NAME})
# Add dependency libraries. Add any application-specific dependencies here.target_link_libraries(${BINARY_NAME} PRIVATE flutter)target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK)
# Run the Flutter tool portions of the build. This must not be removed.add_dependencies(${BINARY_NAME} flutter_assemble)
# Only the install-generated bundle's copy of the executable will launch# correctly, since the resources must in the right relative locations. To avoid# people trying to run the unbundled copy, put it in a subdirectory instead of# the default top-level location.set_target_properties(${BINARY_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/intermediates_do_not_run")
# Generated plugin build rules, which manage building the plugins and adding# them to the application.include(flutter/generated_plugins.cmake)
# === Installation ===# By default, "installing" just makes a relocatable bundle in the build# directory.set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle")if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE)endif()
# Start with a clean build bundle directory every time.install(CODE " file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\") " COMPONENT Runtime)
set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data")set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib")
install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" COMPONENT Runtime)
install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime)
install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" COMPONENT Runtime)
foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES}) install(FILES "${bundled_library}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" COMPONENT Runtime)endforeach(bundled_library)
# Fully re-copy the assets directory on each build to avoid having stale files# from a previous install.set(FLUTTER_ASSET_DIR_NAME "flutter_assets")install(CODE " file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") " COMPONENT Runtime)install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime)
# Install the AOT library on non-Debug builds only.if(NOT CMAKE_BUILD_TYPE MATCHES "Debug") install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" COMPONENT Runtime)endif()12345678910// Copyright 2014 The Flutter Authors. All rights reserved.// Use of this source code is governed by a BSD-style license that can be// found in the LICENSE file.
#include "my_application.h"
int main(int argc, char** argv) { g_autoptr(MyApplication) app = my_application_new(); return g_application_run(G_APPLICATION(app), argc, argv);}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108// Copyright 2014 The Flutter Authors. All rights reserved.// Use of this source code is governed by a BSD-style license that can be// found in the LICENSE file.
#include "my_application.h"
#include <flutter_linux/flutter_linux.h>#ifdef GDK_WINDOWING_X11#include <gdk/gdkx.h>#endif
#include "flutter/generated_plugin_registrant.h"
struct _MyApplication { GtkApplication parent_instance; char** dart_entrypoint_arguments;};
G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION)
// Implements GApplication::activate.static void my_application_activate(GApplication* application) { MyApplication* self = MY_APPLICATION(application); GtkWindow* window = GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application)));
// Use a header bar when running in GNOME as this is the common style used // by applications and is the setup most users will be using (e.g. Ubuntu // desktop). // If running on X and not using GNOME then just use a traditional title bar // in case the window manager does more exotic layout, e.g. tiling. // If running on Wayland assume the header bar will work (may need changing // if future cases occur). gboolean use_header_bar = TRUE;#ifdef GDK_WINDOWING_X11 GdkScreen* screen = gtk_window_get_screen(window); if (GDK_IS_X11_SCREEN(screen)) { const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen); if (g_strcmp0(wm_name, "GNOME Shell") != 0) { use_header_bar = FALSE; } }#endif if (use_header_bar) { GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new()); gtk_widget_show(GTK_WIDGET(header_bar)); gtk_header_bar_set_title(header_bar, "layers"); gtk_header_bar_set_show_close_button(header_bar, TRUE); gtk_window_set_titlebar(window, GTK_WIDGET(header_bar)); } else { gtk_window_set_title(window, "layers"); }
gtk_window_set_default_size(window, 1280, 720); gtk_widget_show(GTK_WIDGET(window));
g_autoptr(FlDartProject) project = fl_dart_project_new(); fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments);
FlView* view = fl_view_new(project); gtk_widget_show(GTK_WIDGET(view)); gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view));
fl_register_plugins(FL_PLUGIN_REGISTRY(view));
gtk_widget_grab_focus(GTK_WIDGET(view));}
// Implements GApplication::local_command_line.static gboolean my_application_local_command_line(GApplication* application, gchar*** arguments, int* exit_status) { MyApplication* self = MY_APPLICATION(application); // Strip out the first argument as it is the binary name. self->dart_entrypoint_arguments = g_strdupv(*arguments + 1);
g_autoptr(GError) error = nullptr; if (!g_application_register(application, nullptr, &error)) { g_warning("Failed to register: %s", error->message); *exit_status = 1; return TRUE; }
g_application_activate(application); *exit_status = 0;
return TRUE;}
// Implements GObject::dispose.static void my_application_dispose(GObject* object) { MyApplication* self = MY_APPLICATION(object); g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev); G_OBJECT_CLASS(my_application_parent_class)->dispose(object);}
static void my_application_class_init(MyApplicationClass* klass) { G_APPLICATION_CLASS(klass)->activate = my_application_activate; G_APPLICATION_CLASS(klass)->local_command_line = my_application_local_command_line; G_OBJECT_CLASS(klass)->dispose = my_application_dispose;}
static void my_application_init(MyApplication* self) {}
MyApplication* my_application_new() { return MY_APPLICATION(g_object_new(my_application_get_type(), "application-id", APPLICATION_ID, "flags", G_APPLICATION_NON_UNIQUE, nullptr));}12345678910111213141516171819202122// Copyright 2014 The Flutter Authors. All rights reserved.// Use of this source code is governed by a BSD-style license that can be// found in the LICENSE file.
#ifndef FLUTTER_MY_APPLICATION_H_#define FLUTTER_MY_APPLICATION_H_
#include <gtk/gtk.h>
G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION, GtkApplication)
/** * my_application_new: * * Creates a new Flutter-based application. * * Returns: a new #MyApplication. */MyApplication* my_application_new();
#endif // FLUTTER_MY_APPLICATION_H_123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188# Generated by pub# See https://dart.dev/tools/pub/glossary#lockfilepackages: async: dependency: "direct dev" description: name: async sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" url: "https://pub.dev" source: hosted version: "2.11.0" boolean_selector: dependency: "direct dev" description: name: boolean_selector sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" url: "https://pub.dev" source: hosted version: "2.1.1" characters: dependency: "direct main" description: name: characters sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" url: "https://pub.dev" source: hosted version: "1.3.0" clock: dependency: "direct dev" description: name: clock sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf url: "https://pub.dev" source: hosted version: "1.1.1" collection: dependency: "direct main" description: name: collection sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a url: "https://pub.dev" source: hosted version: "1.18.0" fake_async: dependency: "direct dev" description: name: fake_async sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" url: "https://pub.dev" source: hosted version: "1.3.1" flutter: dependency: "direct main" description: flutter source: sdk version: "0.0.0" flutter_test: dependency: "direct dev" description: flutter source: sdk version: "0.0.0" leak_tracker: dependency: "direct dev" description: name: leak_tracker sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" url: "https://pub.dev" source: hosted version: "10.0.0" leak_tracker_flutter_testing: dependency: "direct dev" description: name: leak_tracker_flutter_testing sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 url: "https://pub.dev" source: hosted version: "2.0.1" leak_tracker_testing: dependency: "direct dev" description: name: leak_tracker_testing sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 url: "https://pub.dev" source: hosted version: "2.0.1" matcher: dependency: "direct dev" description: name: matcher sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted version: "0.12.16+1" material_color_utilities: dependency: "direct main" description: name: material_color_utilities sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted version: "0.8.0" meta: dependency: "direct main" description: name: meta sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 url: "https://pub.dev" source: hosted version: "1.11.0" path: dependency: "direct dev" description: name: path sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted version: "1.9.0" sky_engine: dependency: transitive description: flutter source: sdk version: "0.0.99" source_span: dependency: "direct dev" description: name: source_span sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" url: "https://pub.dev" source: hosted version: "1.10.0" stack_trace: dependency: "direct dev" description: name: stack_trace sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" url: "https://pub.dev" source: hosted version: "1.11.1" stream_channel: dependency: "direct dev" description: name: stream_channel sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 url: "https://pub.dev" source: hosted version: "2.1.2" string_scanner: dependency: "direct dev" description: name: string_scanner sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" url: "https://pub.dev" source: hosted version: "1.2.0" term_glyph: dependency: "direct dev" description: name: term_glyph sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 url: "https://pub.dev" source: hosted version: "1.2.1" test_api: dependency: "direct dev" description: name: test_api sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" url: "https://pub.dev" source: hosted version: "0.6.1" vector_math: dependency: "direct main" description: name: vector_math sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" url: "https://pub.dev" source: hosted version: "2.1.4" vm_service: dependency: "direct dev" description: name: vm_service sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 url: "https://pub.dev" source: hosted version: "13.0.0"sdks: dart: ">=3.2.0-0 <4.0.0"123456789101112131415161718192021222324252627282930313233343536373839404142name: flutter_examples_layers
environment: sdk: '>=3.2.0-0 <4.0.0'
dependencies: flutter: sdk: flutter
characters: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" collection: 1.18.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" material_color_utilities: 0.8.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" meta: 1.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vector_math: 2.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
dev_dependencies: flutter_test: sdk: flutter
async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" clock: 1.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" fake_async: 1.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" leak_tracker: 10.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" leak_tracker_flutter_testing: 2.0.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" leak_tracker_testing: 2.0.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" matcher: 0.12.16+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" path: 1.9.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" source_span: 1.10.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" stack_trace: 1.11.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" stream_channel: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" string_scanner: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" term_glyph: 1.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" test_api: 0.6.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vm_service: 13.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
flutter: assets: - services/data.json uses-material-design: true
# PUBSPEC CHECKSUM: 8023123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135// Copyright 2014 The Flutter Authors. All rights reserved.// Use of this source code is governed by a BSD-style license that can be// found in the LICENSE file.
// This example shows how to use the ui.Canvas interface to draw various shapes// with gradients and transforms.
import 'dart:math' as math;import 'dart:typed_data';import 'dart:ui' as ui;
// The FlutterView into which this example will draw; set in the main method.late final ui.FlutterView view;
ui.Picture paint(ui.Rect paintBounds) { // First we create a PictureRecorder to record the commands we're going to // feed in the canvas. The PictureRecorder will eventually produce a Picture, // which is an immutable record of those commands. final ui.PictureRecorder recorder = ui.PictureRecorder();
// Next, we create a canvas from the recorder. The canvas is an interface // which can receive drawing commands. The canvas interface is modeled after // the SkCanvas interface from Skia. The paintBounds establishes a "cull rect" // for the canvas, which lets the implementation discard any commands that // are entirely outside this rectangle. final ui.Canvas canvas = ui.Canvas(recorder, paintBounds);
final ui.Paint paint = ui.Paint(); canvas.drawPaint(ui.Paint()..color = const ui.Color(0xFFFFFFFF));
final ui.Size size = paintBounds.size; final ui.Offset mid = size.center(ui.Offset.zero); final double radius = size.shortestSide / 2.0;
final double devicePixelRatio = view.devicePixelRatio; final ui.Size logicalSize = view.physicalSize / devicePixelRatio;
// Saves a copy of current transform onto the save stack. canvas.save();
// Transforms that occur after this point apply only to the // yellow-bluish rectangle.
// This line will cause the transform to shift entirely outside the paint // boundaries, which will cause the canvas interface to discard its // commands. Comment it out to see it on screen. canvas.translate(-mid.dx / 2.0, logicalSize.height * 2.0);
// Clips the current transform. canvas.clipRect( ui.Rect.fromLTRB(0, radius + 50, logicalSize.width, logicalSize.height), clipOp: ui.ClipOp.difference, );
// Shifts the coordinate space of and rotates the current transform. canvas.translate(mid.dx, mid.dy); canvas.rotate(math.pi/4);
final ui.Gradient yellowBlue = ui.Gradient.linear( ui.Offset(-radius, -radius), ui.Offset.zero, <ui.Color>[const ui.Color(0xFFFFFF00), const ui.Color(0xFF0000FF)], );
// Draws a yellow-bluish rectangle. canvas.drawRect( ui.Rect.fromLTRB(-radius, -radius, radius, radius), ui.Paint()..shader = yellowBlue, );
// Transforms that occur after this point apply only to the // yellow circle.
// Scale x and y by 0.5. final Float64List scaleMatrix = Float64List.fromList(<double>[ 0.5, 0.0, 0.0, 0.0, 0.0, 0.5, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, ]); canvas.transform(scaleMatrix);
// Sets paint to transparent yellow. paint.color = const ui.Color.fromARGB(128, 0, 255, 0);
// Draws a transparent yellow circle. canvas.drawCircle(ui.Offset.zero, radius, paint);
// Restores the transform from before `save` was called. canvas.restore();
// Sets paint to transparent red. paint.color = const ui.Color.fromARGB(128, 255, 0, 0);
// This circle is drawn on top of the previous layer that contains // the rectangle and smaller circle. canvas.drawCircle(const ui.Offset(150.0, 300.0), radius, paint);
// When we're done issuing painting commands, we end the recording and receive // a Picture, which is an immutable record of the commands we've issued. You // can draw a Picture into another canvas or include it as part of a // composited scene. return recorder.endRecording();}
ui.Scene composite(ui.Picture picture, ui.Rect paintBounds) { final double devicePixelRatio = view.devicePixelRatio; final Float64List deviceTransform = Float64List(16) ..[0] = devicePixelRatio ..[5] = devicePixelRatio ..[10] = 1.0 ..[15] = 1.0; final ui.SceneBuilder sceneBuilder = ui.SceneBuilder() ..pushTransform(deviceTransform) ..addPicture(ui.Offset.zero, picture) ..pop(); return sceneBuilder.build();}
void beginFrame(Duration timeStamp) { final ui.Rect paintBounds = ui.Offset.zero & (view.physicalSize / view.devicePixelRatio); final ui.Picture picture = paint(paintBounds); final ui.Scene scene = composite(picture, paintBounds); view.render(scene);}
void main() { // TODO(goderbauer): Create a window if embedder doesn't provide an implicit view to draw into. assert(ui.PlatformDispatcher.instance.implicitView != null); view = ui.PlatformDispatcher.instance.implicitView!;
ui.PlatformDispatcher.instance ..onBeginFrame = beginFrame ..scheduleFrame();}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657// Copyright 2014 The Flutter Authors. All rights reserved.// Use of this source code is governed by a BSD-style license that can be// found in the LICENSE file.
// This example shows how to show the text 'Hello, world.' using the raw// interface to the engine.
import 'dart:ui' as ui;
// The FlutterView into which this example will draw; set in the main method.late final ui.FlutterView view;
void beginFrame(Duration timeStamp) { final double devicePixelRatio = view.devicePixelRatio; final ui.Size logicalSize = view.physicalSize / devicePixelRatio;
final ui.ParagraphBuilder paragraphBuilder = ui.ParagraphBuilder( ui.ParagraphStyle(textDirection: ui.TextDirection.ltr), ) ..addText('Hello, world.'); final ui.Paragraph paragraph = paragraphBuilder.build() ..layout(ui.ParagraphConstraints(width: logicalSize.width));
final ui.Rect physicalBounds = ui.Offset.zero & (logicalSize * devicePixelRatio); final ui.PictureRecorder recorder = ui.PictureRecorder(); final ui.Canvas canvas = ui.Canvas(recorder, physicalBounds); canvas.scale(devicePixelRatio, devicePixelRatio); canvas.drawParagraph(paragraph, ui.Offset( (logicalSize.width - paragraph.maxIntrinsicWidth) / 2.0, (logicalSize.height - paragraph.height) / 2.0, )); final ui.Picture picture = recorder.endRecording();
final ui.SceneBuilder sceneBuilder = ui.SceneBuilder() // TODO(abarth): We should be able to add a picture without pushing a // container layer first. ..pushClipRect(physicalBounds) ..addPicture(ui.Offset.zero, picture) ..pop();
view.render(sceneBuilder.build());}
// This function is the primary entry point to your application. The engine// calls main() as soon as it has loaded your code.void main() { // TODO(goderbauer): Create a window if embedder doesn't provide an implicit view to draw into. assert(ui.PlatformDispatcher.instance.implicitView != null); view = ui.PlatformDispatcher.instance.implicitView!;
// The engine calls onBeginFrame whenever it wants us to produce a frame. ui.PlatformDispatcher.instance.onBeginFrame = beginFrame; // Here we kick off the whole process by asking the engine to schedule a new // frame. The engine will eventually call onBeginFrame when it is time for us // to actually produce the frame. ui.PlatformDispatcher.instance.scheduleFrame();}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869// Copyright 2014 The Flutter Authors. All rights reserved.// Use of this source code is governed by a BSD-style license that can be// found in the LICENSE file.
// This example shows how to perform a simple animation using the raw interface// to the engine.
import 'dart:math' as math;import 'dart:typed_data';import 'dart:ui' as ui;
// The FlutterView into which this example will draw; set in the main method.late final ui.FlutterView view;
void beginFrame(Duration timeStamp) { // The timeStamp argument to beginFrame indicates the timing information we // should use to clock our animations. It's important to use timeStamp rather // than reading the system time because we want all the parts of the system to // coordinate the timings of their animations. If each component read the // system clock independently, the animations that we processed later would be // slightly ahead of the animations we processed earlier.
// PAINT
final ui.Rect paintBounds = ui.Offset.zero & (view.physicalSize / view.devicePixelRatio); final ui.PictureRecorder recorder = ui.PictureRecorder(); final ui.Canvas canvas = ui.Canvas(recorder, paintBounds); canvas.translate(paintBounds.width / 2.0, paintBounds.height / 2.0);
// Here we determine the rotation according to the timeStamp given to us by // the engine. final double t = timeStamp.inMicroseconds / Duration.microsecondsPerMillisecond / 1800.0; canvas.rotate(math.pi * (t % 1.0));
canvas.drawRect( const ui.Rect.fromLTRB(-100.0, -100.0, 100.0, 100.0), ui.Paint()..color = const ui.Color.fromARGB(255, 0, 255, 0), ); final ui.Picture picture = recorder.endRecording();
// COMPOSITE
final double devicePixelRatio = view.devicePixelRatio; final Float64List deviceTransform = Float64List(16) ..[0] = devicePixelRatio ..[5] = devicePixelRatio ..[10] = 1.0 ..[15] = 1.0; final ui.SceneBuilder sceneBuilder = ui.SceneBuilder() ..pushTransform(deviceTransform) ..addPicture(ui.Offset.zero, picture) ..pop(); view.render(sceneBuilder.build());
// After rendering the current frame of the animation, we ask the engine to // schedule another frame. The engine will call beginFrame again when its time // to produce the next frame. ui.PlatformDispatcher.instance.scheduleFrame();}
void main() { // TODO(goderbauer): Create a window if embedder doesn't provide an implicit view to draw into. assert(ui.PlatformDispatcher.instance.implicitView != null); view = ui.PlatformDispatcher.instance.implicitView!;
ui.PlatformDispatcher.instance ..onBeginFrame = beginFrame ..scheduleFrame();}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102// Copyright 2014 The Flutter Authors. All rights reserved.// Use of this source code is governed by a BSD-style license that can be// found in the LICENSE file.
// This example shows how to draw some bi-directional text using the raw// interface to the engine.
import 'dart:typed_data';import 'dart:ui' as ui;
// The FlutterView into which this example will draw; set in the main method.late final ui.FlutterView view;
// A paragraph represents a rectangular region that contains some text.late ui.Paragraph paragraph;
ui.Picture paint(ui.Rect paintBounds) { final ui.PictureRecorder recorder = ui.PictureRecorder(); final ui.Canvas canvas = ui.Canvas(recorder, paintBounds);
final double devicePixelRatio = view.devicePixelRatio; final ui.Size logicalSize = view.physicalSize / devicePixelRatio;
canvas.translate(logicalSize.width / 2.0, logicalSize.height / 2.0); canvas.drawRect( const ui.Rect.fromLTRB(-100.0, -100.0, 100.0, 100.0), ui.Paint()..color = const ui.Color.fromARGB(255, 0, 255, 0), );
// The paint method of Paragraph draws the contents of the paragraph onto the // given canvas. canvas.drawParagraph(paragraph, ui.Offset(-paragraph.width / 2.0, (paragraph.width / 2.0) - 125.0));
return recorder.endRecording();}
ui.Scene composite(ui.Picture picture, ui.Rect paintBounds) { final double devicePixelRatio = view.devicePixelRatio; final Float64List deviceTransform = Float64List(16) ..[0] = devicePixelRatio ..[5] = devicePixelRatio ..[10] = 1.0 ..[15] = 1.0; final ui.SceneBuilder sceneBuilder = ui.SceneBuilder() ..pushTransform(deviceTransform) ..addPicture(ui.Offset.zero, picture) ..pop(); return sceneBuilder.build();}
void beginFrame(Duration timeStamp) { final ui.Rect paintBounds = ui.Offset.zero & (view.physicalSize / view.devicePixelRatio); final ui.Picture picture = paint(paintBounds); final ui.Scene scene = composite(picture, paintBounds); view.render(scene);}
void main() { // TODO(goderbauer): Create a window if embedder doesn't provide an implicit view to draw into. assert(ui.PlatformDispatcher.instance.implicitView != null); view = ui.PlatformDispatcher.instance.implicitView!;
// To create a paragraph of text, we use ParagraphBuilder. final ui.ParagraphBuilder builder = ui.ParagraphBuilder( // The text below has a primary direction of left-to-right. // The embedded text has other directions. // If this was TextDirection.rtl, the "Hello, world" text would end up on // the other side of the right-to-left text. ui.ParagraphStyle(textDirection: ui.TextDirection.ltr), ) // We first push a style that turns the text blue. ..pushStyle(ui.TextStyle(color: const ui.Color(0xFF0000FF))) ..addText('Hello, ') // The next run of text will be bold. ..pushStyle(ui.TextStyle(fontWeight: ui.FontWeight.bold)) ..addText('world. ') // The pop() command signals the end of the bold styling. ..pop() // We add text to the paragraph in logical order. The paragraph object // understands bi-directional text and will compute the visual ordering // during layout. ..addText('هذا هو قليلا طويلة من النص الذي يجب التفاف .') // The second pop() removes the blue color. ..pop() // We can add more text with the default styling. ..addText(' و أكثر قليلا لجعله أطول. ') ..addText('สวัสดี'); // When we're done adding styles and text, we build the Paragraph object, at // which time we can apply styling that affects the entire paragraph, such as // left, right, or center alignment. Once built, the contents of the paragraph // cannot be altered, but sizing and positioning information can be updated. paragraph = builder.build() // Next, we supply a width that the text is permitted to occupy and we ask // the paragraph to the visual position of each its glyphs as well as its // overall size, subject to its sizing constraints. ..layout(const ui.ParagraphConstraints(width: 180.0));
// Finally, we register our beginFrame callback and kick off the first frame. ui.PlatformDispatcher.instance ..onBeginFrame = beginFrame ..scheduleFrame();}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122// Copyright 2014 The Flutter Authors. All rights reserved.// Use of this source code is governed by a BSD-style license that can be// found in the LICENSE file.
// This example shows how to put some pixels on the screen using the raw// interface to the engine.
import 'dart:typed_data';import 'dart:ui' as ui;
// The FlutterView into which this example will draw; set in the main method.late final ui.FlutterView view;
late ui.Color color;
ui.Picture paint(ui.Rect paintBounds) { // First we create a PictureRecorder to record the commands we're going to // feed in the canvas. The PictureRecorder will eventually produce a Picture, // which is an immutable record of those commands. final ui.PictureRecorder recorder = ui.PictureRecorder();
// Next, we create a canvas from the recorder. The canvas is an interface // which can receive drawing commands. The canvas interface is modeled after // the SkCanvas interface from Skia. The paintBounds establishes a "cull rect" // for the canvas, which lets the implementation discard any commands that // are entirely outside this rectangle. final ui.Canvas canvas = ui.Canvas(recorder, paintBounds);
// The commands draw a circle in the center of the screen. final ui.Size size = paintBounds.size; canvas.drawCircle( size.center(ui.Offset.zero), size.shortestSide * 0.45, ui.Paint()..color = color, );
// When we're done issuing painting commands, we end the recording an receive // a Picture, which is an immutable record of the commands we've issued. You // can draw a Picture into another canvas or include it as part of a // composited scene. return recorder.endRecording();}
ui.Scene composite(ui.Picture picture, ui.Rect paintBounds) { // The device pixel ratio gives an approximate ratio of the size of pixels on // the device's screen to "normal" sized pixels. We commonly work in logical // pixels, which are then scaled by the device pixel ratio before being drawn // on the screen. final double devicePixelRatio = view.devicePixelRatio;
// This transform scales the x and y coordinates by the devicePixelRatio. final Float64List deviceTransform = Float64List(16) ..[0] = devicePixelRatio ..[5] = devicePixelRatio ..[10] = 1.0 ..[15] = 1.0;
// We build a very simple scene graph with two nodes. The root node is a // transform that scale its children by the device pixel ratio. This transform // lets us paint in "logical" pixels which are converted to device pixels by // this scaling operation. final ui.SceneBuilder sceneBuilder = ui.SceneBuilder() ..pushTransform(deviceTransform) ..addPicture(ui.Offset.zero, picture) ..pop();
// When we're done recording the scene, we call build() to obtain an immutable // record of the scene we've recorded. return sceneBuilder.build();}
void beginFrame(Duration timeStamp) { final ui.Rect paintBounds = ui.Offset.zero & (view.physicalSize / view.devicePixelRatio); // First, record a picture with our painting commands. final ui.Picture picture = paint(paintBounds); // Second, include that picture in a scene graph. final ui.Scene scene = composite(picture, paintBounds); // Third, instruct the engine to render that scene graph. view.render(scene);}
void handlePointerDataPacket(ui.PointerDataPacket packet) { // The pointer packet contains a number of pointer movements, which we iterate // through and process. for (final ui.PointerData datum in packet.data) { if (datum.change == ui.PointerChange.down) { // If the pointer went down, we change the color of the circle to blue. color = const ui.Color(0xFF0000FF); // Rather than calling paint() synchronously, we ask the engine to // schedule a frame. The engine will call onBeginFrame when it is actually // time to produce the frame. ui.PlatformDispatcher.instance.scheduleFrame(); } else if (datum.change == ui.PointerChange.up) { // Similarly, if the pointer went up, we change the color of the circle to // green and schedule a frame. It's harmless to call scheduleFrame many // times because the engine will ignore redundant requests up until the // point where the engine calls onBeginFrame, which signals the boundary // between one frame and another. color = const ui.Color(0xFF00FF00); ui.PlatformDispatcher.instance.scheduleFrame(); } }}
// This function is the primary entry point to your application. The engine// calls main() as soon as it has loaded your code.void main() { // TODO(goderbauer): Create a window if embedder doesn't provide an implicit view to draw into. assert(ui.PlatformDispatcher.instance.implicitView != null); view = ui.PlatformDispatcher.instance.implicitView!;
color = const ui.Color(0xFF00FF00); // The engine calls onBeginFrame whenever it wants us to produce a frame. ui.PlatformDispatcher.instance.onBeginFrame = beginFrame; // The engine calls onPointerDataPacket whenever it had updated information // about the pointers directed at our app. ui.PlatformDispatcher.instance.onPointerDataPacket = handlePointerDataPacket; // Here we kick off the whole process by asking the engine to schedule a new // frame. The engine will eventually call onBeginFrame when it is time for us // to actually produce the frame. ui.PlatformDispatcher.instance.scheduleFrame();}1234567891011121314151617181920212223242526// Copyright 2014 The Flutter Authors. All rights reserved.// Use of this source code is governed by a BSD-style license that can be// found in the LICENSE file.
// This example shows how to build a render tree with a non-cartesian coordinate// system. Most of the guts of this examples are in src/sector_layout.dart.
import 'package:flutter/rendering.dart';import 'src/binding.dart';import 'src/sector_layout.dart';
RenderBox buildSectorExample() { final RenderSectorRing rootCircle = RenderSectorRing(padding: 20.0); rootCircle.add(RenderSolidColor(const Color(0xFF00FFFF), desiredDeltaTheta: kTwoPi * 0.15)); rootCircle.add(RenderSolidColor(const Color(0xFF0000FF), desiredDeltaTheta: kTwoPi * 0.4)); final RenderSectorSlice stack = RenderSectorSlice(padding: 2.0); stack.add(RenderSolidColor(const Color(0xFFFFFF00), desiredDeltaRadius: 20.0)); stack.add(RenderSolidColor(const Color(0xFFFF9000), desiredDeltaRadius: 20.0)); stack.add(RenderSolidColor(const Color(0xFF00FF00))); rootCircle.add(stack); return RenderBoxToRenderSectorAdapter(innerRadius: 50.0, child: rootCircle);}
void main() { ViewRenderingFlutterBinding(root: buildSectorExample()).scheduleFrame();}12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091// Copyright 2014 The Flutter Authors. All rights reserved.// Use of this source code is governed by a BSD-style license that can be// found in the LICENSE file.
// This example shows how to use flex layout directly in the underlying render// tree.
import 'package:flutter/rendering.dart';
import 'src/binding.dart';import 'src/solid_color_box.dart';
void main() { final RenderFlex table = RenderFlex(direction: Axis.vertical, textDirection: TextDirection.ltr);
void addAlignmentRow(CrossAxisAlignment crossAxisAlignment) { TextStyle style = const TextStyle(color: Color(0xFF000000)); final RenderParagraph paragraph = RenderParagraph( TextSpan(style: style, text: '$crossAxisAlignment'), textDirection: TextDirection.ltr, ); table.add(RenderPadding(child: paragraph, padding: const EdgeInsets.only(top: 20.0))); final RenderFlex row = RenderFlex(crossAxisAlignment: crossAxisAlignment, textBaseline: TextBaseline.alphabetic, textDirection: TextDirection.ltr); style = const TextStyle(fontSize: 15.0, color: Color(0xFF000000)); row.add(RenderDecoratedBox( decoration: const BoxDecoration(color: Color(0x7FFFCCCC)), child: RenderParagraph( TextSpan(style: style, text: 'foo foo foo'), textDirection: TextDirection.ltr, ), )); style = const TextStyle(fontSize: 10.0, color: Color(0xFF000000)); row.add(RenderDecoratedBox( decoration: const BoxDecoration(color: Color(0x7FCCFFCC)), child: RenderParagraph( TextSpan(style: style, text: 'foo foo foo'), textDirection: TextDirection.ltr, ), )); final RenderFlex subrow = RenderFlex(crossAxisAlignment: crossAxisAlignment, textBaseline: TextBaseline.alphabetic, textDirection: TextDirection.ltr); style = const TextStyle(fontSize: 25.0, color: Color(0xFF000000)); subrow.add(RenderDecoratedBox( decoration: const BoxDecoration(color: Color(0x7FCCCCFF)), child: RenderParagraph( TextSpan(style: style, text: 'foo foo foo foo'), textDirection: TextDirection.ltr, ), )); subrow.add(RenderSolidColorBox(const Color(0x7FCCFFFF), desiredSize: const Size(30.0, 40.0))); row.add(subrow); table.add(row); final FlexParentData rowParentData = row.parentData! as FlexParentData; rowParentData.flex = 1; }
addAlignmentRow(CrossAxisAlignment.start); addAlignmentRow(CrossAxisAlignment.end); addAlignmentRow(CrossAxisAlignment.center); addAlignmentRow(CrossAxisAlignment.stretch); addAlignmentRow(CrossAxisAlignment.baseline);
void addJustificationRow(MainAxisAlignment justify) { const TextStyle style = TextStyle(color: Color(0xFF000000)); final RenderParagraph paragraph = RenderParagraph( TextSpan(style: style, text: '$justify'), textDirection: TextDirection.ltr, ); table.add(RenderPadding(child: paragraph, padding: const EdgeInsets.only(top: 20.0))); final RenderFlex row = RenderFlex(textDirection: TextDirection.ltr); row.add(RenderSolidColorBox(const Color(0xFFFFCCCC), desiredSize: const Size(80.0, 60.0))); row.add(RenderSolidColorBox(const Color(0xFFCCFFCC), desiredSize: const Size(64.0, 60.0))); row.add(RenderSolidColorBox(const Color(0xFFCCCCFF), desiredSize: const Size(160.0, 60.0))); row.mainAxisAlignment = justify; table.add(row); final FlexParentData rowParentData = row.parentData! as FlexParentData; rowParentData.flex = 1; }
addJustificationRow(MainAxisAlignment.start); addJustificationRow(MainAxisAlignment.end); addJustificationRow(MainAxisAlignment.center); addJustificationRow(MainAxisAlignment.spaceBetween); addJustificationRow(MainAxisAlignment.spaceAround);
final RenderDecoratedBox root = RenderDecoratedBox( decoration: const BoxDecoration(color: Color(0xFFFFFFFF)), child: RenderPadding(child: table, padding: const EdgeInsets.symmetric(vertical: 50.0)), );
ViewRenderingFlutterBinding(root: root).scheduleFrame();}123456789101112131415161718192021222324252627282930// Copyright 2014 The Flutter Authors. All rights reserved.// Use of this source code is governed by a BSD-style license that can be// found in the LICENSE file.
// This example shows how to show the text 'Hello, world.' using the underlying// render tree.
import 'package:flutter/rendering.dart';
import 'src/binding.dart';
void main() { // We use ViewRenderingFlutterBinding to attach the render tree to the window. ViewRenderingFlutterBinding( // The root of our render tree is a RenderPositionedBox, which centers its // child both vertically and horizontally. root: RenderPositionedBox( // We use a RenderParagraph to display the text 'Hello, world.' without // any explicit styling. child: RenderParagraph( const TextSpan(text: 'Hello, world.'), // The text is in English so we specify the text direction as // left-to-right. If the text had been in Hebrew or Arabic, we would // have specified right-to-left. The Flutter framework does not assume a // particular text direction. textDirection: TextDirection.ltr, ), ), ).scheduleFrame();}12345678910111213141516171819202122# Example of calling platform services from Flutter
This project demonstrates how to connect a Flutter app to platform-specific services.
You can read more about[accessing platform and third-party services in Flutter](https://flutter.dev/platform-channels/).
## iOSYou can use the commands `flutter build` and `flutter run` from the app's rootdirectory to build/run the app or you can open `ios/Runner.xcworkspace` in Xcodeand build/run the project as usual.
## Android
You can use the commands `flutter build` and `flutter run` from the app's rootdirectory to build/run the app or to build with Android Studio, open the`android` folder in Android Studio and build the project as usual.
## WindowsYou can use the commands `flutter build` and `flutter run` from the app's rootdirectory to build/run the app or you can build once then open`build\windows\platform_channel.sln` in Visual Studio to build and run.123456789101112<?xml version="1.0" encoding="UTF-8"?><module type="JAVA_MODULE" version="4"> <component name="NewModuleRootManager" inherit-compiler-output="true"> <exclude-output /> <content url="file://$MODULE_DIR$/android"> <sourceFolder url="file://$MODULE_DIR$/android/app/src/main/java" isTestSource="false" /> </content> <orderEntry type="jdk" jdkName="Android API 29 Platform" jdkType="Android SDK" /> <orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="library" name="Flutter for Android" level="project" /> </component></module>123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566// Copyright 2014 The Flutter Authors. All rights reserved.// Use of this source code is governed by a BSD-style license that can be// found in the LICENSE file.
def localProperties = new Properties()def localPropertiesFile = rootProject.file('local.properties')if (localPropertiesFile.exists()) { localPropertiesFile.withReader('UTF-8') { reader -> localProperties.load(reader) }}
def flutterRoot = localProperties.getProperty('flutter.sdk')if (flutterRoot == null) { throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')if (flutterVersionCode == null) { flutterVersionCode = '1'}
def flutterVersionName = localProperties.getProperty('flutter.versionName')if (flutterVersionName == null) { flutterVersionName = '1.0'}
apply plugin: 'com.android.application'apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android { namespace "com.example.platformchannel" compileSdk flutter.compileSdkVersion
compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 }
defaultConfig { applicationId "io.flutter.examples.platform_channel" minSdkVersion flutter.minSdkVersion targetSdkVersion flutter.targetSdkVersion versionCode flutterVersionCode.toInteger() versionName flutterVersionName testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" }
buildTypes { release { // TODO: Add your own signing config for the release build. // Signing with the debug keys for now, so `flutter run --release` works. signingConfig signingConfigs.debug } }}
flutter { source '../..'}
dependencies { testImplementation 'junit:junit:4.13' androidTestImplementation 'androidx.test:runner:1.1.1' androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'}1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798// Copyright 2014 The Flutter Authors. All rights reserved.// Use of this source code is governed by a BSD-style license that can be// found in the LICENSE file.
package com.example.platformchannel;
import android.graphics.Bitmap;import android.support.test.InstrumentationRegistry;import android.support.test.rule.ActivityTestRule;import android.support.test.runner.AndroidJUnit4;
import io.flutter.view.FlutterView;
import android.app.Instrumentation;import java.util.concurrent.CountDownLatch;import java.util.concurrent.TimeUnit;import org.junit.Rule;import org.junit.Test;import org.junit.runner.RunWith;
import static org.junit.Assert.*;
@RunWith(AndroidJUnit4.class)public class ExampleInstrumentedTest { @Rule public ActivityTestRule<MainActivity> activityRule = new ActivityTestRule<>(MainActivity.class);
@Test public void testBitmap() { final Instrumentation instr = InstrumentationRegistry.getInstrumentation(); final BitmapPoller poller = new BitmapPoller(5); instr.runOnMainSync(new Runnable() { public void run() { final FlutterView flutterView = activityRule.getActivity().getFlutterView();
// Call onPostResume to start the engine's renderer even if the activity // is paused in the test environment. flutterView.onPostResume();
poller.start(flutterView); } });
Bitmap bitmap = null; try { bitmap = poller.waitForBitmap(); } catch (InterruptedException e) { fail(e.getMessage()); }
assertNotNull(bitmap); assertTrue(bitmap.getWidth() > 0); assertTrue(bitmap.getHeight() > 0);
// Check that a pixel matches the default Material background color. assertTrue(bitmap.getPixel(bitmap.getWidth() - 1, bitmap.getHeight() - 1) == 0xFFFAFAFA); }
// Waits on a FlutterView until it is able to produce a bitmap. private class BitmapPoller { private int triesPending; private int waitMsec; private FlutterView flutterView; private Bitmap bitmap; private CountDownLatch latch = new CountDownLatch(1);
private final int delayMsec = 1000;
BitmapPoller(int tries) { triesPending = tries; waitMsec = delayMsec * tries + 100; }
void start(FlutterView flutterView) { this.flutterView = flutterView; flutterView.postDelayed(checkBitmap, delayMsec); }
Bitmap waitForBitmap() throws InterruptedException { latch.await(waitMsec, TimeUnit.MILLISECONDS); return bitmap; }
private Runnable checkBitmap = new Runnable() { public void run() { bitmap = flutterView.getBitmap(); triesPending--; if (bitmap != null || triesPending == 0) { latch.countDown(); } else { flutterView.postDelayed(checkBitmap, delayMsec); } } }; }}1234567891011121314151617181920212223242526272829303132333435363738394041424344<!-- Copyright 2014 The Flutter Authors. All rights reserved.Use of this source code is governed by a BSD-style license that can befound in the LICENSE file. -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- The INTERNET permission is required for development. Specifically, flutter needs it to communicate with the running application to allow setting breakpoints, to provide hot reload, etc. --> <uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<application android:label="@string/app_name"> <activity android:name=".MainActivity" android:exported="true" android:launchMode="singleTop" android:theme="@android:style/Theme.Black.NoTitleBar" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:hardwareAccelerated="true" android:windowSoftInputMode="adjustResize"> <intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.LAUNCHER"/> </intent-filter> </activity> <!-- Don't delete the meta-data below. This is used by the Flutter tool to generate GeneratedPluginRegistrant.java --> <meta-data android:name="flutterEmbedding" android:value="2" /> </application> <!-- Required to query activities that can process text, see: https://developer.android.com/training/package-visibility?hl=en and https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. --> <queries> <intent> <action android:name="android.intent.action.PROCESS_TEXT"/> <data android:mimeType="text/plain"/> </intent> </queries></manifest>123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100// Copyright 2014 The Flutter Authors. All rights reserved.// Use of this source code is governed by a BSD-style license that can be// found in the LICENSE file.
package com.example.platformchannel;
import android.content.BroadcastReceiver;import android.content.Context;import android.content.ContextWrapper;import android.content.Intent;import android.content.IntentFilter;import android.os.BatteryManager;import android.os.Build.VERSION;import android.os.Build.VERSION_CODES;import android.os.Bundle;import androidx.annotation.NonNull;import io.flutter.embedding.android.FlutterActivity;import io.flutter.embedding.engine.FlutterEngine;import io.flutter.plugin.common.EventChannel;import io.flutter.plugin.common.EventChannel.EventSink;import io.flutter.plugin.common.EventChannel.StreamHandler;import io.flutter.plugin.common.MethodChannel;import io.flutter.plugin.common.MethodChannel.MethodCallHandler;import io.flutter.plugin.common.MethodChannel.Result;import io.flutter.plugin.common.MethodCall;import io.flutter.plugins.GeneratedPluginRegistrant;
public class MainActivity extends FlutterActivity { private static final String BATTERY_CHANNEL = "samples.flutter.io/battery"; private static final String CHARGING_CHANNEL = "samples.flutter.io/charging";
@Override public void configureFlutterEngine(@NonNull FlutterEngine flutterEngine) { new EventChannel(flutterEngine.getDartExecutor(), CHARGING_CHANNEL).setStreamHandler( new StreamHandler() { private BroadcastReceiver chargingStateChangeReceiver; @Override public void onListen(Object arguments, EventSink events) { chargingStateChangeReceiver = createChargingStateChangeReceiver(events); registerReceiver( chargingStateChangeReceiver, new IntentFilter(Intent.ACTION_BATTERY_CHANGED)); }
@Override public void onCancel(Object arguments) { unregisterReceiver(chargingStateChangeReceiver); chargingStateChangeReceiver = null; } } );
new MethodChannel(flutterEngine.getDartExecutor(), BATTERY_CHANNEL).setMethodCallHandler( new MethodCallHandler() { @Override public void onMethodCall(MethodCall call, Result result) { if (call.method.equals("getBatteryLevel")) { int batteryLevel = getBatteryLevel();
if (batteryLevel != -1) { result.success(batteryLevel); } else { result.error("UNAVAILABLE", "Battery level not available.", null); } } else { result.notImplemented(); } } } ); }
private BroadcastReceiver createChargingStateChangeReceiver(final EventSink events) { return new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { int status = intent.getIntExtra(BatteryManager.EXTRA_STATUS, -1);
if (status == BatteryManager.BATTERY_STATUS_UNKNOWN) { events.error("UNAVAILABLE", "Charging status unavailable", null); } else { boolean isCharging = status == BatteryManager.BATTERY_STATUS_CHARGING || status == BatteryManager.BATTERY_STATUS_FULL; events.success(isCharging ? "charging" : "discharging"); } } }; }
private int getBatteryLevel() { if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { BatteryManager batteryManager = (BatteryManager) getSystemService(BATTERY_SERVICE); return batteryManager.getIntProperty(BatteryManager.BATTERY_PROPERTY_CAPACITY); } else { Intent intent = new ContextWrapper(getApplicationContext()). registerReceiver(null, new IntentFilter(Intent.ACTION_BATTERY_CHANGED)); return (intent.getIntExtra(BatteryManager.EXTRA_LEVEL, -1) * 100) / intent.getIntExtra(BatteryManager.EXTRA_SCALE, -1); } }}12345678<!-- Copyright 2014 The Flutter Authors. All rights reserved.Use of this source code is governed by a BSD-style license that can befound in the LICENSE file. -->
<resources> <string name="app_name">Platform Channel</string> <string name="title">Flutter Application</string></resources>.gitattributes+1
flutter/examples/api/README.mdAdded+154
flutter/examples/api/analysis_options.yamlAdded+10
flutter/examples/api/pubspec.lockAdded+531
flutter/examples/api/pubspec.yamlAdded+96
flutter/examples/catalog/catalog.imlAdded+14
flutter/examples/flutter_gallery/android.imlAdded+12
flutter/examples/flutter_gallery/flutter_gallery.imlAdded+14
flutter/examples/flutter_view/README.mdAdded+18
flutter/examples/flutter_view/flutter_view.imlAdded+14
flutter/examples/flutter_view/pubspec.lockAdded+55
flutter/examples/flutter_view/pubspec.yamlAdded+22
flutter/examples/hello_world/README.mdAdded+8
flutter/examples/hello_world/android.imlAdded+12
flutter/examples/hello_world/hello_world.imlAdded+14
flutter/examples/hello_world/pubspec.lockAdded+494
flutter/examples/hello_world/pubspec.yamlAdded+74
flutter/examples/image_list/README.mdAdded+7
flutter/examples/image_list/pubspec.lockAdded+196
flutter/examples/image_list/pubspec.yamlAdded+60
flutter/examples/layers/README.mdAdded+28
flutter/examples/layers/analysis_options.yamlAdded+8
flutter/examples/layers/android/build.gradleAdded+51
flutter/examples/layers/android/buildscript-gradle.lockfileAdded+163
flutter/examples/layers/android/gradle.propertiesAdded+3
flutter/examples/layers/android/project-app.lockfileAdded+118
flutter/examples/layers/android/settings.gradleAdded+21
flutter/examples/layers/layers.imlAdded+14
flutter/examples/layers/lib/main.dartAdded+16
flutter/examples/layers/linux/CMakeLists.txtAdded+139
flutter/examples/layers/linux/main.ccAdded+10
flutter/examples/layers/linux/my_application.ccAdded+108
flutter/examples/layers/linux/my_application.hAdded+22
flutter/examples/layers/pubspec.lockAdded+188
flutter/examples/layers/pubspec.yamlAdded+42
flutter/examples/layers/raw/canvas.dartAdded+135
flutter/examples/layers/raw/hello_world.dartAdded+57
flutter/examples/layers/raw/spinning_square.dartAdded+69
flutter/examples/layers/raw/text.dartAdded+102
flutter/examples/layers/raw/touch_input.dartAdded+122
flutter/examples/layers/rendering/custom_coordinate_systems.dartAdded+26
flutter/examples/layers/rendering/flex_layout.dartAdded+91
flutter/examples/layers/rendering/hello_world.dartAdded+30
flutter/examples/platform_channel/README.mdAdded+22
flutter/examples/platform_channel/android.imlAdded+12
flutter/examples/platform_channel/android/app/build.gradleAdded+66
flutter/examples/platform_channel/android/app/src/androidTest/java/com/example/platformchannel/ExampleInstrumentedTest.javaAdded+98
flutter/examples/platform_channel/android/app/src/main/AndroidManifest.xmlAdded+44
flutter/examples/platform_channel/android/app/src/main/java/com/example/platformchannel/MainActivity.javaAdded+100
flutter/examples/platform_channel/android/app/src/main/res/values/strings.xmlAdded+8