diff --git a/.gitattributes b/.gitattributes
index 9593b73a03886352ea53451033f05ba3b2a359b0..75e91ee89a76afb95a2c396236c438b98232205c 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -13,3 +13,4 @@ novelforge-project/novelforge-sentinel-pro/images/panel-bg.jpg filter=lfs diff=l
novelforge-sentinel-pro/images/writing-space.jpg filter=lfs diff=lfs merge=lfs -text
novelforge-project/novelforge-sentinel-pro/images/writing-space.jpg filter=lfs diff=lfs merge=lfs -text
novelforge-project/agent_workspace/docs/project_enhancement_completion_report.pdf filter=lfs diff=lfs merge=lfs -text
+novelforge-project/agent_workspace/novelforge-sentinel-pro/images/panel-bg.jpg filter=lfs diff=lfs merge=lfs -text
diff --git a/flutter/examples/api/README.md b/flutter/examples/api/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..73770a426f4c11e11419ab4d76b03943225ba327
--- /dev/null
+++ b/flutter/examples/api/README.md
@@ -0,0 +1,154 @@
+# API Example Code
+
+This directory contains the API sample code that is referenced from the API
+documentation in the framework.
+
+The examples can be run individually by just specifying the path to the example
+on 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, the
+example 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 are
+available as standalone examples that can be run here. For instance, setting the
+system overlay style doesn't make sense on the web (it only changes the
+notification area background color on Android), so you can run the example for
+that 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 the
+files are represented as directories (without the `.dart` suffix), and each
+sample in the file is a separate file in that directory. So, for the example
+above, 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 that
+symbol 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 left
+between 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 in
+the canonical location for one of the symbols, and the link in the API docs
+block 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 for
+the symbol you would like to attach it to. Here's what it might look like if you
+wanted 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 wrapping
+or newlines, one space after the "`**`" at the beginning, and one space before
+the "`**`" 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 you
+are creating.
+
+Use `{@tool dartpad}` for Dartpad examples, and use `{@tool sample}` for
+examples that shouldn't be run/shown in Dartpad.
+
+Once that comment block is inserted in the source code, create a new file at the
+appropriate path under [`examples/api`](.). See the
+[sample_templates](./lib/sample_templates/) directory for examples of different
+types of samples with some best practices applied.
+
+The filename should match the location of the source file it is linked from, and
+is named for the symbol it is attached to, in lower_snake_case, with an index
+relating to their order within the doc comment. So, for the `Curve2D` example
+above, 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) for
+more 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 that
+hasn'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 `{@tool
+snippet}`. 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 intended
+to be runnable, they just show some incomplete snippet of example code. It must
+compile (in the context of the sample analyzer), but doesn't need to do
+anything. See [the snippets documentation](
+https://pub.dev/packages/snippets#snippet-tool) for more information about the
+context that the analyzer uses.
+
+## Writing Tests
+
+Examples are required to have tests. There is already a "smoke test" that simply
+builds and runs all the API examples, just to make sure that they start up
+without crashing. Functionality tests are required the examples, and generally
+just do what is normally done for writing tests. The one thing that makes it
+more challenging to do for examples is that they can't really be written for
+testability in any obvious way, since that would complicate the examples and
+make 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 all
+other ways, these are just normal tests. You don't need to re-test the
+functionality of the widget being used in the example, but you should test the
+functionality 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 a
+file named [`test/widgets/layout_builder/layout_builder.0_test.dart`](
+./test/widgets/layout_builder/layout_builder.0_test.dart)
diff --git a/flutter/examples/api/analysis_options.yaml b/flutter/examples/api/analysis_options.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..dec61f90edbccae7d10c2bad23f1e5532adaf441
--- /dev/null
+++ b/flutter/examples/api/analysis_options.yaml
@@ -0,0 +1,10 @@
+# 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: false
diff --git a/flutter/examples/api/pubspec.lock b/flutter/examples/api/pubspec.lock
new file mode 100644
index 0000000000000000000000000000000000000000..9496976efe5ee259b30159e07f7584fd1560d572
--- /dev/null
+++ b/flutter/examples/api/pubspec.lock
@@ -0,0 +1,531 @@
+# Generated by pub
+# See https://dart.dev/tools/pub/glossary#lockfile
+packages:
+ _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"
diff --git a/flutter/examples/api/pubspec.yaml b/flutter/examples/api/pubspec.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..17b0d3a01e83da3217aa4fab56c035197355d531
--- /dev/null
+++ b/flutter/examples/api/pubspec.yaml
@@ -0,0 +1,96 @@
+# This file is also used by dev/bots/analyze_snippet_code.dart to analyze code snippets (`{@tool snippet}` sections).
+
+name: flutter_api_samples
+description: 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: e00b
diff --git a/flutter/examples/catalog/catalog.iml b/flutter/examples/catalog/catalog.iml
new file mode 100644
index 0000000000000000000000000000000000000000..1d83ed3abc9085f991ca3f8f864f38df5577a8a6
--- /dev/null
+++ b/flutter/examples/catalog/catalog.iml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/flutter/examples/flutter_gallery/android.iml b/flutter/examples/flutter_gallery/android.iml
new file mode 100644
index 0000000000000000000000000000000000000000..79f6223dbf740f805ef97f2b382f592944c1b899
--- /dev/null
+++ b/flutter/examples/flutter_gallery/android.iml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/flutter/examples/flutter_gallery/flutter_gallery.iml b/flutter/examples/flutter_gallery/flutter_gallery.iml
new file mode 100644
index 0000000000000000000000000000000000000000..71ade4c2bb561947180eea687a9e885b50433c75
--- /dev/null
+++ b/flutter/examples/flutter_gallery/flutter_gallery.iml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/flutter/examples/flutter_view/README.md b/flutter/examples/flutter_view/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..70146153945bb8f899022985b586a0c4060b4710
--- /dev/null
+++ b/flutter/examples/flutter_view/README.md
@@ -0,0 +1,18 @@
+# Example of embedding Flutter using FlutterView
+
+This project demonstrates how to embed Flutter within an iOS or Android
+application. On iOS, the iOS and Flutter components are built with Xcode. On
+Android, the Android and Flutter components are built with Android Studio or
+Gradle.
+
+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 as
+usual.
+
+## Android
+
+You can open `android/` in Android Studio and build the project as usual.
diff --git a/flutter/examples/flutter_view/flutter_view.iml b/flutter/examples/flutter_view/flutter_view.iml
new file mode 100644
index 0000000000000000000000000000000000000000..1d83ed3abc9085f991ca3f8f864f38df5577a8a6
--- /dev/null
+++ b/flutter/examples/flutter_view/flutter_view.iml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/flutter/examples/flutter_view/pubspec.lock b/flutter/examples/flutter_view/pubspec.lock
new file mode 100644
index 0000000000000000000000000000000000000000..36bc7e99c2379e280e9449f9a2375c5cc29f144d
--- /dev/null
+++ b/flutter/examples/flutter_view/pubspec.lock
@@ -0,0 +1,55 @@
+# Generated by pub
+# See https://dart.dev/tools/pub/glossary#lockfile
+packages:
+ 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"
diff --git a/flutter/examples/flutter_view/pubspec.yaml b/flutter/examples/flutter_view/pubspec.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..7cccec050e458da0a2c1235e973498c3d27e0539
--- /dev/null
+++ b/flutter/examples/flutter_view/pubspec.yaml
@@ -0,0 +1,22 @@
+name: flutter_view
+description: 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: 4694
diff --git a/flutter/examples/hello_world/README.md b/flutter/examples/hello_world/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..0a9132c3761313fbc2080a6b4567e678927a21d5
--- /dev/null
+++ b/flutter/examples/hello_world/README.md
@@ -0,0 +1,8 @@
+## To run the Hello World demo:
+```
+flutter run
+```
+## To run the Hello World demo showing Arabic:
+```
+flutter run lib/arabic.dart
+```
diff --git a/flutter/examples/hello_world/android.iml b/flutter/examples/hello_world/android.iml
new file mode 100644
index 0000000000000000000000000000000000000000..79f6223dbf740f805ef97f2b382f592944c1b899
--- /dev/null
+++ b/flutter/examples/hello_world/android.iml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/flutter/examples/hello_world/hello_world.iml b/flutter/examples/hello_world/hello_world.iml
new file mode 100644
index 0000000000000000000000000000000000000000..71ade4c2bb561947180eea687a9e885b50433c75
--- /dev/null
+++ b/flutter/examples/hello_world/hello_world.iml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/flutter/examples/hello_world/pubspec.lock b/flutter/examples/hello_world/pubspec.lock
new file mode 100644
index 0000000000000000000000000000000000000000..ad1b0b9a0996e1d4cf90d2df5ba990b0823723d3
--- /dev/null
+++ b/flutter/examples/hello_world/pubspec.lock
@@ -0,0 +1,494 @@
+# Generated by pub
+# See https://dart.dev/tools/pub/glossary#lockfile
+packages:
+ _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"
diff --git a/flutter/examples/hello_world/pubspec.yaml b/flutter/examples/hello_world/pubspec.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..de6cfa22ab95c384ebdc83d232d84d697f6e0978
--- /dev/null
+++ b/flutter/examples/hello_world/pubspec.yaml
@@ -0,0 +1,74 @@
+name: 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: 6020
diff --git a/flutter/examples/image_list/README.md b/flutter/examples/image_list/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..109f142e9ca480a25467a667ef5a8b56d0abdfc5
--- /dev/null
+++ b/flutter/examples/image_list/README.md
@@ -0,0 +1,7 @@
+# Image List
+
+An example that sets up a local HTTP server for serving one
+image then creates a single flutter widget with five copies of requested
+image and prints how long the loading took.
+
+This is used in [$FH/flutter/devicelab/bin/tasks/image_list_reported_duration.dart] test.
diff --git a/flutter/examples/image_list/pubspec.lock b/flutter/examples/image_list/pubspec.lock
new file mode 100644
index 0000000000000000000000000000000000000000..00c431571a5c28834859140dafc317710af81d84
--- /dev/null
+++ b/flutter/examples/image_list/pubspec.lock
@@ -0,0 +1,196 @@
+# Generated by pub
+# See https://dart.dev/tools/pub/glossary#lockfile
+packages:
+ 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"
diff --git a/flutter/examples/image_list/pubspec.yaml b/flutter/examples/image_list/pubspec.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..8a6d11936ec168f6e17adec464a708e72abcc0b9
--- /dev/null
+++ b/flutter/examples/image_list/pubspec.yaml
@@ -0,0 +1,60 @@
+name: image_list
+description: 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: 58cb
diff --git a/flutter/examples/layers/README.md b/flutter/examples/layers/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..d888e5e26005522d61afc66b05a701830089afa5
--- /dev/null
+++ b/flutter/examples/layers/README.md
@@ -0,0 +1,28 @@
+# Examples of Flutter's layered architecture
+
+This directory contains several self-contained examples that illustrate
+Flutter'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.dart
+flutter run rendering/spinning_square.dart
+flutter run widgets/spinning_square.dart
+```
diff --git a/flutter/examples/layers/analysis_options.yaml b/flutter/examples/layers/analysis_options.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..76be938a6b861cf3e4c7f00d5aa2469c0c9b2bc4
--- /dev/null
+++ b/flutter/examples/layers/analysis_options.yaml
@@ -0,0 +1,8 @@
+# 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
diff --git a/flutter/examples/layers/android/build.gradle b/flutter/examples/layers/android/build.gradle
new file mode 100644
index 0000000000000000000000000000000000000000..2de20623576a82c3115eca8b1bdb56fd5b5051cb
--- /dev/null
+++ b/flutter/examples/layers/android/build.gradle
@@ -0,0 +1,51 @@
+// 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
+}
diff --git a/flutter/examples/layers/android/buildscript-gradle.lockfile b/flutter/examples/layers/android/buildscript-gradle.lockfile
new file mode 100644
index 0000000000000000000000000000000000000000..efe13277310ee8fef3c9d7f6f8a2cbbe601d110f
--- /dev/null
+++ b/flutter/examples/layers/android/buildscript-gradle.lockfile
@@ -0,0 +1,163 @@
+# 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=classpath
+androidx.databinding:databinding-compiler-common:7.2.0=classpath
+com.android.databinding:baseLibrary:7.2.0=classpath
+com.android.tools.analytics-library:crash:30.2.0=classpath
+com.android.tools.analytics-library:protos:30.2.0=classpath
+com.android.tools.analytics-library:shared:30.2.0=classpath
+com.android.tools.analytics-library:tracker:30.2.0=classpath
+com.android.tools.build.jetifier:jetifier-core:1.0.0-beta09=classpath
+com.android.tools.build.jetifier:jetifier-processor:1.0.0-beta09=classpath
+com.android.tools.build:aapt2-proto:7.2.0-7984345=classpath
+com.android.tools.build:aaptcompiler:7.2.0=classpath
+com.android.tools.build:apksig:7.2.0=classpath
+com.android.tools.build:apkzlib:7.2.0=classpath
+com.android.tools.build:builder-model:7.2.0=classpath
+com.android.tools.build:builder-test-api:7.2.0=classpath
+com.android.tools.build:builder:7.2.0=classpath
+com.android.tools.build:bundletool:1.8.2=classpath
+com.android.tools.build:gradle-api:7.2.0=classpath
+com.android.tools.build:gradle:7.2.0=classpath
+com.android.tools.build:manifest-merger:30.2.0=classpath
+com.android.tools.build:transform-api:2.0.0-deprecated-use-gradle-api=classpath
+com.android.tools.ddms:ddmlib:30.2.0=classpath
+com.android.tools.layoutlib:layoutlib-api:30.2.0=classpath
+com.android.tools.lint:lint-model:30.2.0=classpath
+com.android.tools.lint:lint-typedef-remover:30.2.0=classpath
+com.android.tools.utp:android-device-provider-ddmlib-proto:30.2.0=classpath
+com.android.tools.utp:android-device-provider-gradle-proto:30.2.0=classpath
+com.android.tools.utp:android-test-plugin-host-additional-test-output-proto:30.2.0=classpath
+com.android.tools.utp:android-test-plugin-host-coverage-proto:30.2.0=classpath
+com.android.tools.utp:android-test-plugin-host-retention-proto:30.2.0=classpath
+com.android.tools.utp:android-test-plugin-result-listener-gradle-proto:30.2.0=classpath
+com.android.tools:annotations:30.2.0=classpath
+com.android.tools:common:30.2.0=classpath
+com.android.tools:dvlib:30.2.0=classpath
+com.android.tools:repository:30.2.0=classpath
+com.android.tools:sdk-common:30.2.0=classpath
+com.android.tools:sdklib:30.2.0=classpath
+com.android:signflinger:7.2.0=classpath
+com.android:zipflinger:7.2.0=classpath
+com.fasterxml.jackson.core:jackson-annotations:2.11.1=classpath
+com.fasterxml.jackson.core:jackson-core:2.11.1=classpath
+com.fasterxml.jackson.core:jackson-databind:2.11.1=classpath
+com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.11.1=classpath
+com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.11.1=classpath
+com.fasterxml.jackson.module:jackson-module-kotlin:2.11.1=classpath
+com.fasterxml.woodstox:woodstox-core:6.2.1=classpath
+com.github.gundy:semver4j:0.16.4=classpath
+com.google.android:annotations:4.1.1.4=classpath
+com.google.api.grpc:proto-google-common-protos:1.12.0=classpath
+com.google.auto.value:auto-value-annotations:1.6.2=classpath
+com.google.code.findbugs:jsr305:3.0.2=classpath
+com.google.code.gson:gson:2.8.6=classpath
+com.google.crypto.tink:tink:1.3.0-rc2=classpath
+com.google.dagger:dagger:2.28.3=classpath
+com.google.errorprone:error_prone_annotations:2.3.4=classpath
+com.google.flatbuffers:flatbuffers-java:1.12.0=classpath
+com.google.guava:failureaccess:1.0.1=classpath
+com.google.guava:guava:30.1-jre=classpath
+com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=classpath
+com.google.j2objc:j2objc-annotations:1.3=classpath
+com.google.jimfs:jimfs:1.1=classpath
+com.google.protobuf:protobuf-java-util:3.10.0=classpath
+com.google.protobuf:protobuf-java:3.10.0=classpath
+com.google.testing.platform:core-proto:0.0.8-alpha07=classpath
+com.googlecode.json-simple:json-simple:1.1=classpath
+com.googlecode.juniversalchardet:juniversalchardet:1.0.3=classpath
+com.squareup:javapoet:1.10.0=classpath
+com.squareup:javawriter:2.5.0=classpath
+com.sun.activation:javax.activation:1.2.0=classpath
+com.sun.istack:istack-commons-runtime:3.0.8=classpath
+com.sun.xml.fastinfoset:FastInfoset:1.2.16=classpath
+commons-codec:commons-codec:1.11=classpath
+commons-io:commons-io:2.4=classpath
+commons-logging:commons-logging:1.2=classpath
+de.undercouch:gradle-download-task:4.1.1=classpath
+io.grpc:grpc-api:1.21.1=classpath
+io.grpc:grpc-context:1.21.1=classpath
+io.grpc:grpc-core:1.21.1=classpath
+io.grpc:grpc-netty:1.21.1=classpath
+io.grpc:grpc-protobuf-lite:1.21.1=classpath
+io.grpc:grpc-protobuf:1.21.1=classpath
+io.grpc:grpc-stub:1.21.1=classpath
+io.netty:netty-buffer:4.1.34.Final=classpath
+io.netty:netty-codec-http2:4.1.34.Final=classpath
+io.netty:netty-codec-http:4.1.34.Final=classpath
+io.netty:netty-codec-socks:4.1.34.Final=classpath
+io.netty:netty-codec:4.1.34.Final=classpath
+io.netty:netty-common:4.1.34.Final=classpath
+io.netty:netty-handler-proxy:4.1.34.Final=classpath
+io.netty:netty-handler:4.1.34.Final=classpath
+io.netty:netty-resolver:4.1.34.Final=classpath
+io.netty:netty-transport:4.1.34.Final=classpath
+io.opencensus:opencensus-api:0.21.0=classpath
+io.opencensus:opencensus-contrib-grpc-metrics:0.21.0=classpath
+it.unimi.dsi:fastutil:8.4.0=classpath
+jakarta.activation:jakarta.activation-api:1.2.1=classpath
+jakarta.xml.bind:jakarta.xml.bind-api:2.3.2=classpath
+javax.inject:javax.inject:1=classpath
+net.java.dev.jna:jna-platform:5.6.0=classpath
+net.java.dev.jna:jna:5.6.0=classpath
+net.sf.jopt-simple:jopt-simple:4.9=classpath
+net.sf.kxml:kxml2:2.3.0=classpath
+org.apache.commons:commons-compress:1.20=classpath
+org.apache.httpcomponents:httpclient:4.5.9=classpath
+org.apache.httpcomponents:httpcore:4.4.11=classpath
+org.apache.httpcomponents:httpmime:4.5.6=classpath
+org.bitbucket.b_c:jose4j:0.7.0=classpath
+org.bouncycastle:bcpkix-jdk15on:1.56=classpath
+org.bouncycastle:bcprov-jdk15on:1.56=classpath
+org.checkerframework:checker-qual:3.5.0=classpath
+org.codehaus.mojo:animal-sniffer-annotations:1.17=classpath
+org.codehaus.woodstox:stax2-api:4.2.1=classpath
+org.glassfish.jaxb:jaxb-runtime:2.3.2=classpath
+org.glassfish.jaxb:txw2:2.3.2=classpath
+org.jdom:jdom2:2.0.6=classpath
+org.jetbrains.dokka:dokka-core:1.4.32=classpath
+org.jetbrains.intellij.deps:trove4j:1.0.20181211=classpath
+org.jetbrains.kotlin:kotlin-android-extensions:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-annotation-processing-gradle:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-build-common:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-compiler-embeddable:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-compiler-runner:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-daemon-client:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-daemon-embeddable:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-gradle-plugin-model:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-klib-commonizer-api:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-native-utils:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-project-model:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-reflect:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-scripting-common:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-scripting-jvm:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-stdlib-common:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-stdlib:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-tooling-metadata:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-util-io:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-util-klib:1.5.31=classpath
+org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.5.0=classpath
+org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0=classpath
+org.jetbrains:annotations:13.0=classpath
+org.jetbrains:markdown-jvm:0.2.1=classpath
+org.jetbrains:markdown:0.2.1=classpath
+org.json:json:20180813=classpath
+org.jsoup:jsoup:1.13.1=classpath
+org.jvnet.staxex:stax-ex:1.8.1=classpath
+org.ow2.asm:asm-analysis:9.1=classpath
+org.ow2.asm:asm-commons:9.1=classpath
+org.ow2.asm:asm-tree:9.1=classpath
+org.ow2.asm:asm-util:9.1=classpath
+org.ow2.asm:asm:9.1=classpath
+org.slf4j:slf4j-api:1.7.30=classpath
+org.tensorflow:tensorflow-lite-metadata:0.1.0-rc2=classpath
+xerces:xercesImpl:2.12.0=classpath
+xml-apis:xml-apis:1.4.01=classpath
+empty=
diff --git a/flutter/examples/layers/android/gradle.properties b/flutter/examples/layers/android/gradle.properties
new file mode 100644
index 0000000000000000000000000000000000000000..598d13fee446372f156ecc38527b54c7cdcc8e3b
--- /dev/null
+++ b/flutter/examples/layers/android/gradle.properties
@@ -0,0 +1,3 @@
+org.gradle.jvmargs=-Xmx4G
+android.useAndroidX=true
+android.enableJetifier=true
diff --git a/flutter/examples/layers/android/project-app.lockfile b/flutter/examples/layers/android/project-app.lockfile
new file mode 100644
index 0000000000000000000000000000000000000000..e160a81ffd42a36bca35a414c624786fdac26bc3
--- /dev/null
+++ b/flutter/examples/layers/android/project-app.lockfile
@@ -0,0 +1,118 @@
+# 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,releaseUnitTestRuntimeClasspath
+androidx.annotation:annotation-experimental:1.1.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.annotation:annotation:1.2.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.arch.core:core-common:2.1.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.arch.core:core-runtime:2.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.collection:collection:1.1.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.core:core:1.6.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.customview:customview:1.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.fragment:fragment:1.1.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.lifecycle:lifecycle-common-java8:2.2.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.lifecycle:lifecycle-common:2.2.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.lifecycle:lifecycle-livedata-core:2.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.lifecycle:lifecycle-livedata:2.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.lifecycle:lifecycle-runtime:2.2.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.lifecycle:lifecycle-viewmodel:2.1.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.loader:loader:1.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.savedstate:savedstate:1.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.tracing:tracing:1.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.versionedparcelable:versionedparcelable:1.1.1=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.viewpager:viewpager:1.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.window:window-java:1.0.0-beta04=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.window:window:1.0.0-beta04=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+com.android.tools.analytics-library:protos:27.1.3=lintClassPath
+com.android.tools.analytics-library:shared:27.1.3=lintClassPath
+com.android.tools.analytics-library:tracker:27.1.3=lintClassPath
+com.android.tools.build:aapt2-proto:4.1.0-alpha01-6193524=lintClassPath
+com.android.tools.build:aapt2:4.1.3-6503028=_internal_aapt2_binary
+com.android.tools.build:apksig:4.1.3=lintClassPath
+com.android.tools.build:apkzlib:4.1.3=lintClassPath
+com.android.tools.build:builder-model:4.1.3=lintClassPath
+com.android.tools.build:builder-test-api:4.1.3=lintClassPath
+com.android.tools.build:builder:4.1.3=lintClassPath
+com.android.tools.build:gradle-api:4.1.3=lintClassPath
+com.android.tools.build:manifest-merger:27.1.3=lintClassPath
+com.android.tools.ddms:ddmlib:27.1.3=lintClassPath
+com.android.tools.external.com-intellij:intellij-core:27.1.3=lintClassPath
+com.android.tools.external.com-intellij:kotlin-compiler:27.1.3=lintClassPath
+com.android.tools.external.org-jetbrains:uast:27.1.3=lintClassPath
+com.android.tools.layoutlib:layoutlib-api:27.1.3=lintClassPath
+com.android.tools.lint:lint-api:27.1.3=lintClassPath
+com.android.tools.lint:lint-checks:27.1.3=lintClassPath
+com.android.tools.lint:lint-gradle-api:27.1.3=lintClassPath
+com.android.tools.lint:lint-gradle:27.1.3=lintClassPath
+com.android.tools.lint:lint-model:27.1.3=lintClassPath
+com.android.tools.lint:lint:27.1.3=lintClassPath
+com.android.tools:annotations:27.1.3=lintClassPath
+com.android.tools:common:27.1.3=lintClassPath
+com.android.tools:dvlib:27.1.3=lintClassPath
+com.android.tools:repository:27.1.3=lintClassPath
+com.android.tools:sdk-common:27.1.3=lintClassPath
+com.android.tools:sdklib:27.1.3=lintClassPath
+com.android:signflinger:4.1.3=lintClassPath
+com.android:zipflinger:4.1.3=lintClassPath
+com.google.code.findbugs:jsr305:3.0.2=lintClassPath
+com.google.code.gson:gson:2.8.5=lintClassPath
+com.google.errorprone:error_prone_annotations:2.3.2=lintClassPath
+com.google.guava:failureaccess:1.0.1=lintClassPath
+com.google.guava:guava:28.1-jre=lintClassPath
+com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=lintClassPath
+com.google.j2objc:j2objc-annotations:1.3=lintClassPath
+com.google.jimfs:jimfs:1.1=lintClassPath
+com.google.protobuf:protobuf-java:3.10.0=lintClassPath
+com.googlecode.json-simple:json-simple:1.1=lintClassPath
+com.squareup:javawriter:2.5.0=lintClassPath
+com.sun.activation:javax.activation:1.2.0=lintClassPath
+com.sun.istack:istack-commons-runtime:3.0.7=lintClassPath
+com.sun.xml.fastinfoset:FastInfoset:1.2.15=lintClassPath
+commons-codec:commons-codec:1.10=lintClassPath
+commons-logging:commons-logging:1.2=lintClassPath
+it.unimi.dsi:fastutil:7.2.0=lintClassPath
+javax.activation:javax.activation-api:1.2.0=lintClassPath
+javax.inject:javax.inject:1=lintClassPath
+javax.xml.bind:jaxb-api:2.3.1=lintClassPath
+net.sf.jopt-simple:jopt-simple:4.9=lintClassPath
+net.sf.kxml:kxml2:2.3.0=lintClassPath
+org.apache.commons:commons-compress:1.12=lintClassPath
+org.apache.httpcomponents:httpclient:4.5.6=lintClassPath
+org.apache.httpcomponents:httpcore:4.4.10=lintClassPath
+org.apache.httpcomponents:httpmime:4.5.6=lintClassPath
+org.bouncycastle:bcpkix-jdk15on:1.56=lintClassPath
+org.bouncycastle:bcprov-jdk15on:1.56=lintClassPath
+org.checkerframework:checker-qual:2.8.1=lintClassPath
+org.codehaus.groovy:groovy-all:2.4.15=lintClassPath
+org.codehaus.mojo:animal-sniffer-annotations:1.18=lintClassPath
+org.glassfish.jaxb:jaxb-runtime:2.3.1=lintClassPath
+org.glassfish.jaxb:txw2:2.3.1=lintClassPath
+org.jacoco:org.jacoco.agent:0.8.7=androidJacocoAnt
+org.jacoco:org.jacoco.ant:0.8.7=androidJacocoAnt
+org.jacoco:org.jacoco.core:0.8.7=androidJacocoAnt
+org.jacoco:org.jacoco.report:0.8.7=androidJacocoAnt
+org.jetbrains.kotlin:kotlin-reflect:1.3.72=lintClassPath
+org.jetbrains.kotlin:kotlin-stdlib-common:1.3.72=lintClassPath
+org.jetbrains.kotlin:kotlin-stdlib-common:1.5.31=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.72=lintClassPath
+org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.5.30=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.72=lintClassPath
+org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.30=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+org.jetbrains.kotlin:kotlin-stdlib:1.3.72=lintClassPath
+org.jetbrains.kotlin:kotlin-stdlib:1.5.31=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.5.2=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+org.jetbrains.trove4j:trove4j:20160824=lintClassPath
+org.jetbrains:annotations:13.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,lintClassPath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+org.jvnet.staxex:stax-ex:1.8=lintClassPath
+org.ow2.asm:asm-analysis:7.0=lintClassPath
+org.ow2.asm:asm-analysis:9.1=androidJacocoAnt
+org.ow2.asm:asm-commons:7.0=lintClassPath
+org.ow2.asm:asm-commons:9.1=androidJacocoAnt
+org.ow2.asm:asm-tree:7.0=lintClassPath
+org.ow2.asm:asm-tree:9.1=androidJacocoAnt
+org.ow2.asm:asm-util:7.0=lintClassPath
+org.ow2.asm:asm:7.0=lintClassPath
+org.ow2.asm:asm:9.1=androidJacocoAnt
+empty=androidApis,androidJdkImage,androidTestUtil,compile,coreLibraryDesugaring,debugAndroidTestAnnotationProcessorClasspath,debugAndroidTestRuntimeClasspath,debugAnnotationProcessorClasspath,debugReverseMetadataValues,debugUnitTestAnnotationProcessorClasspath,debugWearBundling,lintChecks,lintPublish,profileAnnotationProcessorClasspath,profileReverseMetadataValues,profileUnitTestAnnotationProcessorClasspath,profileWearBundling,releaseAnnotationProcessorClasspath,releaseReverseMetadataValues,releaseUnitTestAnnotationProcessorClasspath,releaseWearBundling,testCompile
diff --git a/flutter/examples/layers/android/settings.gradle b/flutter/examples/layers/android/settings.gradle
new file mode 100644
index 0000000000000000000000000000000000000000..03ae72d135c01f849e6812b36575b62b14fee791
--- /dev/null
+++ b/flutter/examples/layers/android/settings.gradle
@@ -0,0 +1,21 @@
+// 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"
diff --git a/flutter/examples/layers/layers.iml b/flutter/examples/layers/layers.iml
new file mode 100644
index 0000000000000000000000000000000000000000..1d83ed3abc9085f991ca3f8f864f38df5577a8a6
--- /dev/null
+++ b/flutter/examples/layers/layers.iml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/flutter/examples/layers/lib/main.dart b/flutter/examples/layers/lib/main.dart
new file mode 100644
index 0000000000000000000000000000000000000000..7b09b8be6fabab51671af31064a00a371a85b407
--- /dev/null
+++ b/flutter/examples/layers/lib/main.dart
@@ -0,0 +1,16 @@
+// 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,
+ ),
+ ),
+ );
+}
diff --git a/flutter/examples/layers/linux/CMakeLists.txt b/flutter/examples/layers/linux/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..a240ba4342260ddf581a360ffb909fb1cdd928d4
--- /dev/null
+++ b/flutter/examples/layers/linux/CMakeLists.txt
@@ -0,0 +1,139 @@
+# 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/ChooseApplicationID
+set(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 "$<$>:-O3>")
+ target_compile_definitions(${TARGET} PRIVATE "$<$>: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()
diff --git a/flutter/examples/layers/linux/main.cc b/flutter/examples/layers/linux/main.cc
new file mode 100644
index 0000000000000000000000000000000000000000..281a29e16b599a95421e7a35112eda77900ff549
--- /dev/null
+++ b/flutter/examples/layers/linux/main.cc
@@ -0,0 +1,10 @@
+// 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);
+}
diff --git a/flutter/examples/layers/linux/my_application.cc b/flutter/examples/layers/linux/my_application.cc
new file mode 100644
index 0000000000000000000000000000000000000000..dde28c955a6e7e2528aad21870d8f6dba83f6375
--- /dev/null
+++ b/flutter/examples/layers/linux/my_application.cc
@@ -0,0 +1,108 @@
+// 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
+#ifdef GDK_WINDOWING_X11
+#include
+#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));
+}
diff --git a/flutter/examples/layers/linux/my_application.h b/flutter/examples/layers/linux/my_application.h
new file mode 100644
index 0000000000000000000000000000000000000000..8c66ec485434d1f922c9915bdaefcb8969cdfec9
--- /dev/null
+++ b/flutter/examples/layers/linux/my_application.h
@@ -0,0 +1,22 @@
+// 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
+
+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_
diff --git a/flutter/examples/layers/pubspec.lock b/flutter/examples/layers/pubspec.lock
new file mode 100644
index 0000000000000000000000000000000000000000..2d3f6c8c4454cc1d7407a2d0755161ed06822cc8
--- /dev/null
+++ b/flutter/examples/layers/pubspec.lock
@@ -0,0 +1,188 @@
+# Generated by pub
+# See https://dart.dev/tools/pub/glossary#lockfile
+packages:
+ 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"
diff --git a/flutter/examples/layers/pubspec.yaml b/flutter/examples/layers/pubspec.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..2b42be330691a33a13b524c9910a5a41bb396298
--- /dev/null
+++ b/flutter/examples/layers/pubspec.yaml
@@ -0,0 +1,42 @@
+name: 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: 8023
diff --git a/flutter/examples/layers/raw/canvas.dart b/flutter/examples/layers/raw/canvas.dart
new file mode 100644
index 0000000000000000000000000000000000000000..8af0ca2fd47b2a2c3a950f7a0fc1ef8360e7fd89
--- /dev/null
+++ b/flutter/examples/layers/raw/canvas.dart
@@ -0,0 +1,135 @@
+// 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,
+ [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([
+ 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();
+}
diff --git a/flutter/examples/layers/raw/hello_world.dart b/flutter/examples/layers/raw/hello_world.dart
new file mode 100644
index 0000000000000000000000000000000000000000..e0a24c3fcd348418fb9adba74e60d47dc8874d82
--- /dev/null
+++ b/flutter/examples/layers/raw/hello_world.dart
@@ -0,0 +1,57 @@
+// 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();
+}
diff --git a/flutter/examples/layers/raw/spinning_square.dart b/flutter/examples/layers/raw/spinning_square.dart
new file mode 100644
index 0000000000000000000000000000000000000000..df8515ca646685024b3a32304e87cc52a8a423ba
--- /dev/null
+++ b/flutter/examples/layers/raw/spinning_square.dart
@@ -0,0 +1,69 @@
+// 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();
+}
diff --git a/flutter/examples/layers/raw/text.dart b/flutter/examples/layers/raw/text.dart
new file mode 100644
index 0000000000000000000000000000000000000000..616e8fa75ad75a299d92955f629c99be43ece5ba
--- /dev/null
+++ b/flutter/examples/layers/raw/text.dart
@@ -0,0 +1,102 @@
+// 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();
+}
diff --git a/flutter/examples/layers/raw/touch_input.dart b/flutter/examples/layers/raw/touch_input.dart
new file mode 100644
index 0000000000000000000000000000000000000000..cd83f4ee61d829cb892aa15f2fd49aa8a446937e
--- /dev/null
+++ b/flutter/examples/layers/raw/touch_input.dart
@@ -0,0 +1,122 @@
+// 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();
+}
diff --git a/flutter/examples/layers/rendering/custom_coordinate_systems.dart b/flutter/examples/layers/rendering/custom_coordinate_systems.dart
new file mode 100644
index 0000000000000000000000000000000000000000..d7fd16186e5d08010e2b05b1eed0c21a471e1a56
--- /dev/null
+++ b/flutter/examples/layers/rendering/custom_coordinate_systems.dart
@@ -0,0 +1,26 @@
+// 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();
+}
diff --git a/flutter/examples/layers/rendering/flex_layout.dart b/flutter/examples/layers/rendering/flex_layout.dart
new file mode 100644
index 0000000000000000000000000000000000000000..845a232fa18199864924faa12ff1878823731467
--- /dev/null
+++ b/flutter/examples/layers/rendering/flex_layout.dart
@@ -0,0 +1,91 @@
+// 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();
+}
diff --git a/flutter/examples/layers/rendering/hello_world.dart b/flutter/examples/layers/rendering/hello_world.dart
new file mode 100644
index 0000000000000000000000000000000000000000..cb49f94d373b234eccd559958c4954701d2ed794
--- /dev/null
+++ b/flutter/examples/layers/rendering/hello_world.dart
@@ -0,0 +1,30 @@
+// 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();
+}
diff --git a/flutter/examples/platform_channel/README.md b/flutter/examples/platform_channel/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..da81169a6904be5037bdb4b0faee86a11740ce43
--- /dev/null
+++ b/flutter/examples/platform_channel/README.md
@@ -0,0 +1,22 @@
+# 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/).
+
+## iOS
+You can use the commands `flutter build` and `flutter run` from the app's root
+directory to build/run the app or you can open `ios/Runner.xcworkspace` in Xcode
+and build/run the project as usual.
+
+## Android
+
+You can use the commands `flutter build` and `flutter run` from the app's root
+directory to build/run the app or to build with Android Studio, open the
+`android` folder in Android Studio and build the project as usual.
+
+## Windows
+You can use the commands `flutter build` and `flutter run` from the app's root
+directory to build/run the app or you can build once then open
+`build\windows\platform_channel.sln` in Visual Studio to build and run.
diff --git a/flutter/examples/platform_channel/android.iml b/flutter/examples/platform_channel/android.iml
new file mode 100644
index 0000000000000000000000000000000000000000..79f6223dbf740f805ef97f2b382f592944c1b899
--- /dev/null
+++ b/flutter/examples/platform_channel/android.iml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/flutter/examples/platform_channel/android/app/build.gradle b/flutter/examples/platform_channel/android/app/build.gradle
new file mode 100644
index 0000000000000000000000000000000000000000..3c28e7c27a16ec2d827edeaceb87d837a135e36e
--- /dev/null
+++ b/flutter/examples/platform_channel/android/app/build.gradle
@@ -0,0 +1,66 @@
+// 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'
+}
diff --git a/flutter/examples/platform_channel/android/app/src/androidTest/java/com/example/platformchannel/ExampleInstrumentedTest.java b/flutter/examples/platform_channel/android/app/src/androidTest/java/com/example/platformchannel/ExampleInstrumentedTest.java
new file mode 100644
index 0000000000000000000000000000000000000000..0ff8a400e59cc832e743efc53809c5bc96a54cf4
--- /dev/null
+++ b/flutter/examples/platform_channel/android/app/src/androidTest/java/com/example/platformchannel/ExampleInstrumentedTest.java
@@ -0,0 +1,98 @@
+// 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 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);
+ }
+ }
+ };
+ }
+}
diff --git a/flutter/examples/platform_channel/android/app/src/main/AndroidManifest.xml b/flutter/examples/platform_channel/android/app/src/main/AndroidManifest.xml
new file mode 100644
index 0000000000000000000000000000000000000000..803e946a373e1508e1a19c3e860127472cc5cff2
--- /dev/null
+++ b/flutter/examples/platform_channel/android/app/src/main/AndroidManifest.xml
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/flutter/examples/platform_channel/android/app/src/main/java/com/example/platformchannel/MainActivity.java b/flutter/examples/platform_channel/android/app/src/main/java/com/example/platformchannel/MainActivity.java
new file mode 100644
index 0000000000000000000000000000000000000000..e0241b8fd48b9ca00b2d780598fce61bcc86c404
--- /dev/null
+++ b/flutter/examples/platform_channel/android/app/src/main/java/com/example/platformchannel/MainActivity.java
@@ -0,0 +1,100 @@
+// 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);
+ }
+ }
+}
diff --git a/flutter/examples/platform_channel/android/app/src/main/res/values/strings.xml b/flutter/examples/platform_channel/android/app/src/main/res/values/strings.xml
new file mode 100644
index 0000000000000000000000000000000000000000..1b56c58c71fc998a200eab28c394987c807fb021
--- /dev/null
+++ b/flutter/examples/platform_channel/android/app/src/main/res/values/strings.xml
@@ -0,0 +1,8 @@
+
+
+
+ Platform Channel
+ Flutter Application
+
diff --git a/flutter/examples/platform_channel/android/build.gradle b/flutter/examples/platform_channel/android/build.gradle
new file mode 100644
index 0000000000000000000000000000000000000000..2de20623576a82c3115eca8b1bdb56fd5b5051cb
--- /dev/null
+++ b/flutter/examples/platform_channel/android/build.gradle
@@ -0,0 +1,51 @@
+// 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
+}
diff --git a/flutter/examples/platform_channel/android/buildscript-gradle.lockfile b/flutter/examples/platform_channel/android/buildscript-gradle.lockfile
new file mode 100644
index 0000000000000000000000000000000000000000..efe13277310ee8fef3c9d7f6f8a2cbbe601d110f
--- /dev/null
+++ b/flutter/examples/platform_channel/android/buildscript-gradle.lockfile
@@ -0,0 +1,163 @@
+# 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=classpath
+androidx.databinding:databinding-compiler-common:7.2.0=classpath
+com.android.databinding:baseLibrary:7.2.0=classpath
+com.android.tools.analytics-library:crash:30.2.0=classpath
+com.android.tools.analytics-library:protos:30.2.0=classpath
+com.android.tools.analytics-library:shared:30.2.0=classpath
+com.android.tools.analytics-library:tracker:30.2.0=classpath
+com.android.tools.build.jetifier:jetifier-core:1.0.0-beta09=classpath
+com.android.tools.build.jetifier:jetifier-processor:1.0.0-beta09=classpath
+com.android.tools.build:aapt2-proto:7.2.0-7984345=classpath
+com.android.tools.build:aaptcompiler:7.2.0=classpath
+com.android.tools.build:apksig:7.2.0=classpath
+com.android.tools.build:apkzlib:7.2.0=classpath
+com.android.tools.build:builder-model:7.2.0=classpath
+com.android.tools.build:builder-test-api:7.2.0=classpath
+com.android.tools.build:builder:7.2.0=classpath
+com.android.tools.build:bundletool:1.8.2=classpath
+com.android.tools.build:gradle-api:7.2.0=classpath
+com.android.tools.build:gradle:7.2.0=classpath
+com.android.tools.build:manifest-merger:30.2.0=classpath
+com.android.tools.build:transform-api:2.0.0-deprecated-use-gradle-api=classpath
+com.android.tools.ddms:ddmlib:30.2.0=classpath
+com.android.tools.layoutlib:layoutlib-api:30.2.0=classpath
+com.android.tools.lint:lint-model:30.2.0=classpath
+com.android.tools.lint:lint-typedef-remover:30.2.0=classpath
+com.android.tools.utp:android-device-provider-ddmlib-proto:30.2.0=classpath
+com.android.tools.utp:android-device-provider-gradle-proto:30.2.0=classpath
+com.android.tools.utp:android-test-plugin-host-additional-test-output-proto:30.2.0=classpath
+com.android.tools.utp:android-test-plugin-host-coverage-proto:30.2.0=classpath
+com.android.tools.utp:android-test-plugin-host-retention-proto:30.2.0=classpath
+com.android.tools.utp:android-test-plugin-result-listener-gradle-proto:30.2.0=classpath
+com.android.tools:annotations:30.2.0=classpath
+com.android.tools:common:30.2.0=classpath
+com.android.tools:dvlib:30.2.0=classpath
+com.android.tools:repository:30.2.0=classpath
+com.android.tools:sdk-common:30.2.0=classpath
+com.android.tools:sdklib:30.2.0=classpath
+com.android:signflinger:7.2.0=classpath
+com.android:zipflinger:7.2.0=classpath
+com.fasterxml.jackson.core:jackson-annotations:2.11.1=classpath
+com.fasterxml.jackson.core:jackson-core:2.11.1=classpath
+com.fasterxml.jackson.core:jackson-databind:2.11.1=classpath
+com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.11.1=classpath
+com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.11.1=classpath
+com.fasterxml.jackson.module:jackson-module-kotlin:2.11.1=classpath
+com.fasterxml.woodstox:woodstox-core:6.2.1=classpath
+com.github.gundy:semver4j:0.16.4=classpath
+com.google.android:annotations:4.1.1.4=classpath
+com.google.api.grpc:proto-google-common-protos:1.12.0=classpath
+com.google.auto.value:auto-value-annotations:1.6.2=classpath
+com.google.code.findbugs:jsr305:3.0.2=classpath
+com.google.code.gson:gson:2.8.6=classpath
+com.google.crypto.tink:tink:1.3.0-rc2=classpath
+com.google.dagger:dagger:2.28.3=classpath
+com.google.errorprone:error_prone_annotations:2.3.4=classpath
+com.google.flatbuffers:flatbuffers-java:1.12.0=classpath
+com.google.guava:failureaccess:1.0.1=classpath
+com.google.guava:guava:30.1-jre=classpath
+com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=classpath
+com.google.j2objc:j2objc-annotations:1.3=classpath
+com.google.jimfs:jimfs:1.1=classpath
+com.google.protobuf:protobuf-java-util:3.10.0=classpath
+com.google.protobuf:protobuf-java:3.10.0=classpath
+com.google.testing.platform:core-proto:0.0.8-alpha07=classpath
+com.googlecode.json-simple:json-simple:1.1=classpath
+com.googlecode.juniversalchardet:juniversalchardet:1.0.3=classpath
+com.squareup:javapoet:1.10.0=classpath
+com.squareup:javawriter:2.5.0=classpath
+com.sun.activation:javax.activation:1.2.0=classpath
+com.sun.istack:istack-commons-runtime:3.0.8=classpath
+com.sun.xml.fastinfoset:FastInfoset:1.2.16=classpath
+commons-codec:commons-codec:1.11=classpath
+commons-io:commons-io:2.4=classpath
+commons-logging:commons-logging:1.2=classpath
+de.undercouch:gradle-download-task:4.1.1=classpath
+io.grpc:grpc-api:1.21.1=classpath
+io.grpc:grpc-context:1.21.1=classpath
+io.grpc:grpc-core:1.21.1=classpath
+io.grpc:grpc-netty:1.21.1=classpath
+io.grpc:grpc-protobuf-lite:1.21.1=classpath
+io.grpc:grpc-protobuf:1.21.1=classpath
+io.grpc:grpc-stub:1.21.1=classpath
+io.netty:netty-buffer:4.1.34.Final=classpath
+io.netty:netty-codec-http2:4.1.34.Final=classpath
+io.netty:netty-codec-http:4.1.34.Final=classpath
+io.netty:netty-codec-socks:4.1.34.Final=classpath
+io.netty:netty-codec:4.1.34.Final=classpath
+io.netty:netty-common:4.1.34.Final=classpath
+io.netty:netty-handler-proxy:4.1.34.Final=classpath
+io.netty:netty-handler:4.1.34.Final=classpath
+io.netty:netty-resolver:4.1.34.Final=classpath
+io.netty:netty-transport:4.1.34.Final=classpath
+io.opencensus:opencensus-api:0.21.0=classpath
+io.opencensus:opencensus-contrib-grpc-metrics:0.21.0=classpath
+it.unimi.dsi:fastutil:8.4.0=classpath
+jakarta.activation:jakarta.activation-api:1.2.1=classpath
+jakarta.xml.bind:jakarta.xml.bind-api:2.3.2=classpath
+javax.inject:javax.inject:1=classpath
+net.java.dev.jna:jna-platform:5.6.0=classpath
+net.java.dev.jna:jna:5.6.0=classpath
+net.sf.jopt-simple:jopt-simple:4.9=classpath
+net.sf.kxml:kxml2:2.3.0=classpath
+org.apache.commons:commons-compress:1.20=classpath
+org.apache.httpcomponents:httpclient:4.5.9=classpath
+org.apache.httpcomponents:httpcore:4.4.11=classpath
+org.apache.httpcomponents:httpmime:4.5.6=classpath
+org.bitbucket.b_c:jose4j:0.7.0=classpath
+org.bouncycastle:bcpkix-jdk15on:1.56=classpath
+org.bouncycastle:bcprov-jdk15on:1.56=classpath
+org.checkerframework:checker-qual:3.5.0=classpath
+org.codehaus.mojo:animal-sniffer-annotations:1.17=classpath
+org.codehaus.woodstox:stax2-api:4.2.1=classpath
+org.glassfish.jaxb:jaxb-runtime:2.3.2=classpath
+org.glassfish.jaxb:txw2:2.3.2=classpath
+org.jdom:jdom2:2.0.6=classpath
+org.jetbrains.dokka:dokka-core:1.4.32=classpath
+org.jetbrains.intellij.deps:trove4j:1.0.20181211=classpath
+org.jetbrains.kotlin:kotlin-android-extensions:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-annotation-processing-gradle:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-build-common:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-compiler-embeddable:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-compiler-runner:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-daemon-client:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-daemon-embeddable:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-gradle-plugin-model:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-klib-commonizer-api:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-native-utils:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-project-model:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-reflect:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-scripting-common:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-scripting-jvm:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-stdlib-common:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-stdlib:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-tooling-metadata:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-util-io:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-util-klib:1.5.31=classpath
+org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.5.0=classpath
+org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0=classpath
+org.jetbrains:annotations:13.0=classpath
+org.jetbrains:markdown-jvm:0.2.1=classpath
+org.jetbrains:markdown:0.2.1=classpath
+org.json:json:20180813=classpath
+org.jsoup:jsoup:1.13.1=classpath
+org.jvnet.staxex:stax-ex:1.8.1=classpath
+org.ow2.asm:asm-analysis:9.1=classpath
+org.ow2.asm:asm-commons:9.1=classpath
+org.ow2.asm:asm-tree:9.1=classpath
+org.ow2.asm:asm-util:9.1=classpath
+org.ow2.asm:asm:9.1=classpath
+org.slf4j:slf4j-api:1.7.30=classpath
+org.tensorflow:tensorflow-lite-metadata:0.1.0-rc2=classpath
+xerces:xercesImpl:2.12.0=classpath
+xml-apis:xml-apis:1.4.01=classpath
+empty=
diff --git a/flutter/examples/platform_channel/android/gradle.properties b/flutter/examples/platform_channel/android/gradle.properties
new file mode 100644
index 0000000000000000000000000000000000000000..598d13fee446372f156ecc38527b54c7cdcc8e3b
--- /dev/null
+++ b/flutter/examples/platform_channel/android/gradle.properties
@@ -0,0 +1,3 @@
+org.gradle.jvmargs=-Xmx4G
+android.useAndroidX=true
+android.enableJetifier=true
diff --git a/flutter/examples/platform_channel/android/gradle/wrapper/gradle-wrapper.properties b/flutter/examples/platform_channel/android/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000000000000000000000000000000000000..e1ca574ef017c1bc00556b96ea372e2c07948771
--- /dev/null
+++ b/flutter/examples/platform_channel/android/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,5 @@
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip
diff --git a/flutter/examples/platform_channel/android/project-app.lockfile b/flutter/examples/platform_channel/android/project-app.lockfile
new file mode 100644
index 0000000000000000000000000000000000000000..a482ce1f40d46fcd124bffd55b61609d975c6f65
--- /dev/null
+++ b/flutter/examples/platform_channel/android/project-app.lockfile
@@ -0,0 +1,129 @@
+# 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,releaseUnitTestRuntimeClasspath
+androidx.annotation:annotation-experimental:1.1.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.annotation:annotation:1.2.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.arch.core:core-common:2.1.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.arch.core:core-runtime:2.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.collection:collection:1.1.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.core:core:1.6.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.customview:customview:1.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.fragment:fragment:1.1.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.lifecycle:lifecycle-common-java8:2.2.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.lifecycle:lifecycle-common:2.2.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.lifecycle:lifecycle-livedata-core:2.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.lifecycle:lifecycle-livedata:2.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.lifecycle:lifecycle-runtime:2.2.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.lifecycle:lifecycle-viewmodel:2.1.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.loader:loader:1.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.savedstate:savedstate:1.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.test.espresso:espresso-core:3.1.1=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath
+androidx.test.espresso:espresso-idling-resource:3.1.1=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath
+androidx.test:monitor:1.1.1=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath
+androidx.test:runner:1.1.1=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath
+androidx.tracing:tracing:1.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.versionedparcelable:versionedparcelable:1.1.1=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.viewpager:viewpager:1.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.window:window-java:1.0.0-beta04=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.window:window:1.0.0-beta04=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+com.android.tools.analytics-library:protos:27.1.3=lintClassPath
+com.android.tools.analytics-library:shared:27.1.3=lintClassPath
+com.android.tools.analytics-library:tracker:27.1.3=lintClassPath
+com.android.tools.build:aapt2-proto:4.1.0-alpha01-6193524=lintClassPath
+com.android.tools.build:aapt2:4.1.3-6503028=_internal_aapt2_binary
+com.android.tools.build:apksig:4.1.3=lintClassPath
+com.android.tools.build:apkzlib:4.1.3=lintClassPath
+com.android.tools.build:builder-model:4.1.3=lintClassPath
+com.android.tools.build:builder-test-api:4.1.3=lintClassPath
+com.android.tools.build:builder:4.1.3=lintClassPath
+com.android.tools.build:gradle-api:4.1.3=lintClassPath
+com.android.tools.build:manifest-merger:27.1.3=lintClassPath
+com.android.tools.ddms:ddmlib:27.1.3=lintClassPath
+com.android.tools.external.com-intellij:intellij-core:27.1.3=lintClassPath
+com.android.tools.external.com-intellij:kotlin-compiler:27.1.3=lintClassPath
+com.android.tools.external.org-jetbrains:uast:27.1.3=lintClassPath
+com.android.tools.layoutlib:layoutlib-api:27.1.3=lintClassPath
+com.android.tools.lint:lint-api:27.1.3=lintClassPath
+com.android.tools.lint:lint-checks:27.1.3=lintClassPath
+com.android.tools.lint:lint-gradle-api:27.1.3=lintClassPath
+com.android.tools.lint:lint-gradle:27.1.3=lintClassPath
+com.android.tools.lint:lint-model:27.1.3=lintClassPath
+com.android.tools.lint:lint:27.1.3=lintClassPath
+com.android.tools:annotations:27.1.3=lintClassPath
+com.android.tools:common:27.1.3=lintClassPath
+com.android.tools:dvlib:27.1.3=lintClassPath
+com.android.tools:repository:27.1.3=lintClassPath
+com.android.tools:sdk-common:27.1.3=lintClassPath
+com.android.tools:sdklib:27.1.3=lintClassPath
+com.android:signflinger:4.1.3=lintClassPath
+com.android:zipflinger:4.1.3=lintClassPath
+com.google.code.findbugs:jsr305:2.0.1=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath
+com.google.code.findbugs:jsr305:3.0.2=lintClassPath
+com.google.code.gson:gson:2.8.5=lintClassPath
+com.google.errorprone:error_prone_annotations:2.3.2=lintClassPath
+com.google.guava:failureaccess:1.0.1=lintClassPath
+com.google.guava:guava:28.1-jre=lintClassPath
+com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=lintClassPath
+com.google.j2objc:j2objc-annotations:1.3=lintClassPath
+com.google.jimfs:jimfs:1.1=lintClassPath
+com.google.protobuf:protobuf-java:3.10.0=lintClassPath
+com.googlecode.json-simple:json-simple:1.1=lintClassPath
+com.squareup:javawriter:2.1.1=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath
+com.squareup:javawriter:2.5.0=lintClassPath
+com.sun.activation:javax.activation:1.2.0=lintClassPath
+com.sun.istack:istack-commons-runtime:3.0.7=lintClassPath
+com.sun.xml.fastinfoset:FastInfoset:1.2.15=lintClassPath
+commons-codec:commons-codec:1.10=lintClassPath
+commons-logging:commons-logging:1.2=lintClassPath
+it.unimi.dsi:fastutil:7.2.0=lintClassPath
+javax.activation:javax.activation-api:1.2.0=lintClassPath
+javax.inject:javax.inject:1=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,lintClassPath
+javax.xml.bind:jaxb-api:2.3.1=lintClassPath
+junit:junit:4.12=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath
+junit:junit:4.13=debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+net.sf.jopt-simple:jopt-simple:4.9=lintClassPath
+net.sf.kxml:kxml2:2.3.0=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,lintClassPath
+org.apache.commons:commons-compress:1.12=lintClassPath
+org.apache.httpcomponents:httpclient:4.5.6=lintClassPath
+org.apache.httpcomponents:httpcore:4.4.10=lintClassPath
+org.apache.httpcomponents:httpmime:4.5.6=lintClassPath
+org.bouncycastle:bcpkix-jdk15on:1.56=lintClassPath
+org.bouncycastle:bcprov-jdk15on:1.56=lintClassPath
+org.checkerframework:checker-qual:2.8.1=lintClassPath
+org.codehaus.groovy:groovy-all:2.4.15=lintClassPath
+org.codehaus.mojo:animal-sniffer-annotations:1.18=lintClassPath
+org.glassfish.jaxb:jaxb-runtime:2.3.1=lintClassPath
+org.glassfish.jaxb:txw2:2.3.1=lintClassPath
+org.hamcrest:hamcrest-core:1.3=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+org.hamcrest:hamcrest-integration:1.3=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath
+org.hamcrest:hamcrest-library:1.3=debugAndroidTestCompileClasspath,debugAndroidTestRuntimeClasspath
+org.jacoco:org.jacoco.agent:0.8.7=androidJacocoAnt
+org.jacoco:org.jacoco.ant:0.8.7=androidJacocoAnt
+org.jacoco:org.jacoco.core:0.8.7=androidJacocoAnt
+org.jacoco:org.jacoco.report:0.8.7=androidJacocoAnt
+org.jetbrains.kotlin:kotlin-reflect:1.3.72=lintClassPath
+org.jetbrains.kotlin:kotlin-stdlib-common:1.3.72=lintClassPath
+org.jetbrains.kotlin:kotlin-stdlib-common:1.5.31=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.72=lintClassPath
+org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.5.30=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.72=lintClassPath
+org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.30=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+org.jetbrains.kotlin:kotlin-stdlib:1.3.72=lintClassPath
+org.jetbrains.kotlin:kotlin-stdlib:1.5.31=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.5.2=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+org.jetbrains.trove4j:trove4j:20160824=lintClassPath
+org.jetbrains:annotations:13.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,lintClassPath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+org.jvnet.staxex:stax-ex:1.8=lintClassPath
+org.ow2.asm:asm-analysis:7.0=lintClassPath
+org.ow2.asm:asm-analysis:9.1=androidJacocoAnt
+org.ow2.asm:asm-commons:7.0=lintClassPath
+org.ow2.asm:asm-commons:9.1=androidJacocoAnt
+org.ow2.asm:asm-tree:7.0=lintClassPath
+org.ow2.asm:asm-tree:9.1=androidJacocoAnt
+org.ow2.asm:asm-util:7.0=lintClassPath
+org.ow2.asm:asm:7.0=lintClassPath
+org.ow2.asm:asm:9.1=androidJacocoAnt
+empty=androidApis,androidJdkImage,androidTestUtil,compile,coreLibraryDesugaring,debugAndroidTestAnnotationProcessorClasspath,debugAnnotationProcessorClasspath,debugReverseMetadataValues,debugUnitTestAnnotationProcessorClasspath,debugWearBundling,lintChecks,lintPublish,profileAnnotationProcessorClasspath,profileReverseMetadataValues,profileUnitTestAnnotationProcessorClasspath,profileWearBundling,releaseAnnotationProcessorClasspath,releaseReverseMetadataValues,releaseUnitTestAnnotationProcessorClasspath,releaseWearBundling,testCompile
diff --git a/flutter/examples/platform_channel/android/settings.gradle b/flutter/examples/platform_channel/android/settings.gradle
new file mode 100644
index 0000000000000000000000000000000000000000..03ae72d135c01f849e6812b36575b62b14fee791
--- /dev/null
+++ b/flutter/examples/platform_channel/android/settings.gradle
@@ -0,0 +1,21 @@
+// 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"
diff --git a/flutter/examples/platform_channel/ios/Flutter/AppFrameworkInfo.plist b/flutter/examples/platform_channel/ios/Flutter/AppFrameworkInfo.plist
new file mode 100644
index 0000000000000000000000000000000000000000..8c6e56146e23c84aa60ea78f20bc3a7b3d8ef259
--- /dev/null
+++ b/flutter/examples/platform_channel/ios/Flutter/AppFrameworkInfo.plist
@@ -0,0 +1,26 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ $(DEVELOPMENT_LANGUAGE)
+ CFBundleExecutable
+ App
+ CFBundleIdentifier
+ io.flutter.flutter.app
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ App
+ CFBundlePackageType
+ FMWK
+ CFBundleShortVersionString
+ 1.0
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ 1.0
+ MinimumOSVersion
+ 12.0
+
+
diff --git a/flutter/examples/platform_channel/ios/Flutter/Debug.xcconfig b/flutter/examples/platform_channel/ios/Flutter/Debug.xcconfig
new file mode 100644
index 0000000000000000000000000000000000000000..592ceee85b89bd111b779db6116b130509ab6d4b
--- /dev/null
+++ b/flutter/examples/platform_channel/ios/Flutter/Debug.xcconfig
@@ -0,0 +1 @@
+#include "Generated.xcconfig"
diff --git a/flutter/examples/platform_channel/ios/Flutter/Release.xcconfig b/flutter/examples/platform_channel/ios/Flutter/Release.xcconfig
new file mode 100644
index 0000000000000000000000000000000000000000..592ceee85b89bd111b779db6116b130509ab6d4b
--- /dev/null
+++ b/flutter/examples/platform_channel/ios/Flutter/Release.xcconfig
@@ -0,0 +1 @@
+#include "Generated.xcconfig"
diff --git a/flutter/examples/platform_channel/ios/Runner.xcodeproj/project.pbxproj b/flutter/examples/platform_channel/ios/Runner.xcodeproj/project.pbxproj
new file mode 100644
index 0000000000000000000000000000000000000000..5e51a2118c80019a52a0dc52be8ffbb35516c7c3
--- /dev/null
+++ b/flutter/examples/platform_channel/ios/Runner.xcodeproj/project.pbxproj
@@ -0,0 +1,474 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 54;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
+ 74970F681EDC0F26000507F3 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 74970F671EDC0F26000507F3 /* GeneratedPluginRegistrant.m */; };
+ 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
+ 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
+ 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
+ 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
+ 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+ 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 2147483647;
+ dstPath = "";
+ dstSubfolderSpec = 10;
+ files = (
+ );
+ name = "Embed Frameworks";
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+ 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
+ 74970F661EDC0F26000507F3 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
+ 74970F671EDC0F26000507F3 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
+ 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
+ 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
+ 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
+ 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
+ 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
+ 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
+ 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
+ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
+ 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
+ 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 97C146EB1CF9000F007C117D /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 9740EEB11CF90186004384FC /* Flutter */ = {
+ isa = PBXGroup;
+ children = (
+ 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
+ 9740EEB21CF90195004384FC /* Debug.xcconfig */,
+ 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
+ 9740EEB31CF90195004384FC /* Generated.xcconfig */,
+ );
+ name = Flutter;
+ sourceTree = "";
+ };
+ 97C146E51CF9000F007C117D = {
+ isa = PBXGroup;
+ children = (
+ 9740EEB11CF90186004384FC /* Flutter */,
+ 97C146F01CF9000F007C117D /* Runner */,
+ 97C146EF1CF9000F007C117D /* Products */,
+ CF3B75C9A7D2FA2A4C99F110 /* Frameworks */,
+ );
+ sourceTree = "";
+ };
+ 97C146EF1CF9000F007C117D /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 97C146EE1CF9000F007C117D /* Runner.app */,
+ );
+ name = Products;
+ sourceTree = "";
+ };
+ 97C146F01CF9000F007C117D /* Runner */ = {
+ isa = PBXGroup;
+ children = (
+ 74970F661EDC0F26000507F3 /* GeneratedPluginRegistrant.h */,
+ 74970F671EDC0F26000507F3 /* GeneratedPluginRegistrant.m */,
+ 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */,
+ 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */,
+ 97C146FA1CF9000F007C117D /* Main.storyboard */,
+ 97C146FD1CF9000F007C117D /* Assets.xcassets */,
+ 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
+ 97C147021CF9000F007C117D /* Info.plist */,
+ 97C146F11CF9000F007C117D /* Supporting Files */,
+ );
+ path = Runner;
+ sourceTree = "";
+ };
+ 97C146F11CF9000F007C117D /* Supporting Files */ = {
+ isa = PBXGroup;
+ children = (
+ 97C146F21CF9000F007C117D /* main.m */,
+ );
+ name = "Supporting Files";
+ sourceTree = "";
+ };
+ CF3B75C9A7D2FA2A4C99F110 /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ );
+ name = Frameworks;
+ sourceTree = "";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 97C146ED1CF9000F007C117D /* Runner */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
+ buildPhases = (
+ 9740EEB61CF901F6004384FC /* Run Script */,
+ 97C146EA1CF9000F007C117D /* Sources */,
+ 97C146EB1CF9000F007C117D /* Frameworks */,
+ 97C146EC1CF9000F007C117D /* Resources */,
+ 9705A1C41CF9048500538489 /* Embed Frameworks */,
+ 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = Runner;
+ productName = Runner;
+ productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 97C146E61CF9000F007C117D /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 1510;
+ ORGANIZATIONNAME = "The Flutter Authors";
+ TargetAttributes = {
+ 97C146ED1CF9000F007C117D = {
+ CreatedOnToolsVersion = 7.3.1;
+ };
+ };
+ };
+ buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
+ compatibilityVersion = "Xcode 3.2";
+ developmentRegion = en;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ Base,
+ );
+ mainGroup = 97C146E51CF9000F007C117D;
+ productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 97C146ED1CF9000F007C117D /* Runner */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 97C146EC1CF9000F007C117D /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
+ 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
+ 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
+ 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+ 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
+ isa = PBXShellScriptBuildPhase;
+ alwaysOutOfDate = 1;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
+ );
+ name = "Thin Binary";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
+ };
+ 9740EEB61CF901F6004384FC /* Run Script */ = {
+ isa = PBXShellScriptBuildPhase;
+ alwaysOutOfDate = 1;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ name = "Run Script";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
+ };
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 97C146EA1CF9000F007C117D /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */,
+ 97C146F31CF9000F007C117D /* main.m in Sources */,
+ 74970F681EDC0F26000507F3 /* GeneratedPluginRegistrant.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+ 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 97C146FB1CF9000F007C117D /* Base */,
+ );
+ name = Main.storyboard;
+ sourceTree = "";
+ };
+ 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 97C147001CF9000F007C117D /* Base */,
+ );
+ name = LaunchScreen.storyboard;
+ sourceTree = "";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ 2460D06F21828D6700436BDB /* Profile */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 12.0;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ SDKROOT = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Profile;
+ };
+ 2460D07021828D6700436BDB /* Profile */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ ENABLE_BITCODE = NO;
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.PlatformChannel;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Profile;
+ };
+ 97C147031CF9000F007C117D /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ ENABLE_TESTABILITY = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 12.0;
+ MTL_ENABLE_DEBUG_INFO = YES;
+ ONLY_ACTIVE_ARCH = YES;
+ SDKROOT = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ };
+ name = Debug;
+ };
+ 97C147041CF9000F007C117D /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 12.0;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ SDKROOT = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Release;
+ };
+ 97C147061CF9000F007C117D /* Debug */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ ENABLE_BITCODE = NO;
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.PlatformChannel;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Debug;
+ };
+ 97C147071CF9000F007C117D /* Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ ENABLE_BITCODE = NO;
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.PlatformChannel;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 97C147031CF9000F007C117D /* Debug */,
+ 97C147041CF9000F007C117D /* Release */,
+ 2460D06F21828D6700436BDB /* Profile */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 97C147061CF9000F007C117D /* Debug */,
+ 97C147071CF9000F007C117D /* Release */,
+ 2460D07021828D6700436BDB /* Profile */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 97C146E61CF9000F007C117D /* Project object */;
+}
diff --git a/flutter/examples/platform_channel/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/flutter/examples/platform_channel/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000000000000000000000000000000000000..919434a6254f0e9651f402737811be6634a03e9c
--- /dev/null
+++ b/flutter/examples/platform_channel/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+
+
+
+
+
diff --git a/flutter/examples/platform_channel/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/flutter/examples/platform_channel/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 0000000000000000000000000000000000000000..18d981003d68d0546c4804ac2ff47dd97c6e7921
--- /dev/null
+++ b/flutter/examples/platform_channel/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/flutter/examples/platform_channel/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/flutter/examples/platform_channel/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
new file mode 100644
index 0000000000000000000000000000000000000000..e67b2808af02f9ec16f2d72b7961aefdf844afa5
--- /dev/null
+++ b/flutter/examples/platform_channel/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
@@ -0,0 +1,91 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/flutter/examples/platform_channel/ios/Runner.xcworkspace/contents.xcworkspacedata b/flutter/examples/platform_channel/ios/Runner.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000000000000000000000000000000000000..1d526a16ed0f1cd0c2409d848bf489b93fefa3b2
--- /dev/null
+++ b/flutter/examples/platform_channel/ios/Runner.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+
+
+
+
+
diff --git a/flutter/examples/platform_channel/ios/Runner/AppDelegate.h b/flutter/examples/platform_channel/ios/Runner/AppDelegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..ee7664daab9799e6bfe925cfd65446b730876abc
--- /dev/null
+++ b/flutter/examples/platform_channel/ios/Runner/AppDelegate.h
@@ -0,0 +1,10 @@
+// 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
+#import
+
+@interface AppDelegate : FlutterAppDelegate
+
+@end
diff --git a/flutter/examples/platform_channel/ios/Runner/AppDelegate.m b/flutter/examples/platform_channel/ios/Runner/AppDelegate.m
new file mode 100644
index 0000000000000000000000000000000000000000..31512fc8c78479a01ade3cb992476ed7c3bf1adc
--- /dev/null
+++ b/flutter/examples/platform_channel/ios/Runner/AppDelegate.m
@@ -0,0 +1,98 @@
+// 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 "AppDelegate.h"
+#import
+#import "GeneratedPluginRegistrant.h"
+
+@implementation AppDelegate {
+ FlutterEventSink _eventSink;
+}
+
+- (BOOL)application:(UIApplication*)application
+ didFinishLaunchingWithOptions:(NSDictionary*)launchOptions {
+ [GeneratedPluginRegistrant registerWithRegistry:self];
+ FlutterViewController* controller =
+ (FlutterViewController*)self.window.rootViewController;
+
+ FlutterMethodChannel* batteryChannel = [FlutterMethodChannel
+ methodChannelWithName:@"samples.flutter.io/battery"
+ binaryMessenger:controller];
+ __weak typeof(self) weakSelf = self;
+ [batteryChannel setMethodCallHandler:^(FlutterMethodCall* call,
+ FlutterResult result) {
+ if ([@"getBatteryLevel" isEqualToString:call.method]) {
+ int batteryLevel = [weakSelf getBatteryLevel];
+ if (batteryLevel == -1) {
+ result([FlutterError errorWithCode:@"UNAVAILABLE"
+ message:@"Battery info unavailable"
+ details:nil]);
+ } else {
+ result(@(batteryLevel));
+ }
+ } else {
+ result(FlutterMethodNotImplemented);
+ }
+ }];
+
+ FlutterEventChannel* chargingChannel = [FlutterEventChannel
+ eventChannelWithName:@"samples.flutter.io/charging"
+ binaryMessenger:controller];
+ [chargingChannel setStreamHandler:self];
+ return [super application:application didFinishLaunchingWithOptions:launchOptions];
+}
+
+- (int)getBatteryLevel {
+ UIDevice* device = UIDevice.currentDevice;
+ device.batteryMonitoringEnabled = YES;
+ if (device.batteryState == UIDeviceBatteryStateUnknown) {
+ return -1;
+ } else {
+ return ((int)(device.batteryLevel * 100));
+ }
+}
+
+- (FlutterError*)onListenWithArguments:(id)arguments
+ eventSink:(FlutterEventSink)eventSink {
+ _eventSink = eventSink;
+ [[UIDevice currentDevice] setBatteryMonitoringEnabled:YES];
+ [self sendBatteryStateEvent];
+ [[NSNotificationCenter defaultCenter]
+ addObserver:self
+ selector:@selector(onBatteryStateDidChange:)
+ name:UIDeviceBatteryStateDidChangeNotification
+ object:nil];
+ return nil;
+}
+
+- (void)onBatteryStateDidChange:(NSNotification*)notification {
+ [self sendBatteryStateEvent];
+}
+
+- (void)sendBatteryStateEvent {
+ if (!_eventSink) return;
+ UIDeviceBatteryState state = [[UIDevice currentDevice] batteryState];
+ switch (state) {
+ case UIDeviceBatteryStateFull:
+ case UIDeviceBatteryStateCharging:
+ _eventSink(@"charging");
+ break;
+ case UIDeviceBatteryStateUnplugged:
+ _eventSink(@"discharging");
+ break;
+ default:
+ _eventSink([FlutterError errorWithCode:@"UNAVAILABLE"
+ message:@"Charging status unavailable"
+ details:nil]);
+ break;
+ }
+}
+
+- (FlutterError*)onCancelWithArguments:(id)arguments {
+ [[NSNotificationCenter defaultCenter] removeObserver:self];
+ _eventSink = nil;
+ return nil;
+}
+
+@end
diff --git a/flutter/examples/platform_channel/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/flutter/examples/platform_channel/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
new file mode 100644
index 0000000000000000000000000000000000000000..1d060ed28827ed6aca9565d946e6b5595c8978df
--- /dev/null
+++ b/flutter/examples/platform_channel/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
@@ -0,0 +1,93 @@
+{
+ "images" : [
+ {
+ "idiom" : "iphone",
+ "size" : "20x20",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "iphone",
+ "size" : "20x20",
+ "scale" : "3x"
+ },
+ {
+ "idiom" : "iphone",
+ "size" : "29x29",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "iphone",
+ "size" : "29x29",
+ "scale" : "3x"
+ },
+ {
+ "idiom" : "iphone",
+ "size" : "40x40",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "iphone",
+ "size" : "40x40",
+ "scale" : "3x"
+ },
+ {
+ "idiom" : "iphone",
+ "size" : "60x60",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "iphone",
+ "size" : "60x60",
+ "scale" : "3x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "20x20",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "20x20",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "29x29",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "29x29",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "40x40",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "40x40",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "76x76",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "76x76",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "83.5x83.5",
+ "scale" : "2x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/flutter/examples/platform_channel/ios/Runner/Base.lproj/LaunchScreen.storyboard b/flutter/examples/platform_channel/ios/Runner/Base.lproj/LaunchScreen.storyboard
new file mode 100644
index 0000000000000000000000000000000000000000..ebf48f6039745ccdb57ad6237321024eb6cdf9af
--- /dev/null
+++ b/flutter/examples/platform_channel/ios/Runner/Base.lproj/LaunchScreen.storyboard
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/flutter/examples/platform_channel/ios/Runner/Base.lproj/Main.storyboard b/flutter/examples/platform_channel/ios/Runner/Base.lproj/Main.storyboard
new file mode 100644
index 0000000000000000000000000000000000000000..f3c28516fb38e64d88cfcf5fb1791175df078f2f
--- /dev/null
+++ b/flutter/examples/platform_channel/ios/Runner/Base.lproj/Main.storyboard
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/flutter/examples/platform_channel/ios/Runner/Info.plist b/flutter/examples/platform_channel/ios/Runner/Info.plist
new file mode 100644
index 0000000000000000000000000000000000000000..97a48d5f7b0c45327f5381bdafd85f70966c9735
--- /dev/null
+++ b/flutter/examples/platform_channel/ios/Runner/Info.plist
@@ -0,0 +1,47 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ $(DEVELOPMENT_LANGUAGE)
+ CFBundleExecutable
+ $(EXECUTABLE_NAME)
+ CFBundleIdentifier
+ $(PRODUCT_BUNDLE_IDENTIFIER)
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ PlatformChannel
+ CFBundlePackageType
+ APPL
+ CFBundleShortVersionString
+ 1.0
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ 1
+ LSRequiresIPhoneOS
+
+ UILaunchStoryboardName
+ LaunchScreen
+ UIMainStoryboardFile
+ Main
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UISupportedInterfaceOrientations~ipad
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationPortraitUpsideDown
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ CADisableMinimumFrameDurationOnPhone
+
+ UIApplicationSupportsIndirectInputEvents
+
+
+
diff --git a/flutter/examples/platform_channel/ios/Runner/main.m b/flutter/examples/platform_channel/ios/Runner/main.m
new file mode 100644
index 0000000000000000000000000000000000000000..1d8e5c06c2cf4644b1872d3651116c63a762667b
--- /dev/null
+++ b/flutter/examples/platform_channel/ios/Runner/main.m
@@ -0,0 +1,14 @@
+// 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
+#import
+#import "AppDelegate.h"
+
+int main(int argc, char * argv[]) {
+ @autoreleasepool {
+ return UIApplicationMain(argc, argv, nil,
+ NSStringFromClass([AppDelegate class]));
+ }
+}
diff --git a/flutter/examples/platform_channel/lib/main.dart b/flutter/examples/platform_channel/lib/main.dart
new file mode 100644
index 0000000000000000000000000000000000000000..ede86a0f1b9eaf73a4d28e9179a366150a235bd1
--- /dev/null
+++ b/flutter/examples/platform_channel/lib/main.dart
@@ -0,0 +1,90 @@
+// 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 'dart:async';
+
+import 'package:flutter/material.dart';
+import 'package:flutter/services.dart';
+
+class PlatformChannel extends StatefulWidget {
+ const PlatformChannel({super.key});
+
+ @override
+ State createState() => _PlatformChannelState();
+}
+
+class _PlatformChannelState extends State {
+ static const MethodChannel methodChannel =
+ MethodChannel('samples.flutter.io/battery');
+ static const EventChannel eventChannel =
+ EventChannel('samples.flutter.io/charging');
+
+ String _batteryLevel = 'Battery level: unknown.';
+ String _chargingStatus = 'Battery status: unknown.';
+
+ Future _getBatteryLevel() async {
+ String batteryLevel;
+ try {
+ final int? result = await methodChannel.invokeMethod('getBatteryLevel');
+ batteryLevel = 'Battery level: $result%.';
+ } on PlatformException catch (e) {
+ if (e.code == 'NO_BATTERY') {
+ batteryLevel = 'No battery.';
+ } else {
+ batteryLevel = 'Failed to get battery level.';
+ }
+ }
+ setState(() {
+ _batteryLevel = batteryLevel;
+ });
+ }
+
+ @override
+ void initState() {
+ super.initState();
+ eventChannel.receiveBroadcastStream().listen(_onEvent, onError: _onError);
+ }
+
+ void _onEvent(Object? event) {
+ setState(() {
+ _chargingStatus =
+ "Battery status: ${event == 'charging' ? '' : 'dis'}charging.";
+ });
+ }
+
+ void _onError(Object error) {
+ setState(() {
+ _chargingStatus = 'Battery status: unknown.';
+ });
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return Material(
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.spaceEvenly,
+ children: [
+ Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Text(_batteryLevel, key: const Key('Battery level label')),
+ Padding(
+ padding: const EdgeInsets.all(16.0),
+ child: ElevatedButton(
+ onPressed: _getBatteryLevel,
+ child: const Text('Refresh'),
+ ),
+ ),
+ ],
+ ),
+ Text(_chargingStatus),
+ ],
+ ),
+ );
+ }
+}
+
+void main() {
+ runApp(const MaterialApp(home: PlatformChannel()));
+}
diff --git a/flutter/examples/platform_channel/linux/CMakeLists.txt b/flutter/examples/platform_channel/linux/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..3272f1ecd58ea92404cd19d6b3c8b065ecfccf3f
--- /dev/null
+++ b/flutter/examples/platform_channel/linux/CMakeLists.txt
@@ -0,0 +1,138 @@
+# 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 "platform_channel")
+# The unique GTK application identifier for this application. See:
+# https://wiki.gnome.org/HowDoI/ChooseApplicationID
+set(APPLICATION_ID "io.flutter.examples.platform_channel")
+
+# 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 "$<$>:-O3>")
+ target_compile_definitions(${TARGET} PRIVATE "$<$>: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 upower-glib)
+
+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()
diff --git a/flutter/examples/platform_channel/linux/flutter/CMakeLists.txt b/flutter/examples/platform_channel/linux/flutter/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..d5bd01648a96d50136b2a97c8bb9aa5b711f6c39
--- /dev/null
+++ b/flutter/examples/platform_channel/linux/flutter/CMakeLists.txt
@@ -0,0 +1,88 @@
+# This file controls Flutter-level build steps. It should not be edited.
+cmake_minimum_required(VERSION 3.10)
+
+set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral")
+
+# Configuration provided via flutter tool.
+include(${EPHEMERAL_DIR}/generated_config.cmake)
+
+# TODO: Move the rest of this into files in ephemeral. See
+# https://github.com/flutter/flutter/issues/57146.
+
+# Serves the same purpose as list(TRANSFORM ... PREPEND ...),
+# which isn't available in 3.10.
+function(list_prepend LIST_NAME PREFIX)
+ set(NEW_LIST "")
+ foreach(element ${${LIST_NAME}})
+ list(APPEND NEW_LIST "${PREFIX}${element}")
+ endforeach(element)
+ set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE)
+endfunction()
+
+# === Flutter Library ===
+# System-level dependencies.
+find_package(PkgConfig REQUIRED)
+pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
+pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0)
+pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0)
+
+set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so")
+
+# Published to parent scope for install step.
+set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE)
+set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE)
+set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE)
+set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE)
+
+list(APPEND FLUTTER_LIBRARY_HEADERS
+ "fl_basic_message_channel.h"
+ "fl_binary_codec.h"
+ "fl_binary_messenger.h"
+ "fl_dart_project.h"
+ "fl_engine.h"
+ "fl_json_message_codec.h"
+ "fl_json_method_codec.h"
+ "fl_message_codec.h"
+ "fl_method_call.h"
+ "fl_method_channel.h"
+ "fl_method_codec.h"
+ "fl_method_response.h"
+ "fl_plugin_registrar.h"
+ "fl_plugin_registry.h"
+ "fl_standard_message_codec.h"
+ "fl_standard_method_codec.h"
+ "fl_string_codec.h"
+ "fl_value.h"
+ "fl_view.h"
+ "flutter_linux.h"
+)
+list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/")
+add_library(flutter INTERFACE)
+target_include_directories(flutter INTERFACE
+ "${EPHEMERAL_DIR}"
+)
+target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}")
+target_link_libraries(flutter INTERFACE
+ PkgConfig::GTK
+ PkgConfig::GLIB
+ PkgConfig::GIO
+)
+add_dependencies(flutter flutter_assemble)
+
+# === Flutter tool backend ===
+# _phony_ is a non-existent file to force this command to run every time,
+# since currently there's no way to get a full input/output list from the
+# flutter tool.
+add_custom_command(
+ OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS}
+ ${CMAKE_CURRENT_BINARY_DIR}/_phony_
+ COMMAND ${CMAKE_COMMAND} -E env
+ ${FLUTTER_TOOL_ENVIRONMENT}
+ "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh"
+ ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE}
+ VERBATIM
+)
+add_custom_target(flutter_assemble DEPENDS
+ "${FLUTTER_LIBRARY}"
+ ${FLUTTER_LIBRARY_HEADERS}
+)
diff --git a/flutter/examples/platform_channel/linux/main.cc b/flutter/examples/platform_channel/linux/main.cc
new file mode 100644
index 0000000000000000000000000000000000000000..281a29e16b599a95421e7a35112eda77900ff549
--- /dev/null
+++ b/flutter/examples/platform_channel/linux/main.cc
@@ -0,0 +1,10 @@
+// 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);
+}
diff --git a/flutter/examples/platform_channel/linux/my_application.cc b/flutter/examples/platform_channel/linux/my_application.cc
new file mode 100644
index 0000000000000000000000000000000000000000..9abcb1bbb478375eab1704464e96cffa11980d6a
--- /dev/null
+++ b/flutter/examples/platform_channel/linux/my_application.cc
@@ -0,0 +1,303 @@
+// 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
+#include
+#include
+#ifdef GDK_WINDOWING_X11
+#include
+#endif
+
+#include "flutter/generated_plugin_registrant.h"
+
+struct _MyApplication {
+ GtkApplication parent_instance;
+ char** dart_entrypoint_arguments;
+
+ FlView* view;
+
+ // Connection to UPower.
+ UpClient* up_client;
+ GPtrArray* battery_devices;
+
+ // Channel for Dart code to request the battery information.
+ FlMethodChannel* battery_channel;
+
+ // Channel to send updates to Dart code about battery charging state.
+ FlEventChannel* charging_channel;
+ gchar* last_charge_event;
+ bool emit_charge_events;
+};
+
+G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION)
+
+// Checks the charging state and emits an event if necessary.
+static void update_charging_state(MyApplication* self) {
+ if (!self->emit_charge_events) {
+ return;
+ }
+
+ const gchar* charge_event = "discharging";
+ for (guint i = 0; i < self->battery_devices->len; i++) {
+ UpDevice* device =
+ static_cast(g_ptr_array_index(self->battery_devices, i));
+
+ guint state;
+ g_object_get(device, "state", &state, nullptr);
+ if (state == UP_DEVICE_STATE_CHARGING ||
+ state == UP_DEVICE_STATE_FULLY_CHARGED) {
+ charge_event = "charging";
+ }
+ }
+
+ if (g_strcmp0(charge_event, self->last_charge_event) != 0) {
+ g_autoptr(GError) error = nullptr;
+ g_autoptr(FlValue) value = fl_value_new_string(charge_event);
+ if (!fl_event_channel_send(self->charging_channel, value, nullptr,
+ &error)) {
+ g_warning("Failed to send charging event: %s", error->message);
+ return;
+ }
+ g_free(self->last_charge_event);
+ self->last_charge_event = g_strdup(charge_event);
+ }
+}
+
+// Called when a UPower device changes state.
+static void up_device_state_changed_cb(MyApplication* self, GParamSpec* pspec,
+ UpDevice* device) {
+ update_charging_state(self);
+}
+
+// Called when UPower devices are added.
+static void up_device_added_cb(MyApplication* self, UpDevice* device) {
+ // Listen for state changes from battery_devices.
+ guint kind;
+ g_object_get(device, "kind", &kind, nullptr);
+ if (kind == UP_DEVICE_KIND_BATTERY) {
+ g_ptr_array_add(self->battery_devices, g_object_ref(device));
+ g_signal_connect_swapped(device, "notify::state",
+ G_CALLBACK(up_device_state_changed_cb), self);
+ up_device_state_changed_cb(self, nullptr, device);
+ }
+}
+
+// Called when UPower devices are removed.
+static void up_device_removed_cb(MyApplication* self, UpDevice* device) {
+ g_ptr_array_remove(self->battery_devices, device);
+ g_signal_handlers_disconnect_matched(
+ device, G_SIGNAL_MATCH_FUNC, 0, 0, nullptr,
+ reinterpret_cast(up_device_state_changed_cb), nullptr);
+}
+
+// Gets the current battery level.
+static FlMethodResponse* get_battery_level(MyApplication* self) {
+ // Find the first available battery and use that.
+ for (guint i = 0; i < self->battery_devices->len; i++) {
+ UpDevice* device =
+ static_cast(g_ptr_array_index(self->battery_devices, i));
+
+ double percentage;
+ g_object_get(device, "percentage", &percentage, nullptr);
+ g_autoptr(FlValue) result =
+ fl_value_new_int(static_cast(round(percentage)));
+ return FL_METHOD_RESPONSE(fl_method_success_response_new(result));
+ }
+
+ return FL_METHOD_RESPONSE(fl_method_error_response_new(
+ "NO_BATTERY", "Device does not have a battery.", nullptr));
+}
+
+// Called when the Dart code requests battery information.
+static void battery_method_call_cb(FlMethodChannel* channel,
+ FlMethodCall* method_call,
+ gpointer user_data) {
+ MyApplication* self = static_cast(user_data);
+
+ g_autoptr(FlMethodResponse) response = nullptr;
+ if (strcmp(fl_method_call_get_name(method_call), "getBatteryLevel") == 0) {
+ response = get_battery_level(self);
+ } else {
+ response = FL_METHOD_RESPONSE(fl_method_not_implemented_response_new());
+ }
+
+ g_autoptr(GError) error = nullptr;
+ if (!fl_method_call_respond(method_call, response, &error)) {
+ g_warning("Failed to send response: %s", error->message);
+ }
+}
+
+// Called when the Dart code starts listening for charging events.
+static FlMethodErrorResponse* charging_listen_cb(FlEventChannel* channel,
+ FlValue* args,
+ gpointer user_data) {
+ MyApplication* self = static_cast(user_data);
+
+ self->emit_charge_events = true;
+ update_charging_state(self);
+
+ return nullptr;
+}
+
+// Called when the Dart code stops listening for charging events.
+static FlMethodErrorResponse* charging_cancel_cb(FlEventChannel* channel,
+ FlValue* args,
+ gpointer user_data) {
+ MyApplication* self = static_cast(user_data);
+
+ self->emit_charge_events = false;
+
+ return nullptr;
+}
+
+// Creates the platform channels this application provides.
+static void create_channels(MyApplication* self) {
+ FlEngine* engine = fl_view_get_engine(self->view);
+ FlBinaryMessenger* messenger = fl_engine_get_binary_messenger(engine);
+ g_autoptr(FlStandardMethodCodec) codec = fl_standard_method_codec_new();
+
+ self->battery_channel = fl_method_channel_new(
+ messenger, "samples.flutter.io/battery", FL_METHOD_CODEC(codec));
+ fl_method_channel_set_method_call_handler(
+ self->battery_channel, battery_method_call_cb, self, nullptr);
+
+ self->charging_channel = fl_event_channel_new(
+ messenger, "samples.flutter.io/charging", FL_METHOD_CODEC(codec));
+ fl_event_channel_set_stream_handlers(self->charging_channel,
+ charging_listen_cb, charging_cancel_cb,
+ self, nullptr);
+}
+
+// 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, "platform_channel");
+ 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, "platform_channel");
+ }
+
+ 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);
+
+ // Connect to UPower.
+ self->up_client = up_client_new();
+ g_signal_connect_swapped(self->up_client, "device-added",
+ G_CALLBACK(up_device_added_cb), self);
+ g_signal_connect_swapped(self->up_client, "device-removed",
+ G_CALLBACK(up_device_removed_cb), self);
+#if UP_CHECK_VERSION(0, 99, 8)
+ // up_client_get_devices was deprecated and replaced with
+ // up_client_get_devices2 in libupower 0.99.8.
+ g_autoptr(GPtrArray) devices = up_client_get_devices2(self->up_client);
+#else
+ g_autoptr(GPtrArray) devices = up_client_get_devices(self->up_client);
+#endif
+ for (guint i = 0; i < devices->len; i++) {
+ g_autoptr(UpDevice) device =
+ static_cast(g_ptr_array_index(devices, i));
+ up_device_added_cb(self, device);
+ }
+
+ self->view = fl_view_new(project);
+ gtk_widget_show(GTK_WIDGET(self->view));
+ gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(self->view));
+
+ fl_register_plugins(FL_PLUGIN_REGISTRY(self->view));
+
+ // Create application specific platform channels.
+ create_channels(self);
+
+ gtk_widget_grab_focus(GTK_WIDGET(self->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);
+
+ for (guint i = 0; i < self->battery_devices->len; i++) {
+ UpDevice* device =
+ static_cast(g_ptr_array_index(self->battery_devices, i));
+ g_signal_handlers_disconnect_matched(device, G_SIGNAL_MATCH_DATA, 0, 0,
+ nullptr, nullptr, self);
+ }
+ g_signal_handlers_disconnect_matched(self->up_client, G_SIGNAL_MATCH_DATA, 0,
+ 0, nullptr, nullptr, self);
+
+ g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev);
+ g_clear_object(&self->up_client);
+ g_clear_object(&self->battery_devices);
+ g_clear_object(&self->battery_channel);
+ g_clear_object(&self->charging_channel);
+ g_clear_pointer(&self->last_charge_event, g_free);
+ 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) {
+ self->battery_devices = g_ptr_array_new_with_free_func(g_object_unref);
+}
+
+MyApplication* my_application_new() {
+ return MY_APPLICATION(g_object_new(my_application_get_type(),
+ "application-id", APPLICATION_ID, "flags",
+ G_APPLICATION_NON_UNIQUE, nullptr));
+}
diff --git a/flutter/examples/platform_channel/linux/my_application.h b/flutter/examples/platform_channel/linux/my_application.h
new file mode 100644
index 0000000000000000000000000000000000000000..8c66ec485434d1f922c9915bdaefcb8969cdfec9
--- /dev/null
+++ b/flutter/examples/platform_channel/linux/my_application.h
@@ -0,0 +1,22 @@
+// 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
+
+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_
diff --git a/flutter/examples/platform_channel/macos/Flutter/Flutter-Debug.xcconfig b/flutter/examples/platform_channel/macos/Flutter/Flutter-Debug.xcconfig
new file mode 100644
index 0000000000000000000000000000000000000000..c2efd0b608ba84712fb3e1d01122468a50c7fba1
--- /dev/null
+++ b/flutter/examples/platform_channel/macos/Flutter/Flutter-Debug.xcconfig
@@ -0,0 +1 @@
+#include "ephemeral/Flutter-Generated.xcconfig"
diff --git a/flutter/examples/platform_channel/macos/Flutter/Flutter-Release.xcconfig b/flutter/examples/platform_channel/macos/Flutter/Flutter-Release.xcconfig
new file mode 100644
index 0000000000000000000000000000000000000000..c2efd0b608ba84712fb3e1d01122468a50c7fba1
--- /dev/null
+++ b/flutter/examples/platform_channel/macos/Flutter/Flutter-Release.xcconfig
@@ -0,0 +1 @@
+#include "ephemeral/Flutter-Generated.xcconfig"
diff --git a/flutter/examples/platform_channel/macos/Runner.xcodeproj/project.pbxproj b/flutter/examples/platform_channel/macos/Runner.xcodeproj/project.pbxproj
new file mode 100644
index 0000000000000000000000000000000000000000..7cf512c2edd446ac3bc69c6ede2f95b62764328c
--- /dev/null
+++ b/flutter/examples/platform_channel/macos/Runner.xcodeproj/project.pbxproj
@@ -0,0 +1,577 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 54;
+ objects = {
+
+/* Begin PBXAggregateTarget section */
+ 33CC111A2044C6BA0003C045 /* Flutter Assemble */ = {
+ isa = PBXAggregateTarget;
+ buildConfigurationList = 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */;
+ buildPhases = (
+ 33CC111E2044C6BF0003C045 /* ShellScript */,
+ );
+ dependencies = (
+ );
+ name = "Flutter Assemble";
+ productName = FLX;
+ };
+/* End PBXAggregateTarget section */
+
+/* Begin PBXBuildFile section */
+ 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; };
+ 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; };
+ 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; };
+ 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; };
+ 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; };
+ 3BCBDA4429CA221F00E88DEA /* PowerSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3BCBDA4329CA221F00E88DEA /* PowerSource.swift */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+ 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 33CC10E52044A3C60003C045 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 33CC111A2044C6BA0003C045;
+ remoteInfo = FLX;
+ };
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+ 33CC110E2044A8840003C045 /* Bundle Framework */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 2147483647;
+ dstPath = "";
+ dstSubfolderSpec = 10;
+ files = (
+ );
+ name = "Bundle Framework";
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+ 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; };
+ 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = ""; };
+ 33CC10ED2044A3C60003C045 /* platform_channel.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = platform_channel.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
+ 33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = ""; };
+ 33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; };
+ 33CC10F72044A3C60003C045 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Runner/Info.plist; sourceTree = ""; };
+ 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainFlutterWindow.swift; sourceTree = ""; };
+ 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Debug.xcconfig"; sourceTree = ""; };
+ 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Release.xcconfig"; sourceTree = ""; };
+ 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "Flutter-Generated.xcconfig"; path = "ephemeral/Flutter-Generated.xcconfig"; sourceTree = ""; };
+ 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = ""; };
+ 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = ""; };
+ 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = ""; };
+ 3BCBDA4329CA221F00E88DEA /* PowerSource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PowerSource.swift; sourceTree = ""; };
+ 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; };
+ 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 33CC10EA2044A3C60003C045 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 33BA886A226E78AF003329D5 /* Configs */ = {
+ isa = PBXGroup;
+ children = (
+ 33E5194F232828860026EE4D /* AppInfo.xcconfig */,
+ 9740EEB21CF90195004384FC /* Debug.xcconfig */,
+ 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
+ 333000ED22D3DE5D00554162 /* Warnings.xcconfig */,
+ );
+ path = Configs;
+ sourceTree = "";
+ };
+ 33CC10E42044A3C60003C045 = {
+ isa = PBXGroup;
+ children = (
+ 33FAB671232836740065AC1E /* Runner */,
+ 33CEB47122A05771004F2AC0 /* Flutter */,
+ 33CC10EE2044A3C60003C045 /* Products */,
+ D73912EC22F37F3D000D13A0 /* Frameworks */,
+ );
+ sourceTree = "";
+ };
+ 33CC10EE2044A3C60003C045 /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 33CC10ED2044A3C60003C045 /* platform_channel.app */,
+ );
+ name = Products;
+ sourceTree = "";
+ };
+ 33CC11242044D66E0003C045 /* Resources */ = {
+ isa = PBXGroup;
+ children = (
+ 33CC10F22044A3C60003C045 /* Assets.xcassets */,
+ 33CC10F42044A3C60003C045 /* MainMenu.xib */,
+ 33CC10F72044A3C60003C045 /* Info.plist */,
+ );
+ name = Resources;
+ path = ..;
+ sourceTree = "";
+ };
+ 33CEB47122A05771004F2AC0 /* Flutter */ = {
+ isa = PBXGroup;
+ children = (
+ 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */,
+ 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */,
+ 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */,
+ 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */,
+ );
+ path = Flutter;
+ sourceTree = "";
+ };
+ 33FAB671232836740065AC1E /* Runner */ = {
+ isa = PBXGroup;
+ children = (
+ 33CC10F02044A3C60003C045 /* AppDelegate.swift */,
+ 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */,
+ 3BCBDA4329CA221F00E88DEA /* PowerSource.swift */,
+ 33E51913231747F40026EE4D /* DebugProfile.entitlements */,
+ 33E51914231749380026EE4D /* Release.entitlements */,
+ 33CC11242044D66E0003C045 /* Resources */,
+ 33BA886A226E78AF003329D5 /* Configs */,
+ );
+ path = Runner;
+ sourceTree = "";
+ };
+ D73912EC22F37F3D000D13A0 /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ );
+ name = Frameworks;
+ sourceTree = "";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 33CC10EC2044A3C60003C045 /* Runner */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */;
+ buildPhases = (
+ 33CC10E92044A3C60003C045 /* Sources */,
+ 33CC10EA2044A3C60003C045 /* Frameworks */,
+ 33CC10EB2044A3C60003C045 /* Resources */,
+ 33CC110E2044A8840003C045 /* Bundle Framework */,
+ 3399D490228B24CF009A79C7 /* ShellScript */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ 33CC11202044C79F0003C045 /* PBXTargetDependency */,
+ );
+ name = Runner;
+ productName = Runner;
+ productReference = 33CC10ED2044A3C60003C045 /* platform_channel.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 33CC10E52044A3C60003C045 /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastSwiftUpdateCheck = 0920;
+ LastUpgradeCheck = 1510;
+ ORGANIZATIONNAME = "";
+ TargetAttributes = {
+ 33CC10EC2044A3C60003C045 = {
+ CreatedOnToolsVersion = 9.2;
+ LastSwiftMigration = 1420;
+ ProvisioningStyle = Automatic;
+ SystemCapabilities = {
+ com.apple.Sandbox = {
+ enabled = 1;
+ };
+ };
+ };
+ 33CC111A2044C6BA0003C045 = {
+ CreatedOnToolsVersion = 9.2;
+ ProvisioningStyle = Manual;
+ };
+ };
+ };
+ buildConfigurationList = 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */;
+ compatibilityVersion = "Xcode 9.3";
+ developmentRegion = en;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ Base,
+ );
+ mainGroup = 33CC10E42044A3C60003C045;
+ productRefGroup = 33CC10EE2044A3C60003C045 /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 33CC10EC2044A3C60003C045 /* Runner */,
+ 33CC111A2044C6BA0003C045 /* Flutter Assemble */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 33CC10EB2044A3C60003C045 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */,
+ 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+ 3399D490228B24CF009A79C7 /* ShellScript */ = {
+ isa = PBXShellScriptBuildPhase;
+ alwaysOutOfDate = 1;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputFileListPaths = (
+ );
+ inputPaths = (
+ );
+ outputFileListPaths = (
+ );
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "echo \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh embed\n";
+ };
+ 33CC111E2044C6BF0003C045 /* ShellScript */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputFileListPaths = (
+ Flutter/ephemeral/FlutterInputs.xcfilelist,
+ );
+ inputPaths = (
+ Flutter/ephemeral/tripwire,
+ );
+ outputFileListPaths = (
+ Flutter/ephemeral/FlutterOutputs.xcfilelist,
+ );
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire";
+ };
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 33CC10E92044A3C60003C045 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */,
+ 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */,
+ 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */,
+ 3BCBDA4429CA221F00E88DEA /* PowerSource.swift in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+ 33CC11202044C79F0003C045 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 33CC111A2044C6BA0003C045 /* Flutter Assemble */;
+ targetProxy = 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */;
+ };
+/* End PBXTargetDependency section */
+
+/* Begin PBXVariantGroup section */
+ 33CC10F42044A3C60003C045 /* MainMenu.xib */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 33CC10F52044A3C60003C045 /* Base */,
+ );
+ name = MainMenu.xib;
+ path = Runner;
+ sourceTree = "";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ 338D0CE9231458BD00FA5F75 /* Profile */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CODE_SIGN_IDENTITY = "-";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu11;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ MACOSX_DEPLOYMENT_TARGET = 10.14;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ SDKROOT = macosx;
+ SWIFT_COMPILATION_MODE = wholemodule;
+ SWIFT_OPTIMIZATION_LEVEL = "-O";
+ };
+ name = Profile;
+ };
+ 338D0CEA231458BD00FA5F75 /* Profile */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ENABLE_MODULES = YES;
+ CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
+ CODE_SIGN_STYLE = Automatic;
+ COMBINE_HIDPI_IMAGES = YES;
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/../Frameworks",
+ );
+ PROVISIONING_PROFILE_SPECIFIER = "";
+ SWIFT_VERSION = 5.0;
+ };
+ name = Profile;
+ };
+ 338D0CEB231458BD00FA5F75 /* Profile */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CODE_SIGN_STYLE = Manual;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Profile;
+ };
+ 33CC10F92044A3C60003C045 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CODE_SIGN_IDENTITY = "-";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ ENABLE_TESTABILITY = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu11;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ MACOSX_DEPLOYMENT_TARGET = 10.14;
+ MTL_ENABLE_DEBUG_INFO = YES;
+ ONLY_ACTIVE_ARCH = YES;
+ SDKROOT = macosx;
+ SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
+ SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+ };
+ name = Debug;
+ };
+ 33CC10FA2044A3C60003C045 /* Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CODE_SIGN_IDENTITY = "-";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu11;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ MACOSX_DEPLOYMENT_TARGET = 10.14;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ SDKROOT = macosx;
+ SWIFT_COMPILATION_MODE = wholemodule;
+ SWIFT_OPTIMIZATION_LEVEL = "-O";
+ };
+ name = Release;
+ };
+ 33CC10FC2044A3C60003C045 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ENABLE_MODULES = YES;
+ CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
+ CODE_SIGN_STYLE = Automatic;
+ COMBINE_HIDPI_IMAGES = YES;
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/../Frameworks",
+ );
+ PROVISIONING_PROFILE_SPECIFIER = "";
+ SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+ SWIFT_VERSION = 5.0;
+ };
+ name = Debug;
+ };
+ 33CC10FD2044A3C60003C045 /* Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ENABLE_MODULES = YES;
+ CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements;
+ CODE_SIGN_STYLE = Automatic;
+ COMBINE_HIDPI_IMAGES = YES;
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/../Frameworks",
+ );
+ PROVISIONING_PROFILE_SPECIFIER = "";
+ SWIFT_VERSION = 5.0;
+ };
+ name = Release;
+ };
+ 33CC111C2044C6BA0003C045 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CODE_SIGN_STYLE = Manual;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Debug;
+ };
+ 33CC111D2044C6BA0003C045 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CODE_SIGN_STYLE = Automatic;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 33CC10F92044A3C60003C045 /* Debug */,
+ 33CC10FA2044A3C60003C045 /* Release */,
+ 338D0CE9231458BD00FA5F75 /* Profile */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 33CC10FC2044A3C60003C045 /* Debug */,
+ 33CC10FD2044A3C60003C045 /* Release */,
+ 338D0CEA231458BD00FA5F75 /* Profile */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 33CC111C2044C6BA0003C045 /* Debug */,
+ 33CC111D2044C6BA0003C045 /* Release */,
+ 338D0CEB231458BD00FA5F75 /* Profile */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 33CC10E52044A3C60003C045 /* Project object */;
+}
diff --git a/flutter/examples/platform_channel/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/flutter/examples/platform_channel/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 0000000000000000000000000000000000000000..18d981003d68d0546c4804ac2ff47dd97c6e7921
--- /dev/null
+++ b/flutter/examples/platform_channel/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/flutter/examples/platform_channel/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/flutter/examples/platform_channel/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
new file mode 100644
index 0000000000000000000000000000000000000000..8d923f3b2bbce015fd092da2a7f1e240708abb28
--- /dev/null
+++ b/flutter/examples/platform_channel/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
@@ -0,0 +1,87 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/flutter/examples/platform_channel/macos/Runner.xcworkspace/contents.xcworkspacedata b/flutter/examples/platform_channel/macos/Runner.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000000000000000000000000000000000000..1d526a16ed0f1cd0c2409d848bf489b93fefa3b2
--- /dev/null
+++ b/flutter/examples/platform_channel/macos/Runner.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+
+
+
+
+
diff --git a/flutter/examples/platform_channel/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/flutter/examples/platform_channel/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 0000000000000000000000000000000000000000..18d981003d68d0546c4804ac2ff47dd97c6e7921
--- /dev/null
+++ b/flutter/examples/platform_channel/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/flutter/examples/platform_channel/macos/Runner/AppDelegate.swift b/flutter/examples/platform_channel/macos/Runner/AppDelegate.swift
new file mode 100644
index 0000000000000000000000000000000000000000..d080d41951d3506a861ceadcf4354bbbb609a562
--- /dev/null
+++ b/flutter/examples/platform_channel/macos/Runner/AppDelegate.swift
@@ -0,0 +1,13 @@
+// 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 Cocoa
+import FlutterMacOS
+
+@NSApplicationMain
+class AppDelegate: FlutterAppDelegate {
+ override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
+ return true
+ }
+}
diff --git a/flutter/examples/platform_channel/macos/Runner/Assets.xcassets/Contents.json b/flutter/examples/platform_channel/macos/Runner/Assets.xcassets/Contents.json
new file mode 100644
index 0000000000000000000000000000000000000000..73c00596a7fca3f3d4bdd64053b69d86745f9e10
--- /dev/null
+++ b/flutter/examples/platform_channel/macos/Runner/Assets.xcassets/Contents.json
@@ -0,0 +1,6 @@
+{
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/flutter/examples/platform_channel/macos/Runner/Base.lproj/MainMenu.xib b/flutter/examples/platform_channel/macos/Runner/Base.lproj/MainMenu.xib
new file mode 100644
index 0000000000000000000000000000000000000000..80e867a4e06b4dc26d0a2b327cbd54041addc50a
--- /dev/null
+++ b/flutter/examples/platform_channel/macos/Runner/Base.lproj/MainMenu.xib
@@ -0,0 +1,343 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/flutter/examples/platform_channel/macos/Runner/Configs/AppInfo.xcconfig b/flutter/examples/platform_channel/macos/Runner/Configs/AppInfo.xcconfig
new file mode 100644
index 0000000000000000000000000000000000000000..3082e17f61e0f3affcdaed508af6e9361f336f14
--- /dev/null
+++ b/flutter/examples/platform_channel/macos/Runner/Configs/AppInfo.xcconfig
@@ -0,0 +1,14 @@
+// Application-level settings for the Runner target.
+//
+// This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the
+// future. If not, the values below would default to using the project name when this becomes a
+// 'flutter create' template.
+
+// The application's name. By default this is also the title of the Flutter window.
+PRODUCT_NAME = platform_channel
+
+// The application's bundle identifier
+PRODUCT_BUNDLE_IDENTIFIER = com.example.platformChannel
+
+// The copyright displayed in application information
+PRODUCT_COPYRIGHT = Copyright © 2014 The Flutter Authors. All rights reserved.
diff --git a/flutter/examples/platform_channel/macos/Runner/Configs/Debug.xcconfig b/flutter/examples/platform_channel/macos/Runner/Configs/Debug.xcconfig
new file mode 100644
index 0000000000000000000000000000000000000000..36b0fd9464f45b33f482e64bea579787e142affa
--- /dev/null
+++ b/flutter/examples/platform_channel/macos/Runner/Configs/Debug.xcconfig
@@ -0,0 +1,2 @@
+#include "../../Flutter/Flutter-Debug.xcconfig"
+#include "Warnings.xcconfig"
diff --git a/flutter/examples/platform_channel/macos/Runner/Configs/Release.xcconfig b/flutter/examples/platform_channel/macos/Runner/Configs/Release.xcconfig
new file mode 100644
index 0000000000000000000000000000000000000000..dff4f49561c816f70eaea557d889d31cf63447ac
--- /dev/null
+++ b/flutter/examples/platform_channel/macos/Runner/Configs/Release.xcconfig
@@ -0,0 +1,2 @@
+#include "../../Flutter/Flutter-Release.xcconfig"
+#include "Warnings.xcconfig"
diff --git a/flutter/examples/platform_channel/macos/Runner/Configs/Warnings.xcconfig b/flutter/examples/platform_channel/macos/Runner/Configs/Warnings.xcconfig
new file mode 100644
index 0000000000000000000000000000000000000000..42bcbf4780b187e80025b7917058bcb882012aa1
--- /dev/null
+++ b/flutter/examples/platform_channel/macos/Runner/Configs/Warnings.xcconfig
@@ -0,0 +1,13 @@
+WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings
+GCC_WARN_UNDECLARED_SELECTOR = YES
+CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES
+CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE
+CLANG_WARN__DUPLICATE_METHOD_MATCH = YES
+CLANG_WARN_PRAGMA_PACK = YES
+CLANG_WARN_STRICT_PROTOTYPES = YES
+CLANG_WARN_COMMA = YES
+GCC_WARN_STRICT_SELECTOR_MATCH = YES
+CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES
+CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES
+GCC_WARN_SHADOW = YES
+CLANG_WARN_UNREACHABLE_CODE = YES
diff --git a/flutter/examples/platform_channel/macos/Runner/DebugProfile.entitlements b/flutter/examples/platform_channel/macos/Runner/DebugProfile.entitlements
new file mode 100644
index 0000000000000000000000000000000000000000..dddb8a30c851e7ef5b16a9108934bd1217b6b43f
--- /dev/null
+++ b/flutter/examples/platform_channel/macos/Runner/DebugProfile.entitlements
@@ -0,0 +1,12 @@
+
+
+
+
+ com.apple.security.app-sandbox
+
+ com.apple.security.cs.allow-jit
+
+ com.apple.security.network.server
+
+
+
diff --git a/flutter/examples/platform_channel/macos/Runner/Info.plist b/flutter/examples/platform_channel/macos/Runner/Info.plist
new file mode 100644
index 0000000000000000000000000000000000000000..4789daa6a443eefa7f3f729164a18351e06e9800
--- /dev/null
+++ b/flutter/examples/platform_channel/macos/Runner/Info.plist
@@ -0,0 +1,32 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ $(DEVELOPMENT_LANGUAGE)
+ CFBundleExecutable
+ $(EXECUTABLE_NAME)
+ CFBundleIconFile
+
+ CFBundleIdentifier
+ $(PRODUCT_BUNDLE_IDENTIFIER)
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ $(PRODUCT_NAME)
+ CFBundlePackageType
+ APPL
+ CFBundleShortVersionString
+ $(FLUTTER_BUILD_NAME)
+ CFBundleVersion
+ $(FLUTTER_BUILD_NUMBER)
+ LSMinimumSystemVersion
+ $(MACOSX_DEPLOYMENT_TARGET)
+ NSHumanReadableCopyright
+ $(PRODUCT_COPYRIGHT)
+ NSMainNibFile
+ MainMenu
+ NSPrincipalClass
+ NSApplication
+
+
diff --git a/flutter/examples/platform_channel/macos/Runner/MainFlutterWindow.swift b/flutter/examples/platform_channel/macos/Runner/MainFlutterWindow.swift
new file mode 100644
index 0000000000000000000000000000000000000000..239c019ddf57b5d53dda2b309aec1686a9a3a5d8
--- /dev/null
+++ b/flutter/examples/platform_channel/macos/Runner/MainFlutterWindow.swift
@@ -0,0 +1,97 @@
+// 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 Cocoa
+import FlutterMacOS
+
+class MainFlutterWindow: NSWindow {
+ private let powerSource = PowerSource()
+ private let stateChangeHandler = PowerSourceStateChangeHandler()
+ private var eventSink: FlutterEventSink?
+
+ override func awakeFromNib() {
+ let flutterViewController = FlutterViewController()
+ let windowFrame = self.frame
+ self.contentViewController = flutterViewController
+ self.displayIfNeeded()
+ self.setFrame(windowFrame, display: true)
+
+ // Register battery method channel.
+ let registrar = flutterViewController.registrar(forPlugin: "BatteryLevel")
+ let batteryChannel = FlutterMethodChannel(
+ name: "samples.flutter.io/battery",
+ binaryMessenger: registrar.messenger)
+ batteryChannel.setMethodCallHandler { [powerSource = self.powerSource] (call, result) in
+ switch call.method {
+ case "getBatteryLevel":
+ guard powerSource.hasBattery() else {
+ result(
+ FlutterError(
+ code: "NO_BATTERY",
+ message: "Device does not have a battery",
+ details: nil))
+ return
+ }
+ guard let level = powerSource.getCurrentCapacity() else {
+ result(
+ FlutterError(
+ code: "UNAVAILABLE",
+ message: "Battery info unavailable",
+ details: nil))
+ return
+ }
+ result(level)
+ default:
+ result(FlutterMethodNotImplemented)
+ }
+ }
+
+ // Register charging event channel.
+ let chargingChannel = FlutterEventChannel(
+ name: "samples.flutter.io/charging",
+ binaryMessenger: registrar.messenger)
+ chargingChannel.setStreamHandler(self)
+
+ RegisterGeneratedPlugins(registry: flutterViewController)
+
+ super.awakeFromNib()
+ }
+
+ /// Emit a power status event to the registered event sink.
+ func emitPowerStatusEvent() {
+ if let sink = self.eventSink {
+ switch self.powerSource.getPowerState() {
+ case .ac:
+ sink("charging")
+ case .battery:
+ sink("discharging")
+ case .unknown:
+ sink("UNAVAILABLE")
+ }
+ }
+ }
+}
+
+extension MainFlutterWindow: FlutterStreamHandler {
+ func onListen(withArguments arguments: Any?, eventSink events: @escaping FlutterEventSink)
+ -> FlutterError?
+ {
+ self.eventSink = events
+ self.emitPowerStatusEvent()
+ self.stateChangeHandler.delegate = self
+ return nil
+ }
+
+ func onCancel(withArguments arguments: Any?) -> FlutterError? {
+ self.stateChangeHandler.delegate = nil
+ self.eventSink = nil
+ return nil
+ }
+}
+
+extension MainFlutterWindow: PowerSourceStateChangeDelegate {
+ func didChangePowerSourceState() {
+ self.emitPowerStatusEvent()
+ }
+}
diff --git a/flutter/examples/platform_channel/macos/Runner/PowerSource.swift b/flutter/examples/platform_channel/macos/Runner/PowerSource.swift
new file mode 100644
index 0000000000000000000000000000000000000000..c465b2a611f812b5df21c69880c5c1850f085eab
--- /dev/null
+++ b/flutter/examples/platform_channel/macos/Runner/PowerSource.swift
@@ -0,0 +1,85 @@
+// 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 Foundation
+import IOKit.ps
+
+enum PowerState {
+ case ac
+ case battery
+ case unknown
+}
+
+/// A convenience wrapper for an IOKit power source.
+final class PowerSource {
+ let info = IOPSCopyPowerSourcesInfo().takeRetainedValue()
+ let sources: Array
+
+ init() {
+ sources = IOPSCopyPowerSourcesList(info).takeRetainedValue() as Array
+ }
+
+ func hasBattery() -> Bool {
+ return !sources.isEmpty
+ }
+
+ /// Returns the current power source capacity. Apple-defined power sources will return this value
+ /// as a percentage.
+ func getCurrentCapacity() -> Int? {
+ if let source = sources.first {
+ let description =
+ IOPSGetPowerSourceDescription(info, source).takeUnretainedValue() as! [String: AnyObject]
+ if let level = description[kIOPSCurrentCapacityKey] as? Int {
+ return level
+ }
+ }
+ return nil
+ }
+
+ /// Returns whether the device is drawing battery power or connected to an external power source.
+ func getPowerState() -> PowerState {
+ if let source = sources.first {
+ let description =
+ IOPSGetPowerSourceDescription(info, source).takeUnretainedValue() as! [String: AnyObject]
+ if let state = description[kIOPSPowerSourceStateKey] as? String {
+ switch state {
+ case kIOPSACPowerValue:
+ return .ac
+ case kIOPSBatteryPowerValue:
+ return .battery
+ default:
+ return .unknown
+ }
+ }
+ }
+ return .unknown
+ }
+}
+
+protocol PowerSourceStateChangeDelegate: AnyObject {
+ func didChangePowerSourceState()
+}
+
+/// A listener for system power source state change events. Notifies the delegate on each event.
+final class PowerSourceStateChangeHandler {
+ private var runLoopSource: CFRunLoopSource?
+ weak var delegate: PowerSourceStateChangeDelegate?
+
+ init() {
+ let context = UnsafeMutableRawPointer(Unmanaged.passUnretained(self).toOpaque())
+ self.runLoopSource = IOPSNotificationCreateRunLoopSource(
+ { (context: UnsafeMutableRawPointer?) in
+ let unownedSelf = Unmanaged.fromOpaque(
+ UnsafeRawPointer(context!)
+ ).takeUnretainedValue()
+ unownedSelf.delegate?.didChangePowerSourceState()
+ }, context
+ ).takeRetainedValue()
+ CFRunLoopAddSource(CFRunLoopGetCurrent(), self.runLoopSource, .defaultMode)
+ }
+
+ deinit {
+ CFRunLoopRemoveSource(CFRunLoopGetCurrent(), self.runLoopSource, .defaultMode)
+ }
+}
diff --git a/flutter/examples/platform_channel/macos/Runner/Release.entitlements b/flutter/examples/platform_channel/macos/Runner/Release.entitlements
new file mode 100644
index 0000000000000000000000000000000000000000..852fa1a4728ae4789e3bca55dd07caef3b41f2a5
--- /dev/null
+++ b/flutter/examples/platform_channel/macos/Runner/Release.entitlements
@@ -0,0 +1,8 @@
+
+
+
+
+ com.apple.security.app-sandbox
+
+
+
diff --git a/flutter/examples/platform_channel/platform_channel.iml b/flutter/examples/platform_channel/platform_channel.iml
new file mode 100644
index 0000000000000000000000000000000000000000..1d83ed3abc9085f991ca3f8f864f38df5577a8a6
--- /dev/null
+++ b/flutter/examples/platform_channel/platform_channel.iml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/flutter/examples/platform_channel/pubspec.lock b/flutter/examples/platform_channel/pubspec.lock
new file mode 100644
index 0000000000000000000000000000000000000000..ad1b0b9a0996e1d4cf90d2df5ba990b0823723d3
--- /dev/null
+++ b/flutter/examples/platform_channel/pubspec.lock
@@ -0,0 +1,494 @@
+# Generated by pub
+# See https://dart.dev/tools/pub/glossary#lockfile
+packages:
+ _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"
diff --git a/flutter/examples/platform_channel/pubspec.yaml b/flutter/examples/platform_channel/pubspec.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..3486f86b7a2ee94d622cb330645c075a1c0f921f
--- /dev/null
+++ b/flutter/examples/platform_channel/pubspec.yaml
@@ -0,0 +1,77 @@
+name: platform_channel
+
+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
+ flutter_driver:
+ 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"
+
+flutter:
+ uses-material-design: true
+
+# PUBSPEC CHECKSUM: 6020
diff --git a/flutter/examples/platform_channel/test_driver/button_tap.dart b/flutter/examples/platform_channel/test_driver/button_tap.dart
new file mode 100644
index 0000000000000000000000000000000000000000..7e1dc1cd5f8071b678ba57a0b0cf4a9993f074d3
--- /dev/null
+++ b/flutter/examples/platform_channel/test_driver/button_tap.dart
@@ -0,0 +1,11 @@
+// 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_driver/driver_extension.dart';
+import 'package:platform_channel/main.dart' as app;
+
+void main() {
+ enableFlutterDriverExtension();
+ app.main();
+}
diff --git a/flutter/examples/platform_channel/test_driver/button_tap_test.dart b/flutter/examples/platform_channel/test_driver/button_tap_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..be36536c5632d2ae99213af841110df97d2a737a
--- /dev/null
+++ b/flutter/examples/platform_channel/test_driver/button_tap_test.dart
@@ -0,0 +1,41 @@
+// 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_driver/flutter_driver.dart';
+import 'package:test/test.dart' hide TypeMatcher, isInstanceOf;
+
+void main() {
+ group('button tap test', () {
+ late FlutterDriver driver;
+
+ setUpAll(() async {
+ driver = await FlutterDriver.connect();
+ });
+
+ tearDownAll(() async {
+ driver.close();
+ });
+
+ test('tap on the button, verify result', () async {
+ final SerializableFinder batteryLevelLabel =
+ find.byValueKey('Battery level label');
+ expect(batteryLevelLabel, isNotNull);
+
+ final SerializableFinder button = find.text('Refresh');
+ await driver.waitFor(button);
+ await driver.tap(button);
+
+ String? batteryLevel;
+ while (batteryLevel == null || batteryLevel.contains('unknown')) {
+ batteryLevel = await driver.getText(batteryLevelLabel);
+ }
+
+ // Allow either a battery percentage or "No battery" since it will vary
+ // by device; either indicates that a known response came from the host
+ // implementation.
+ expect(batteryLevel.contains('%') || batteryLevel.contains('No battery'),
+ isTrue);
+ });
+ });
+}
diff --git a/flutter/examples/platform_channel/windows/CMakeLists.txt b/flutter/examples/platform_channel/windows/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..a8a64c8d510c1dc742ab97dca53b9d46538650d4
--- /dev/null
+++ b/flutter/examples/platform_channel/windows/CMakeLists.txt
@@ -0,0 +1,101 @@
+# Project-level configuration.
+cmake_minimum_required(VERSION 3.14)
+project(platform_channel 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 "platform_channel")
+
+# Explicitly opt in to modern CMake behaviors to avoid warnings with recent
+# versions of CMake.
+cmake_policy(VERSION 3.14...3.25)
+
+# Define build configuration option.
+get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
+if(IS_MULTICONFIG)
+ set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release"
+ CACHE STRING "" FORCE)
+else()
+ 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()
+endif()
+# Define settings for the Profile build mode.
+set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}")
+set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}")
+set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}")
+set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}")
+
+# Use Unicode for all projects.
+add_definitions(-DUNICODE -D_UNICODE)
+
+# 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_17)
+ target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100")
+ target_compile_options(${TARGET} PRIVATE /EHsc)
+ target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0")
+ target_compile_definitions(${TARGET} PRIVATE "$<$:_DEBUG>")
+endfunction()
+
+# Flutter library and tool build rules.
+set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter")
+add_subdirectory(${FLUTTER_MANAGED_DIR})
+
+# Application build; see runner/CMakeLists.txt.
+add_subdirectory("runner")
+
+# Generated plugin build rules, which manage building the plugins and adding
+# them to the application.
+include(flutter/generated_plugins.cmake)
+
+
+# === Installation ===
+# Support files are copied into place next to the executable, so that it can
+# run in place. This is done instead of making a separate bundle (as on Linux)
+# so that building and running from within Visual Studio will work.
+set(BUILD_BUNDLE_DIR "$")
+# Make the "install" step default, as it's required to run.
+set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1)
+if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
+ set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE)
+endif()
+
+set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data")
+set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}")
+
+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)
+
+if(PLUGIN_BUNDLED_LIBRARIES)
+ install(FILES "${PLUGIN_BUNDLED_LIBRARIES}"
+ DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
+ COMPONENT Runtime)
+endif()
+
+# 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.
+install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}"
+ CONFIGURATIONS Profile;Release
+ COMPONENT Runtime)
diff --git a/flutter/examples/platform_channel/windows/flutter/CMakeLists.txt b/flutter/examples/platform_channel/windows/flutter/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..903f4899d6fced0eb941e159f7322b21b320c40c
--- /dev/null
+++ b/flutter/examples/platform_channel/windows/flutter/CMakeLists.txt
@@ -0,0 +1,109 @@
+# This file controls Flutter-level build steps. It should not be edited.
+cmake_minimum_required(VERSION 3.14)
+
+set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral")
+
+# Configuration provided via flutter tool.
+include(${EPHEMERAL_DIR}/generated_config.cmake)
+
+# TODO: Move the rest of this into files in ephemeral. See
+# https://github.com/flutter/flutter/issues/57146.
+set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper")
+
+# Set fallback configurations for older versions of the flutter tool.
+if (NOT DEFINED FLUTTER_TARGET_PLATFORM)
+ set(FLUTTER_TARGET_PLATFORM "windows-x64")
+endif()
+
+# === Flutter Library ===
+set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll")
+
+# Published to parent scope for install step.
+set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE)
+set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE)
+set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE)
+set(AOT_LIBRARY "${PROJECT_DIR}/build/windows/app.so" PARENT_SCOPE)
+
+list(APPEND FLUTTER_LIBRARY_HEADERS
+ "flutter_export.h"
+ "flutter_windows.h"
+ "flutter_messenger.h"
+ "flutter_plugin_registrar.h"
+ "flutter_texture_registrar.h"
+)
+list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/")
+add_library(flutter INTERFACE)
+target_include_directories(flutter INTERFACE
+ "${EPHEMERAL_DIR}"
+)
+target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib")
+add_dependencies(flutter flutter_assemble)
+
+# === Wrapper ===
+list(APPEND CPP_WRAPPER_SOURCES_CORE
+ "core_implementations.cc"
+ "standard_codec.cc"
+)
+list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/")
+list(APPEND CPP_WRAPPER_SOURCES_PLUGIN
+ "plugin_registrar.cc"
+)
+list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/")
+list(APPEND CPP_WRAPPER_SOURCES_APP
+ "flutter_engine.cc"
+ "flutter_view_controller.cc"
+)
+list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/")
+
+# Wrapper sources needed for a plugin.
+add_library(flutter_wrapper_plugin STATIC
+ ${CPP_WRAPPER_SOURCES_CORE}
+ ${CPP_WRAPPER_SOURCES_PLUGIN}
+)
+apply_standard_settings(flutter_wrapper_plugin)
+set_target_properties(flutter_wrapper_plugin PROPERTIES
+ POSITION_INDEPENDENT_CODE ON)
+set_target_properties(flutter_wrapper_plugin PROPERTIES
+ CXX_VISIBILITY_PRESET hidden)
+target_link_libraries(flutter_wrapper_plugin PUBLIC flutter)
+target_include_directories(flutter_wrapper_plugin PUBLIC
+ "${WRAPPER_ROOT}/include"
+)
+add_dependencies(flutter_wrapper_plugin flutter_assemble)
+
+# Wrapper sources needed for the runner.
+add_library(flutter_wrapper_app STATIC
+ ${CPP_WRAPPER_SOURCES_CORE}
+ ${CPP_WRAPPER_SOURCES_APP}
+)
+apply_standard_settings(flutter_wrapper_app)
+target_link_libraries(flutter_wrapper_app PUBLIC flutter)
+target_include_directories(flutter_wrapper_app PUBLIC
+ "${WRAPPER_ROOT}/include"
+)
+add_dependencies(flutter_wrapper_app flutter_assemble)
+
+# === Flutter tool backend ===
+# _phony_ is a non-existent file to force this command to run every time,
+# since currently there's no way to get a full input/output list from the
+# flutter tool.
+set(PHONY_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_phony_")
+set_source_files_properties("${PHONY_OUTPUT}" PROPERTIES SYMBOLIC TRUE)
+add_custom_command(
+ OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS}
+ ${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN}
+ ${CPP_WRAPPER_SOURCES_APP}
+ ${PHONY_OUTPUT}
+ COMMAND ${CMAKE_COMMAND} -E env
+ ${FLUTTER_TOOL_ENVIRONMENT}
+ "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat"
+ ${FLUTTER_TARGET_PLATFORM} $
+ VERBATIM
+)
+add_custom_target(flutter_assemble DEPENDS
+ "${FLUTTER_LIBRARY}"
+ ${FLUTTER_LIBRARY_HEADERS}
+ ${CPP_WRAPPER_SOURCES_CORE}
+ ${CPP_WRAPPER_SOURCES_PLUGIN}
+ ${CPP_WRAPPER_SOURCES_APP}
+)
diff --git a/flutter/examples/platform_channel/windows/runner/CMakeLists.txt b/flutter/examples/platform_channel/windows/runner/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..394917c053a04daa76d8b94f0a02db0bd99e1034
--- /dev/null
+++ b/flutter/examples/platform_channel/windows/runner/CMakeLists.txt
@@ -0,0 +1,40 @@
+cmake_minimum_required(VERSION 3.14)
+project(runner LANGUAGES CXX)
+
+# Define the application target. To change its name, change BINARY_NAME in the
+# top-level CMakeLists.txt, 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} WIN32
+ "flutter_window.cpp"
+ "main.cpp"
+ "utils.cpp"
+ "win32_window.cpp"
+ "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc"
+ "Runner.rc"
+ "runner.exe.manifest"
+)
+
+# Apply the standard set of build settings. This can be removed for applications
+# that need different build settings.
+apply_standard_settings(${BINARY_NAME})
+
+# Add preprocessor definitions for the build version.
+target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION=\"${FLUTTER_VERSION}\"")
+target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MAJOR=${FLUTTER_VERSION_MAJOR}")
+target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MINOR=${FLUTTER_VERSION_MINOR}")
+target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_PATCH=${FLUTTER_VERSION_PATCH}")
+target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_BUILD=${FLUTTER_VERSION_BUILD}")
+
+# Disable Windows macros that collide with C++ standard library functions.
+target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX")
+
+# Add dependency libraries and include directories. Add any application-specific
+# dependencies here.
+target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app)
+target_link_libraries(${BINARY_NAME} PRIVATE "dwmapi.lib")
+target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}")
+
+# Run the Flutter tool portions of the build. This must not be removed.
+add_dependencies(${BINARY_NAME} flutter_assemble)
diff --git a/flutter/examples/platform_channel/windows/runner/Runner.rc b/flutter/examples/platform_channel/windows/runner/Runner.rc
new file mode 100644
index 0000000000000000000000000000000000000000..66e11ee9f436eea02dcaba07c6bd52ad26eaf8a8
--- /dev/null
+++ b/flutter/examples/platform_channel/windows/runner/Runner.rc
@@ -0,0 +1,111 @@
+// Microsoft Visual C++ generated resource script.
+//
+#pragma code_page(65001)
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "winres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (United States) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#include ""winres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+#if defined(FLUTTER_VERSION_MAJOR) && defined(FLUTTER_VERSION_MINOR) && defined(FLUTTER_VERSION_PATCH) && defined(FLUTTER_VERSION_BUILD)
+#define VERSION_AS_NUMBER FLUTTER_VERSION_MAJOR,FLUTTER_VERSION_MINOR,FLUTTER_VERSION_PATCH,FLUTTER_VERSION_BUILD
+#else
+#define VERSION_AS_NUMBER 1,0,0,0
+#endif
+
+#if defined(FLUTTER_VERSION)
+#define VERSION_AS_STRING FLUTTER_VERSION
+#else
+#define VERSION_AS_STRING "1.0.0"
+#endif
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION VERSION_AS_NUMBER
+ PRODUCTVERSION VERSION_AS_NUMBER
+ FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
+#ifdef _DEBUG
+ FILEFLAGS VS_FF_DEBUG
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS VOS__WINDOWS32
+ FILETYPE VFT_APP
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904e4"
+ BEGIN
+ VALUE "CompanyName", "io.flutter.examples" "\0"
+ VALUE "FileDescription", "platform_channel" "\0"
+ VALUE "FileVersion", VERSION_AS_STRING "\0"
+ VALUE "InternalName", "platform_channel" "\0"
+ VALUE "LegalCopyright", "Copyright (C) 2022 io.flutter.examples. All rights reserved." "\0"
+ VALUE "OriginalFilename", "platform_channel.exe" "\0"
+ VALUE "ProductName", "platform_channel" "\0"
+ VALUE "ProductVersion", VERSION_AS_STRING "\0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1252
+ END
+END
+
+#endif // English (United States) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
diff --git a/flutter/examples/platform_channel/windows/runner/flutter_window.cpp b/flutter/examples/platform_channel/windows/runner/flutter_window.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..97c041167a9c37b07805e0557dbc430b05b5e2b9
--- /dev/null
+++ b/flutter/examples/platform_channel/windows/runner/flutter_window.cpp
@@ -0,0 +1,161 @@
+// 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 "flutter_window.h"
+
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include
+#include
+
+#include "flutter/generated_plugin_registrant.h"
+
+static constexpr int kBatteryError = -1;
+static constexpr int kNoBattery = -2;
+
+static int GetBatteryLevel() {
+ SYSTEM_POWER_STATUS status;
+ if (GetSystemPowerStatus(&status) == 0) {
+ return kBatteryError;
+ } else if (status.BatteryFlag == 128) {
+ return kNoBattery;
+ } else if (status.BatteryLifePercent == 255) {
+ return kBatteryError;
+ }
+ return status.BatteryLifePercent;
+}
+
+FlutterWindow::FlutterWindow(const flutter::DartProject& project)
+ : project_(project) {}
+
+FlutterWindow::~FlutterWindow() {
+ if (power_notification_handle_) {
+ UnregisterPowerSettingNotification(power_notification_handle_);
+ }
+}
+
+bool FlutterWindow::OnCreate() {
+ if (!Win32Window::OnCreate()) {
+ return false;
+ }
+
+ RECT frame = GetClientArea();
+
+ // The size here must match the window dimensions to avoid unnecessary surface
+ // creation / destruction in the startup path.
+ flutter_controller_ = std::make_unique(
+ frame.right - frame.left, frame.bottom - frame.top, project_);
+ // Ensure that basic setup of the controller was successful.
+ if (!flutter_controller_->engine() || !flutter_controller_->view()) {
+ return false;
+ }
+ RegisterPlugins(flutter_controller_->engine());
+
+ flutter::MethodChannel<> channel(
+ flutter_controller_->engine()->messenger(), "samples.flutter.io/battery",
+ &flutter::StandardMethodCodec::GetInstance());
+ channel.SetMethodCallHandler(
+ [](const flutter::MethodCall<>& call,
+ std::unique_ptr> result) {
+ if (call.method_name() == "getBatteryLevel") {
+ int battery_level = GetBatteryLevel();
+
+ if (battery_level == kBatteryError) {
+ result->Error("UNAVAILABLE", "Battery level not available.");
+ } else if (battery_level == kNoBattery) {
+ result->Error("NO_BATTERY", "Device does not have a battery.");
+ } else {
+ result->Success(battery_level);
+ }
+ } else {
+ result->NotImplemented();
+ }
+ });
+
+ flutter::EventChannel<> charging_channel(
+ flutter_controller_->engine()->messenger(), "samples.flutter.io/charging",
+ &flutter::StandardMethodCodec::GetInstance());
+ charging_channel.SetStreamHandler(
+ std::make_unique>(
+ [this](auto arguments, auto events) {
+ this->OnStreamListen(std::move(events));
+ return nullptr;
+ },
+ [this](auto arguments) {
+ this->OnStreamCancel();
+ return nullptr;
+ }));
+
+ SetChildContent(flutter_controller_->view()->GetNativeWindow());
+
+ flutter_controller_->engine()->SetNextFrameCallback([&]() {
+ this->Show();
+ });
+
+ // Flutter can complete the first frame before the "show window" callback is
+ // registered. The following call ensures a frame is pending to ensure the
+ // window is shown. It is a no-op if the first frame hasn't completed yet.
+ flutter_controller_->ForceRedraw();
+
+ return true;
+}
+
+void FlutterWindow::OnDestroy() {
+ if (flutter_controller_) {
+ flutter_controller_ = nullptr;
+ }
+
+ Win32Window::OnDestroy();
+}
+
+LRESULT
+FlutterWindow::MessageHandler(HWND hwnd, UINT const message,
+ WPARAM const wparam,
+ LPARAM const lparam) noexcept {
+ // Give Flutter, including plugins, an opportunity to handle window messages.
+ if (flutter_controller_) {
+ std::optional result =
+ flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam,
+ lparam);
+ if (result) {
+ return *result;
+ }
+ }
+
+ switch (message) {
+ case WM_FONTCHANGE:
+ flutter_controller_->engine()->ReloadSystemFonts();
+ break;
+ case WM_POWERBROADCAST:
+ SendBatteryStateEvent();
+ break;
+ }
+
+ return Win32Window::MessageHandler(hwnd, message, wparam, lparam);
+}
+
+void FlutterWindow::OnStreamListen(
+ std::unique_ptr>&& events) {
+ event_sink_ = std::move(events);
+ SendBatteryStateEvent();
+ power_notification_handle_ =
+ RegisterPowerSettingNotification(GetHandle(), &GUID_ACDC_POWER_SOURCE, 0);
+}
+
+void FlutterWindow::OnStreamCancel() { event_sink_ = nullptr; }
+
+void FlutterWindow::SendBatteryStateEvent() {
+ SYSTEM_POWER_STATUS status;
+ if (GetSystemPowerStatus(&status) == 0 || status.ACLineStatus == 255) {
+ event_sink_->Error("UNAVAILABLE", "Charging status unavailable");
+ } else {
+ event_sink_->Success(flutter::EncodableValue(
+ status.ACLineStatus == 1 ? "charging" : "discharging"));
+ }
+}
diff --git a/flutter/examples/platform_channel/windows/runner/flutter_window.h b/flutter/examples/platform_channel/windows/runner/flutter_window.h
new file mode 100644
index 0000000000000000000000000000000000000000..f1175559ab9d6f99cddd96a34260c1f7053659a0
--- /dev/null
+++ b/flutter/examples/platform_channel/windows/runner/flutter_window.h
@@ -0,0 +1,49 @@
+// 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 RUNNER_FLUTTER_WINDOW_H_
+#define RUNNER_FLUTTER_WINDOW_H_
+
+#include
+#include
+#include
+#include
+
+#include
+
+#include "win32_window.h"
+
+// A window that does nothing but host a Flutter view.
+class FlutterWindow : public Win32Window {
+ public:
+ // Creates a new FlutterWindow hosting a Flutter view running |project|.
+ explicit FlutterWindow(const flutter::DartProject& project);
+ virtual ~FlutterWindow();
+
+ protected:
+ // Win32Window:
+ bool OnCreate() override;
+ void OnDestroy() override;
+ LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam,
+ LPARAM const lparam) noexcept override;
+
+ private:
+ // EventStream handlers:
+ void OnStreamListen(std::unique_ptr>&& events);
+ void OnStreamCancel();
+
+ // Sends a state event to |event_sink_| with the current charging status.
+ void SendBatteryStateEvent();
+
+ // The project to run.
+ flutter::DartProject project_;
+
+ // The Flutter instance hosted by this window.
+ std::unique_ptr flutter_controller_;
+
+ std::unique_ptr> event_sink_;
+ HPOWERNOTIFY power_notification_handle_ = nullptr;
+};
+
+#endif // RUNNER_FLUTTER_WINDOW_H_
diff --git a/flutter/examples/platform_channel/windows/runner/main.cpp b/flutter/examples/platform_channel/windows/runner/main.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..1cadf8d747d7aee7b6447ba70ff17a5647fd3fbc
--- /dev/null
+++ b/flutter/examples/platform_channel/windows/runner/main.cpp
@@ -0,0 +1,46 @@
+// 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
+#include
+#include
+
+#include "flutter_window.h"
+#include "utils.h"
+
+int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
+ _In_ wchar_t* command_line, _In_ int show_command) {
+ // Attach to console when present (e.g., 'flutter run') or create a
+ // new console when running with a debugger.
+ if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) {
+ CreateAndAttachConsole();
+ }
+
+ // Initialize COM, so that it is available for use in the library and/or
+ // plugins.
+ ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED);
+
+ flutter::DartProject project(L"data");
+
+ std::vector command_line_arguments = GetCommandLineArguments();
+
+ project.set_dart_entrypoint_arguments(std::move(command_line_arguments));
+
+ FlutterWindow window(project);
+ Win32Window::Point origin(10, 10);
+ Win32Window::Size size(1280, 720);
+ if (!window.Create(L"platform_channel", origin, size)) {
+ return EXIT_FAILURE;
+ }
+ window.SetQuitOnClose(true);
+
+ ::MSG msg;
+ while (::GetMessage(&msg, nullptr, 0, 0)) {
+ ::TranslateMessage(&msg);
+ ::DispatchMessage(&msg);
+ }
+
+ ::CoUninitialize();
+ return EXIT_SUCCESS;
+}
diff --git a/flutter/examples/platform_channel/windows/runner/resource.h b/flutter/examples/platform_channel/windows/runner/resource.h
new file mode 100644
index 0000000000000000000000000000000000000000..c245ff19cb5805345a3d3265122298cb01b9d71f
--- /dev/null
+++ b/flutter/examples/platform_channel/windows/runner/resource.h
@@ -0,0 +1,20 @@
+// 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.
+
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by Runner.rc
+//
+#define IDI_APP_ICON 101
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 102
+#define _APS_NEXT_COMMAND_VALUE 40001
+#define _APS_NEXT_CONTROL_VALUE 1001
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
diff --git a/flutter/examples/platform_channel/windows/runner/runner.exe.manifest b/flutter/examples/platform_channel/windows/runner/runner.exe.manifest
new file mode 100644
index 0000000000000000000000000000000000000000..a42ea7687cb67e55af955dc8874a072e087ce3ed
--- /dev/null
+++ b/flutter/examples/platform_channel/windows/runner/runner.exe.manifest
@@ -0,0 +1,20 @@
+
+
+
+
+ PerMonitorV2
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/flutter/examples/platform_channel/windows/runner/utils.cpp b/flutter/examples/platform_channel/windows/runner/utils.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..a05ed58ca9a52d311cdb78383eff2413889dd11f
--- /dev/null
+++ b/flutter/examples/platform_channel/windows/runner/utils.cpp
@@ -0,0 +1,68 @@
+// 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 "utils.h"
+
+#include
+#include
+#include
+#include
+
+#include
+
+void CreateAndAttachConsole() {
+ if (::AllocConsole()) {
+ FILE* unused;
+ if (freopen_s(&unused, "CONOUT$", "w", stdout)) {
+ _dup2(_fileno(stdout), 1);
+ }
+ if (freopen_s(&unused, "CONOUT$", "w", stderr)) {
+ _dup2(_fileno(stdout), 2);
+ }
+ std::ios::sync_with_stdio();
+ FlutterDesktopResyncOutputStreams();
+ }
+}
+
+std::vector GetCommandLineArguments() {
+ // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use.
+ int argc;
+ wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc);
+ if (argv == nullptr) {
+ return std::vector();
+ }
+
+ std::vector command_line_arguments;
+
+ // Skip the first argument as it's the binary name.
+ for (int i = 1; i < argc; i++) {
+ command_line_arguments.push_back(Utf8FromUtf16(argv[i]));
+ }
+
+ ::LocalFree(argv);
+
+ return command_line_arguments;
+}
+
+std::string Utf8FromUtf16(const wchar_t* utf16_string) {
+ if (utf16_string == nullptr) {
+ return std::string();
+ }
+ int target_length = ::WideCharToMultiByte(
+ CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string,
+ -1, nullptr, 0, nullptr, nullptr)
+ -1; // remove the trailing null character
+ std::string utf8_string;
+ if (target_length <= 0 || target_length > utf8_string.max_size()) {
+ return utf8_string;
+ }
+ utf8_string.resize(target_length);
+ int converted_length = ::WideCharToMultiByte(
+ CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string,
+ -1, utf8_string.data(), target_length, nullptr, nullptr);
+ if (converted_length == 0) {
+ return std::string();
+ }
+ return utf8_string;
+}
diff --git a/flutter/examples/platform_channel/windows/runner/utils.h b/flutter/examples/platform_channel/windows/runner/utils.h
new file mode 100644
index 0000000000000000000000000000000000000000..54414c989ba716f78f3640e5407dd8ac74284aef
--- /dev/null
+++ b/flutter/examples/platform_channel/windows/runner/utils.h
@@ -0,0 +1,23 @@
+// 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 RUNNER_UTILS_H_
+#define RUNNER_UTILS_H_
+
+#include
+#include
+
+// Creates a console for the process, and redirects stdout and stderr to
+// it for both the runner and the Flutter library.
+void CreateAndAttachConsole();
+
+// Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string
+// encoded in UTF-8. Returns an empty std::string on failure.
+std::string Utf8FromUtf16(const wchar_t* utf16_string);
+
+// Gets the command line arguments passed in as a std::vector,
+// encoded in UTF-8. Returns an empty std::vector on failure.
+std::vector GetCommandLineArguments();
+
+#endif // RUNNER_UTILS_H_
diff --git a/flutter/examples/platform_channel/windows/runner/win32_window.cpp b/flutter/examples/platform_channel/windows/runner/win32_window.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..14a183d7eaa272a6faf6cc8811639b68142331fa
--- /dev/null
+++ b/flutter/examples/platform_channel/windows/runner/win32_window.cpp
@@ -0,0 +1,292 @@
+// 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 "win32_window.h"
+
+#include
+#include
+
+#include "resource.h"
+
+namespace {
+
+/// Window attribute that enables dark mode window decorations.
+///
+/// Redefined in case the developer's machine has a Windows SDK older than
+/// version 10.0.22000.0.
+/// See: https://docs.microsoft.com/windows/win32/api/dwmapi/ne-dwmapi-dwmwindowattribute
+#ifndef DWMWA_USE_IMMERSIVE_DARK_MODE
+#define DWMWA_USE_IMMERSIVE_DARK_MODE 20
+#endif
+
+constexpr const wchar_t kWindowClassName[] = L"FLUTTER_RUNNER_WIN32_WINDOW";
+
+/// Registry key for app theme preference.
+///
+/// A value of 0 indicates apps should use dark mode. A non-zero or missing
+/// value indicates apps should use light mode.
+constexpr const wchar_t kGetPreferredBrightnessRegKey[] =
+ L"Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize";
+constexpr const wchar_t kGetPreferredBrightnessRegValue[] = L"AppsUseLightTheme";
+
+// The number of Win32Window objects that currently exist.
+static int g_active_window_count = 0;
+
+using EnableNonClientDpiScaling = BOOL __stdcall(HWND hwnd);
+
+// Scale helper to convert logical scaler values to physical using passed in
+// scale factor
+int Scale(int source, double scale_factor) {
+ return static_cast(source * scale_factor);
+}
+
+// Dynamically loads the |EnableNonClientDpiScaling| from the User32 module.
+// This API is only needed for PerMonitor V1 awareness mode.
+void EnableFullDpiSupportIfAvailable(HWND hwnd) {
+ HMODULE user32_module = LoadLibraryA("User32.dll");
+ if (!user32_module) {
+ return;
+ }
+ auto enable_non_client_dpi_scaling =
+ reinterpret_cast(
+ GetProcAddress(user32_module, "EnableNonClientDpiScaling"));
+ if (enable_non_client_dpi_scaling != nullptr) {
+ enable_non_client_dpi_scaling(hwnd);
+ }
+ FreeLibrary(user32_module);
+}
+
+} // namespace
+
+// Manages the Win32Window's window class registration.
+class WindowClassRegistrar {
+ public:
+ ~WindowClassRegistrar() = default;
+
+ // Returns the singleton registrar instance.
+ static WindowClassRegistrar* GetInstance() {
+ if (!instance_) {
+ instance_ = new WindowClassRegistrar();
+ }
+ return instance_;
+ }
+
+ // Returns the name of the window class, registering the class if it hasn't
+ // previously been registered.
+ const wchar_t* GetWindowClass();
+
+ // Unregisters the window class. Should only be called if there are no
+ // instances of the window.
+ void UnregisterWindowClass();
+
+ private:
+ WindowClassRegistrar() = default;
+
+ static WindowClassRegistrar* instance_;
+
+ bool class_registered_ = false;
+};
+
+WindowClassRegistrar* WindowClassRegistrar::instance_ = nullptr;
+
+const wchar_t* WindowClassRegistrar::GetWindowClass() {
+ if (!class_registered_) {
+ WNDCLASS window_class{};
+ window_class.hCursor = LoadCursor(nullptr, IDC_ARROW);
+ window_class.lpszClassName = kWindowClassName;
+ window_class.style = CS_HREDRAW | CS_VREDRAW;
+ window_class.cbClsExtra = 0;
+ window_class.cbWndExtra = 0;
+ window_class.hInstance = GetModuleHandle(nullptr);
+ window_class.hIcon =
+ LoadIcon(window_class.hInstance, MAKEINTRESOURCE(IDI_APP_ICON));
+ window_class.hbrBackground = 0;
+ window_class.lpszMenuName = nullptr;
+ window_class.lpfnWndProc = Win32Window::WndProc;
+ RegisterClass(&window_class);
+ class_registered_ = true;
+ }
+ return kWindowClassName;
+}
+
+void WindowClassRegistrar::UnregisterWindowClass() {
+ UnregisterClass(kWindowClassName, nullptr);
+ class_registered_ = false;
+}
+
+Win32Window::Win32Window() {
+ ++g_active_window_count;
+}
+
+Win32Window::~Win32Window() {
+ --g_active_window_count;
+ Destroy();
+}
+
+bool Win32Window::Create(const std::wstring& title,
+ const Point& origin,
+ const Size& size) {
+ Destroy();
+
+ const wchar_t* window_class =
+ WindowClassRegistrar::GetInstance()->GetWindowClass();
+
+ const POINT target_point = {static_cast(origin.x),
+ static_cast(origin.y)};
+ HMONITOR monitor = MonitorFromPoint(target_point, MONITOR_DEFAULTTONEAREST);
+ UINT dpi = FlutterDesktopGetDpiForMonitor(monitor);
+ double scale_factor = dpi / 96.0;
+
+ HWND window = CreateWindow(
+ window_class, title.c_str(), WS_OVERLAPPEDWINDOW,
+ Scale(origin.x, scale_factor), Scale(origin.y, scale_factor),
+ Scale(size.width, scale_factor), Scale(size.height, scale_factor),
+ nullptr, nullptr, GetModuleHandle(nullptr), this);
+
+ if (!window) {
+ return false;
+ }
+
+ UpdateTheme(window);
+
+ return OnCreate();
+}
+
+bool Win32Window::Show() {
+ return ShowWindow(window_handle_, SW_SHOWNORMAL);
+}
+
+// static
+LRESULT CALLBACK Win32Window::WndProc(HWND const window,
+ UINT const message,
+ WPARAM const wparam,
+ LPARAM const lparam) noexcept {
+ if (message == WM_NCCREATE) {
+ auto window_struct = reinterpret_cast(lparam);
+ SetWindowLongPtr(window, GWLP_USERDATA,
+ reinterpret_cast(window_struct->lpCreateParams));
+
+ auto that = static_cast(window_struct->lpCreateParams);
+ EnableFullDpiSupportIfAvailable(window);
+ that->window_handle_ = window;
+ } else if (Win32Window* that = GetThisFromHandle(window)) {
+ return that->MessageHandler(window, message, wparam, lparam);
+ }
+
+ return DefWindowProc(window, message, wparam, lparam);
+}
+
+LRESULT
+Win32Window::MessageHandler(HWND hwnd,
+ UINT const message,
+ WPARAM const wparam,
+ LPARAM const lparam) noexcept {
+ switch (message) {
+ case WM_DESTROY:
+ window_handle_ = nullptr;
+ Destroy();
+ if (quit_on_close_) {
+ PostQuitMessage(0);
+ }
+ return 0;
+
+ case WM_DPICHANGED: {
+ auto newRectSize = reinterpret_cast(lparam);
+ LONG newWidth = newRectSize->right - newRectSize->left;
+ LONG newHeight = newRectSize->bottom - newRectSize->top;
+
+ SetWindowPos(hwnd, nullptr, newRectSize->left, newRectSize->top, newWidth,
+ newHeight, SWP_NOZORDER | SWP_NOACTIVATE);
+
+ return 0;
+ }
+ case WM_SIZE: {
+ RECT rect = GetClientArea();
+ if (child_content_ != nullptr) {
+ // Size and position the child window.
+ MoveWindow(child_content_, rect.left, rect.top, rect.right - rect.left,
+ rect.bottom - rect.top, TRUE);
+ }
+ return 0;
+ }
+
+ case WM_ACTIVATE:
+ if (child_content_ != nullptr) {
+ SetFocus(child_content_);
+ }
+ return 0;
+
+ case WM_DWMCOLORIZATIONCOLORCHANGED:
+ UpdateTheme(hwnd);
+ return 0;
+ }
+
+ return DefWindowProc(window_handle_, message, wparam, lparam);
+}
+
+void Win32Window::Destroy() {
+ OnDestroy();
+
+ if (window_handle_) {
+ DestroyWindow(window_handle_);
+ window_handle_ = nullptr;
+ }
+ if (g_active_window_count == 0) {
+ WindowClassRegistrar::GetInstance()->UnregisterWindowClass();
+ }
+}
+
+Win32Window* Win32Window::GetThisFromHandle(HWND const window) noexcept {
+ return reinterpret_cast(
+ GetWindowLongPtr(window, GWLP_USERDATA));
+}
+
+void Win32Window::SetChildContent(HWND content) {
+ child_content_ = content;
+ SetParent(content, window_handle_);
+ RECT frame = GetClientArea();
+
+ MoveWindow(content, frame.left, frame.top, frame.right - frame.left,
+ frame.bottom - frame.top, true);
+
+ SetFocus(child_content_);
+}
+
+RECT Win32Window::GetClientArea() {
+ RECT frame;
+ GetClientRect(window_handle_, &frame);
+ return frame;
+}
+
+HWND Win32Window::GetHandle() {
+ return window_handle_;
+}
+
+void Win32Window::SetQuitOnClose(bool quit_on_close) {
+ quit_on_close_ = quit_on_close;
+}
+
+bool Win32Window::OnCreate() {
+ // No-op; provided for subclasses.
+ return true;
+}
+
+void Win32Window::OnDestroy() {
+ // No-op; provided for subclasses.
+}
+
+void Win32Window::UpdateTheme(HWND const window) {
+ DWORD light_mode;
+ DWORD light_mode_size = sizeof(light_mode);
+ LSTATUS result = RegGetValue(HKEY_CURRENT_USER, kGetPreferredBrightnessRegKey,
+ kGetPreferredBrightnessRegValue,
+ RRF_RT_REG_DWORD, nullptr, &light_mode,
+ &light_mode_size);
+
+ if (result == ERROR_SUCCESS) {
+ BOOL enable_dark_mode = light_mode == 0;
+ DwmSetWindowAttribute(window, DWMWA_USE_IMMERSIVE_DARK_MODE,
+ &enable_dark_mode, sizeof(enable_dark_mode));
+ }
+}
diff --git a/flutter/examples/platform_channel/windows/runner/win32_window.h b/flutter/examples/platform_channel/windows/runner/win32_window.h
new file mode 100644
index 0000000000000000000000000000000000000000..bb93e8879162ee652a0af7e428d938ad027ddcd7
--- /dev/null
+++ b/flutter/examples/platform_channel/windows/runner/win32_window.h
@@ -0,0 +1,106 @@
+// 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 RUNNER_WIN32_WINDOW_H_
+#define RUNNER_WIN32_WINDOW_H_
+
+#include
+
+#include
+#include
+#include
+
+// A class abstraction for a high DPI-aware Win32 Window. Intended to be
+// inherited from by classes that wish to specialize with custom
+// rendering and input handling
+class Win32Window {
+ public:
+ struct Point {
+ unsigned int x;
+ unsigned int y;
+ Point(unsigned int x, unsigned int y) : x(x), y(y) {}
+ };
+
+ struct Size {
+ unsigned int width;
+ unsigned int height;
+ Size(unsigned int width, unsigned int height)
+ : width(width), height(height) {}
+ };
+
+ Win32Window();
+ virtual ~Win32Window();
+
+ // Creates a win32 window with |title| that is positioned and sized using
+ // |origin| and |size|. New windows are created on the default monitor. Window
+ // sizes are specified to the OS in physical pixels, hence to ensure a
+ // consistent size this function will scale the inputted width and height as
+ // as appropriate for the default monitor. The window is invisible until
+ // |Show| is called. Returns true if the window was created successfully.
+ bool Create(const std::wstring& title, const Point& origin, const Size& size);
+
+ // Show the current window. Returns true if the window was successfully shown.
+ bool Show();
+
+ // Release OS resources associated with window.
+ void Destroy();
+
+ // Inserts |content| into the window tree.
+ void SetChildContent(HWND content);
+
+ // Returns the backing Window handle to enable clients to set icon and other
+ // window properties. Returns nullptr if the window has been destroyed.
+ HWND GetHandle();
+
+ // If true, closing this window will quit the application.
+ void SetQuitOnClose(bool quit_on_close);
+
+ // Return a RECT representing the bounds of the current client area.
+ RECT GetClientArea();
+
+ protected:
+ // Processes and route salient window messages for mouse handling,
+ // size change and DPI. Delegates handling of these to member overloads that
+ // inheriting classes can handle.
+ virtual LRESULT MessageHandler(HWND window,
+ UINT const message,
+ WPARAM const wparam,
+ LPARAM const lparam) noexcept;
+
+ // Called when CreateAndShow is called, allowing subclass window-related
+ // setup. Subclasses should return false if setup fails.
+ virtual bool OnCreate();
+
+ // Called when Destroy is called.
+ virtual void OnDestroy();
+
+ private:
+ friend class WindowClassRegistrar;
+
+ // OS callback called by message pump. Handles the WM_NCCREATE message which
+ // is passed when the non-client area is being created and enables automatic
+ // non-client DPI scaling so that the non-client area automatically
+ // responds to changes in DPI. All other messages are handled by
+ // MessageHandler.
+ static LRESULT CALLBACK WndProc(HWND const window,
+ UINT const message,
+ WPARAM const wparam,
+ LPARAM const lparam) noexcept;
+
+ // Retrieves a class instance pointer for |window|
+ static Win32Window* GetThisFromHandle(HWND const window) noexcept;
+
+ // Update the window frame's theme to match the system theme.
+ static void UpdateTheme(HWND const window);
+
+ bool quit_on_close_ = false;
+
+ // window handle for top level window.
+ HWND window_handle_ = nullptr;
+
+ // window handle for hosted content.
+ HWND child_content_ = nullptr;
+};
+
+#endif // RUNNER_WIN32_WINDOW_H_
diff --git a/flutter/examples/platform_channel_swift/README.md b/flutter/examples/platform_channel_swift/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..da415d80ba0d3e4546c8c8eed410e19466ee3408
--- /dev/null
+++ b/flutter/examples/platform_channel_swift/README.md
@@ -0,0 +1,18 @@
+# Example of calling platform services from Flutter
+
+This project demonstrates how to connect a Flutter app to platform-specific
+services on iOS using Swift. The equivalent version of this project in
+Objective C is found in examples/platform_channel.
+
+You can read more about
+[accessing platform and third-party services in Flutter](https://flutter.dev/platform-channels/).
+
+## iOS
+
+You can use the commands `flutter build` and `flutter run` from the app's root
+directory to build/run the app or you can open `ios/Runner.xcworkspace` in Xcode
+and build/run the project as usual.
+
+## Android
+
+We refer to the platform_channel project.
diff --git a/flutter/examples/platform_channel_swift/ios/Flutter/AppFrameworkInfo.plist b/flutter/examples/platform_channel_swift/ios/Flutter/AppFrameworkInfo.plist
new file mode 100644
index 0000000000000000000000000000000000000000..8c6e56146e23c84aa60ea78f20bc3a7b3d8ef259
--- /dev/null
+++ b/flutter/examples/platform_channel_swift/ios/Flutter/AppFrameworkInfo.plist
@@ -0,0 +1,26 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ $(DEVELOPMENT_LANGUAGE)
+ CFBundleExecutable
+ App
+ CFBundleIdentifier
+ io.flutter.flutter.app
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ App
+ CFBundlePackageType
+ FMWK
+ CFBundleShortVersionString
+ 1.0
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ 1.0
+ MinimumOSVersion
+ 12.0
+
+
diff --git a/flutter/examples/platform_channel_swift/ios/Flutter/Debug.xcconfig b/flutter/examples/platform_channel_swift/ios/Flutter/Debug.xcconfig
new file mode 100644
index 0000000000000000000000000000000000000000..592ceee85b89bd111b779db6116b130509ab6d4b
--- /dev/null
+++ b/flutter/examples/platform_channel_swift/ios/Flutter/Debug.xcconfig
@@ -0,0 +1 @@
+#include "Generated.xcconfig"
diff --git a/flutter/examples/platform_channel_swift/ios/Flutter/Release.xcconfig b/flutter/examples/platform_channel_swift/ios/Flutter/Release.xcconfig
new file mode 100644
index 0000000000000000000000000000000000000000..592ceee85b89bd111b779db6116b130509ab6d4b
--- /dev/null
+++ b/flutter/examples/platform_channel_swift/ios/Flutter/Release.xcconfig
@@ -0,0 +1 @@
+#include "Generated.xcconfig"
diff --git a/flutter/examples/platform_channel_swift/ios/Runner.xcodeproj/project.pbxproj b/flutter/examples/platform_channel_swift/ios/Runner.xcodeproj/project.pbxproj
new file mode 100644
index 0000000000000000000000000000000000000000..36bcf9a59f4d9d3b5a28ef4227cf54d7bc726871
--- /dev/null
+++ b/flutter/examples/platform_channel_swift/ios/Runner.xcodeproj/project.pbxproj
@@ -0,0 +1,484 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 54;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
+ 3BAEBBFF1EBA9DA300EE9294 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3BAEBBFE1EBA9DA300EE9294 /* AppDelegate.swift */; };
+ 74970F6B1EDC12EC000507F3 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 74970F6A1EDC12EC000507F3 /* GeneratedPluginRegistrant.m */; };
+ 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
+ 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
+ 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+ 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 2147483647;
+ dstPath = "";
+ dstSubfolderSpec = 10;
+ files = (
+ );
+ name = "Embed Frameworks";
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+ 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
+ 3BAEBBFE1EBA9DA300EE9294 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
+ 3BAEBC001EBA9DCA00EE9294 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
+ 74970F691EDC12EC000507F3 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
+ 74970F6A1EDC12EC000507F3 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
+ 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
+ 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
+ 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
+ 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
+ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
+ 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
+ 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 97C146EB1CF9000F007C117D /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 9740EEB11CF90186004384FC /* Flutter */ = {
+ isa = PBXGroup;
+ children = (
+ 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
+ 9740EEB21CF90195004384FC /* Debug.xcconfig */,
+ 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
+ 9740EEB31CF90195004384FC /* Generated.xcconfig */,
+ );
+ name = Flutter;
+ sourceTree = "";
+ };
+ 97C146E51CF9000F007C117D = {
+ isa = PBXGroup;
+ children = (
+ 9740EEB11CF90186004384FC /* Flutter */,
+ 97C146F01CF9000F007C117D /* Runner */,
+ 97C146EF1CF9000F007C117D /* Products */,
+ CF3B75C9A7D2FA2A4C99F110 /* Frameworks */,
+ );
+ sourceTree = "";
+ };
+ 97C146EF1CF9000F007C117D /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 97C146EE1CF9000F007C117D /* Runner.app */,
+ );
+ name = Products;
+ sourceTree = "";
+ };
+ 97C146F01CF9000F007C117D /* Runner */ = {
+ isa = PBXGroup;
+ children = (
+ 74970F691EDC12EC000507F3 /* GeneratedPluginRegistrant.h */,
+ 74970F6A1EDC12EC000507F3 /* GeneratedPluginRegistrant.m */,
+ 3BAEBBFE1EBA9DA300EE9294 /* AppDelegate.swift */,
+ 97C146FA1CF9000F007C117D /* Main.storyboard */,
+ 97C146FD1CF9000F007C117D /* Assets.xcassets */,
+ 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
+ 97C147021CF9000F007C117D /* Info.plist */,
+ 3BAEBC001EBA9DCA00EE9294 /* Runner-Bridging-Header.h */,
+ 97C146F11CF9000F007C117D /* Supporting Files */,
+ );
+ path = Runner;
+ sourceTree = "";
+ };
+ 97C146F11CF9000F007C117D /* Supporting Files */ = {
+ isa = PBXGroup;
+ children = (
+ );
+ name = "Supporting Files";
+ sourceTree = "";
+ };
+ CF3B75C9A7D2FA2A4C99F110 /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ );
+ name = Frameworks;
+ sourceTree = "";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 97C146ED1CF9000F007C117D /* Runner */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
+ buildPhases = (
+ 9740EEB61CF901F6004384FC /* Run Script */,
+ 97C146EA1CF9000F007C117D /* Sources */,
+ 97C146EB1CF9000F007C117D /* Frameworks */,
+ 97C146EC1CF9000F007C117D /* Resources */,
+ 9705A1C41CF9048500538489 /* Embed Frameworks */,
+ 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = Runner;
+ productName = Runner;
+ productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 97C146E61CF9000F007C117D /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 1510;
+ ORGANIZATIONNAME = "The Flutter Authors";
+ TargetAttributes = {
+ 97C146ED1CF9000F007C117D = {
+ CreatedOnToolsVersion = 7.3.1;
+ LastSwiftMigration = 1100;
+ };
+ };
+ };
+ buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
+ compatibilityVersion = "Xcode 3.2";
+ developmentRegion = en;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ Base,
+ );
+ mainGroup = 97C146E51CF9000F007C117D;
+ productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 97C146ED1CF9000F007C117D /* Runner */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 97C146EC1CF9000F007C117D /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
+ 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
+ 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
+ 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+ 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
+ isa = PBXShellScriptBuildPhase;
+ alwaysOutOfDate = 1;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
+ );
+ name = "Thin Binary";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
+ };
+ 9740EEB61CF901F6004384FC /* Run Script */ = {
+ isa = PBXShellScriptBuildPhase;
+ alwaysOutOfDate = 1;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ name = "Run Script";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
+ };
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 97C146EA1CF9000F007C117D /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 3BAEBBFF1EBA9DA300EE9294 /* AppDelegate.swift in Sources */,
+ 74970F6B1EDC12EC000507F3 /* GeneratedPluginRegistrant.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+ 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 97C146FB1CF9000F007C117D /* Base */,
+ );
+ name = Main.storyboard;
+ sourceTree = "";
+ };
+ 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 97C147001CF9000F007C117D /* Base */,
+ );
+ name = LaunchScreen.storyboard;
+ sourceTree = "";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ 2470A27921828D8700ACAC9C /* Profile */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 12.0;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ SDKROOT = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Profile;
+ };
+ 2470A27A21828D8700ACAC9C /* Profile */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ENABLE_MODULES = YES;
+ ENABLE_BITCODE = NO;
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.PlatformChannelSwift;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
+ SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+ SWIFT_VERSION = 5.0;
+ };
+ name = Profile;
+ };
+ 97C147031CF9000F007C117D /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ ENABLE_TESTABILITY = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 12.0;
+ MTL_ENABLE_DEBUG_INFO = YES;
+ ONLY_ACTIVE_ARCH = YES;
+ SDKROOT = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ };
+ name = Debug;
+ };
+ 97C147041CF9000F007C117D /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 12.0;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ SDKROOT = iphoneos;
+ SWIFT_COMPILATION_MODE = wholemodule;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Release;
+ };
+ 97C147061CF9000F007C117D /* Debug */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ENABLE_MODULES = YES;
+ ENABLE_BITCODE = NO;
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.PlatformChannelSwift;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
+ SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+ SWIFT_VERSION = 5.0;
+ };
+ name = Debug;
+ };
+ 97C147071CF9000F007C117D /* Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ENABLE_MODULES = YES;
+ ENABLE_BITCODE = NO;
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.PlatformChannelSwift;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
+ SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+ SWIFT_VERSION = 5.0;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 97C147031CF9000F007C117D /* Debug */,
+ 97C147041CF9000F007C117D /* Release */,
+ 2470A27921828D8700ACAC9C /* Profile */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 97C147061CF9000F007C117D /* Debug */,
+ 97C147071CF9000F007C117D /* Release */,
+ 2470A27A21828D8700ACAC9C /* Profile */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 97C146E61CF9000F007C117D /* Project object */;
+}
diff --git a/flutter/examples/platform_channel_swift/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/flutter/examples/platform_channel_swift/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000000000000000000000000000000000000..919434a6254f0e9651f402737811be6634a03e9c
--- /dev/null
+++ b/flutter/examples/platform_channel_swift/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+
+
+
+
+
diff --git a/flutter/examples/platform_channel_swift/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/flutter/examples/platform_channel_swift/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 0000000000000000000000000000000000000000..18d981003d68d0546c4804ac2ff47dd97c6e7921
--- /dev/null
+++ b/flutter/examples/platform_channel_swift/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/flutter/examples/platform_channel_swift/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/flutter/examples/platform_channel_swift/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
new file mode 100644
index 0000000000000000000000000000000000000000..e67b2808af02f9ec16f2d72b7961aefdf844afa5
--- /dev/null
+++ b/flutter/examples/platform_channel_swift/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
@@ -0,0 +1,91 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/flutter/examples/platform_channel_swift/ios/Runner.xcworkspace/contents.xcworkspacedata b/flutter/examples/platform_channel_swift/ios/Runner.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000000000000000000000000000000000000..1d526a16ed0f1cd0c2409d848bf489b93fefa3b2
--- /dev/null
+++ b/flutter/examples/platform_channel_swift/ios/Runner.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+
+
+
+
+
diff --git a/flutter/examples/platform_channel_swift/ios/Runner/AppDelegate.swift b/flutter/examples/platform_channel_swift/ios/Runner/AppDelegate.swift
new file mode 100644
index 0000000000000000000000000000000000000000..f5eadb6930270ce535b086e2452d59c82f468d08
--- /dev/null
+++ b/flutter/examples/platform_channel_swift/ios/Runner/AppDelegate.swift
@@ -0,0 +1,103 @@
+// 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 UIKit
+import Flutter
+
+enum ChannelName {
+ static let battery = "samples.flutter.io/battery"
+ static let charging = "samples.flutter.io/charging"
+}
+
+enum BatteryState {
+ static let charging = "charging"
+ static let discharging = "discharging"
+}
+
+enum MyFlutterErrorCode {
+ static let unavailable = "UNAVAILABLE"
+}
+
+@UIApplicationMain
+@objc class AppDelegate: FlutterAppDelegate, FlutterStreamHandler {
+ private var eventSink: FlutterEventSink?
+
+ override func application(
+ _ application: UIApplication,
+ didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
+ GeneratedPluginRegistrant.register(with: self)
+ guard let controller = window?.rootViewController as? FlutterViewController else {
+ fatalError("rootViewController is not type FlutterViewController")
+ }
+ let batteryChannel = FlutterMethodChannel(name: ChannelName.battery,
+ binaryMessenger: controller.binaryMessenger)
+ batteryChannel.setMethodCallHandler({
+ [weak self] (call: FlutterMethodCall, result: FlutterResult) -> Void in
+ guard call.method == "getBatteryLevel" else {
+ result(FlutterMethodNotImplemented)
+ return
+ }
+ self?.receiveBatteryLevel(result: result)
+ })
+
+ let chargingChannel = FlutterEventChannel(name: ChannelName.charging,
+ binaryMessenger: controller.binaryMessenger)
+ chargingChannel.setStreamHandler(self)
+ return super.application(application, didFinishLaunchingWithOptions: launchOptions)
+ }
+
+ private func receiveBatteryLevel(result: FlutterResult) {
+ let device = UIDevice.current
+ device.isBatteryMonitoringEnabled = true
+ guard device.batteryState != .unknown else {
+ result(FlutterError(code: MyFlutterErrorCode.unavailable,
+ message: "Battery info unavailable",
+ details: nil))
+ return
+ }
+ result(Int(device.batteryLevel * 100))
+ }
+
+ public func onListen(withArguments arguments: Any?,
+ eventSink: @escaping FlutterEventSink) -> FlutterError? {
+ self.eventSink = eventSink
+ UIDevice.current.isBatteryMonitoringEnabled = true
+ sendBatteryStateEvent()
+ NotificationCenter.default.addObserver(
+ self,
+ selector: #selector(AppDelegate.onBatteryStateDidChange),
+ name: UIDevice.batteryStateDidChangeNotification,
+ object: nil)
+ return nil
+ }
+
+ @objc private func onBatteryStateDidChange(notification: NSNotification) {
+ sendBatteryStateEvent()
+ }
+
+ private func sendBatteryStateEvent() {
+ guard let eventSink = eventSink else {
+ return
+ }
+
+ switch UIDevice.current.batteryState {
+ case .full:
+ eventSink(BatteryState.charging)
+ case .charging:
+ eventSink(BatteryState.charging)
+ case .unplugged:
+ eventSink(BatteryState.discharging)
+ default:
+ eventSink(FlutterError(code: MyFlutterErrorCode.unavailable,
+ message: "Charging status unavailable",
+ details: nil))
+ }
+ }
+
+ public func onCancel(withArguments arguments: Any?) -> FlutterError? {
+ NotificationCenter.default.removeObserver(self)
+ eventSink = nil
+ return nil
+ }
+}
diff --git a/flutter/examples/platform_channel_swift/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/flutter/examples/platform_channel_swift/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
new file mode 100644
index 0000000000000000000000000000000000000000..1d060ed28827ed6aca9565d946e6b5595c8978df
--- /dev/null
+++ b/flutter/examples/platform_channel_swift/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
@@ -0,0 +1,93 @@
+{
+ "images" : [
+ {
+ "idiom" : "iphone",
+ "size" : "20x20",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "iphone",
+ "size" : "20x20",
+ "scale" : "3x"
+ },
+ {
+ "idiom" : "iphone",
+ "size" : "29x29",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "iphone",
+ "size" : "29x29",
+ "scale" : "3x"
+ },
+ {
+ "idiom" : "iphone",
+ "size" : "40x40",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "iphone",
+ "size" : "40x40",
+ "scale" : "3x"
+ },
+ {
+ "idiom" : "iphone",
+ "size" : "60x60",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "iphone",
+ "size" : "60x60",
+ "scale" : "3x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "20x20",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "20x20",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "29x29",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "29x29",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "40x40",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "40x40",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "76x76",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "76x76",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "83.5x83.5",
+ "scale" : "2x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/flutter/examples/platform_channel_swift/ios/Runner/Base.lproj/LaunchScreen.storyboard b/flutter/examples/platform_channel_swift/ios/Runner/Base.lproj/LaunchScreen.storyboard
new file mode 100644
index 0000000000000000000000000000000000000000..ebf48f6039745ccdb57ad6237321024eb6cdf9af
--- /dev/null
+++ b/flutter/examples/platform_channel_swift/ios/Runner/Base.lproj/LaunchScreen.storyboard
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/flutter/examples/platform_channel_swift/ios/Runner/Base.lproj/Main.storyboard b/flutter/examples/platform_channel_swift/ios/Runner/Base.lproj/Main.storyboard
new file mode 100644
index 0000000000000000000000000000000000000000..f3c28516fb38e64d88cfcf5fb1791175df078f2f
--- /dev/null
+++ b/flutter/examples/platform_channel_swift/ios/Runner/Base.lproj/Main.storyboard
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/flutter/examples/platform_channel_swift/ios/Runner/Info.plist b/flutter/examples/platform_channel_swift/ios/Runner/Info.plist
new file mode 100644
index 0000000000000000000000000000000000000000..97a48d5f7b0c45327f5381bdafd85f70966c9735
--- /dev/null
+++ b/flutter/examples/platform_channel_swift/ios/Runner/Info.plist
@@ -0,0 +1,47 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ $(DEVELOPMENT_LANGUAGE)
+ CFBundleExecutable
+ $(EXECUTABLE_NAME)
+ CFBundleIdentifier
+ $(PRODUCT_BUNDLE_IDENTIFIER)
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ PlatformChannel
+ CFBundlePackageType
+ APPL
+ CFBundleShortVersionString
+ 1.0
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ 1
+ LSRequiresIPhoneOS
+
+ UILaunchStoryboardName
+ LaunchScreen
+ UIMainStoryboardFile
+ Main
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UISupportedInterfaceOrientations~ipad
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationPortraitUpsideDown
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ CADisableMinimumFrameDurationOnPhone
+
+ UIApplicationSupportsIndirectInputEvents
+
+
+
diff --git a/flutter/examples/platform_channel_swift/ios/Runner/Runner-Bridging-Header.h b/flutter/examples/platform_channel_swift/ios/Runner/Runner-Bridging-Header.h
new file mode 100644
index 0000000000000000000000000000000000000000..95b7baf386d06a38be9c775a9e97659baad52dc5
--- /dev/null
+++ b/flutter/examples/platform_channel_swift/ios/Runner/Runner-Bridging-Header.h
@@ -0,0 +1,5 @@
+// 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 "GeneratedPluginRegistrant.h"
diff --git a/flutter/examples/platform_channel_swift/lib/main.dart b/flutter/examples/platform_channel_swift/lib/main.dart
new file mode 100644
index 0000000000000000000000000000000000000000..ada6ab5b592368d6e1a8ae4d820514163c38ea81
--- /dev/null
+++ b/flutter/examples/platform_channel_swift/lib/main.dart
@@ -0,0 +1,86 @@
+// 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 'dart:async';
+
+import 'package:flutter/material.dart';
+import 'package:flutter/services.dart';
+
+class PlatformChannel extends StatefulWidget {
+ const PlatformChannel({super.key});
+
+ @override
+ State createState() => _PlatformChannelState();
+}
+
+class _PlatformChannelState extends State {
+ static const MethodChannel methodChannel =
+ MethodChannel('samples.flutter.io/battery');
+ static const EventChannel eventChannel =
+ EventChannel('samples.flutter.io/charging');
+
+ String _batteryLevel = 'Battery level: unknown.';
+ String _chargingStatus = 'Battery status: unknown.';
+
+ Future _getBatteryLevel() async {
+ String batteryLevel;
+ try {
+ final int? result = await methodChannel.invokeMethod('getBatteryLevel');
+ batteryLevel = 'Battery level: $result%.';
+ } on PlatformException {
+ batteryLevel = 'Failed to get battery level.';
+ }
+ setState(() {
+ _batteryLevel = batteryLevel;
+ });
+ }
+
+ @override
+ void initState() {
+ super.initState();
+ eventChannel.receiveBroadcastStream().listen(_onEvent, onError: _onError);
+ }
+
+ void _onEvent(Object? event) {
+ setState(() {
+ _chargingStatus =
+ "Battery status: ${event == 'charging' ? '' : 'dis'}charging.";
+ });
+ }
+
+ void _onError(Object error) {
+ setState(() {
+ _chargingStatus = 'Battery status: unknown.';
+ });
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return Material(
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.spaceEvenly,
+ children: [
+ Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Text(_batteryLevel, key: const Key('Battery level label')),
+ Padding(
+ padding: const EdgeInsets.all(16.0),
+ child: ElevatedButton(
+ onPressed: _getBatteryLevel,
+ child: const Text('Refresh'),
+ ),
+ ),
+ ],
+ ),
+ Text(_chargingStatus),
+ ],
+ ),
+ );
+ }
+}
+
+void main() {
+ runApp(const MaterialApp(home: PlatformChannel()));
+}
diff --git a/flutter/examples/platform_channel_swift/platform_channel_swift.iml b/flutter/examples/platform_channel_swift/platform_channel_swift.iml
new file mode 100644
index 0000000000000000000000000000000000000000..1d83ed3abc9085f991ca3f8f864f38df5577a8a6
--- /dev/null
+++ b/flutter/examples/platform_channel_swift/platform_channel_swift.iml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/flutter/examples/platform_channel_swift/pubspec.lock b/flutter/examples/platform_channel_swift/pubspec.lock
new file mode 100644
index 0000000000000000000000000000000000000000..ad1b0b9a0996e1d4cf90d2df5ba990b0823723d3
--- /dev/null
+++ b/flutter/examples/platform_channel_swift/pubspec.lock
@@ -0,0 +1,494 @@
+# Generated by pub
+# See https://dart.dev/tools/pub/glossary#lockfile
+packages:
+ _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"
diff --git a/flutter/examples/platform_channel_swift/pubspec.yaml b/flutter/examples/platform_channel_swift/pubspec.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..01bc3ffac36cc7653f1bb13aac700d661b1dfcaa
--- /dev/null
+++ b/flutter/examples/platform_channel_swift/pubspec.yaml
@@ -0,0 +1,77 @@
+name: platform_channel_swift
+
+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
+ flutter_driver:
+ 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"
+
+flutter:
+ uses-material-design: true
+
+# PUBSPEC CHECKSUM: 6020
diff --git a/flutter/examples/platform_channel_swift/test_driver/button_tap.dart b/flutter/examples/platform_channel_swift/test_driver/button_tap.dart
new file mode 100644
index 0000000000000000000000000000000000000000..70b078e68447dfa4083ac40d41d800790506b51a
--- /dev/null
+++ b/flutter/examples/platform_channel_swift/test_driver/button_tap.dart
@@ -0,0 +1,11 @@
+// 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_driver/driver_extension.dart';
+import 'package:platform_channel_swift/main.dart' as app;
+
+void main() {
+ enableFlutterDriverExtension();
+ app.main();
+}
diff --git a/flutter/examples/platform_channel_swift/test_driver/button_tap_test.dart b/flutter/examples/platform_channel_swift/test_driver/button_tap_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..53d4c997d1866101fa4f1637853fbb259a0bf4cf
--- /dev/null
+++ b/flutter/examples/platform_channel_swift/test_driver/button_tap_test.dart
@@ -0,0 +1,37 @@
+// 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_driver/flutter_driver.dart';
+import 'package:test/test.dart' hide TypeMatcher, isInstanceOf;
+
+void main() {
+ group('button tap test', () {
+ late FlutterDriver driver;
+
+ setUpAll(() async {
+ driver = await FlutterDriver.connect();
+ });
+
+ tearDownAll(() async {
+ driver.close();
+ });
+
+ test('tap on the button, verify result', () async {
+ final SerializableFinder batteryLevelLabel =
+ find.byValueKey('Battery level label');
+ expect(batteryLevelLabel, isNotNull);
+
+ final SerializableFinder button = find.text('Refresh');
+ await driver.waitFor(button);
+ await driver.tap(button);
+
+ String? batteryLevel;
+ while (batteryLevel == null || batteryLevel.contains('unknown')) {
+ batteryLevel = await driver.getText(batteryLevelLabel);
+ }
+
+ expect(batteryLevel.contains('%'), isTrue);
+ });
+ });
+}
diff --git a/flutter/examples/platform_view/README.md b/flutter/examples/platform_view/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..c1a95888e18f18c4fda19d33ca0ae92796649bc0
--- /dev/null
+++ b/flutter/examples/platform_view/README.md
@@ -0,0 +1,12 @@
+# Example of switching between full-screen Flutter and Platform View
+
+This project demonstrates how to bring up a full-screen iOS/Android view from a
+full-screen Flutter view along with passing data back and forth between the two.
+
+On iOS, we use a CocoaPods dependency to add a Material Design button, and so
+`pod install` needs to be invoked in the `ios/` folder before `flutter run`:
+
+```
+pushd ios/ ; pod install ; popd
+flutter run
+```
diff --git a/flutter/examples/platform_view/android.iml b/flutter/examples/platform_view/android.iml
new file mode 100644
index 0000000000000000000000000000000000000000..5f07b2c1a639c51b9163861138ca86eace1cc46a
--- /dev/null
+++ b/flutter/examples/platform_view/android.iml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/flutter/examples/platform_view/android/app/build.gradle b/flutter/examples/platform_view/android/app/build.gradle
new file mode 100644
index 0000000000000000000000000000000000000000..228e73ecbb04bb1fb03b9276fbbd35eed645c028
--- /dev/null
+++ b/flutter/examples/platform_view/android/app/build.gradle
@@ -0,0 +1,64 @@
+// 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 "io.flutter.examples.platform_view"
+ compileSdk flutter.compileSdkVersion
+
+ compileOptions {
+ sourceCompatibility JavaVersion.VERSION_1_8
+ targetCompatibility JavaVersion.VERSION_1_8
+ }
+
+ defaultConfig {
+ applicationId "io.flutter.examples.platform_view"
+ minSdkVersion flutter.minSdkVersion
+ targetSdkVersion flutter.targetSdkVersion
+ versionCode flutterVersionCode.toInteger()
+ versionName flutterVersionName
+ }
+
+ 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 {
+ implementation 'androidx.appcompat:appcompat:1.1.0'
+ implementation 'com.google.android.material:material:1.0.0'
+}
diff --git a/flutter/examples/platform_view/android/app/src/main/AndroidManifest.xml b/flutter/examples/platform_view/android/app/src/main/AndroidManifest.xml
new file mode 100644
index 0000000000000000000000000000000000000000..4dd54b32013d19ed7b34619c9bb277ea60ba85f8
--- /dev/null
+++ b/flutter/examples/platform_view/android/app/src/main/AndroidManifest.xml
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/flutter/examples/platform_view/android/app/src/main/java/io/flutter/examples/platform_view/CountActivity.java b/flutter/examples/platform_view/android/app/src/main/java/io/flutter/examples/platform_view/CountActivity.java
new file mode 100644
index 0000000000000000000000000000000000000000..dd1f5834b45fbc230b37feabaf1c6711088793dc
--- /dev/null
+++ b/flutter/examples/platform_view/android/app/src/main/java/io/flutter/examples/platform_view/CountActivity.java
@@ -0,0 +1,66 @@
+// 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 io.flutter.examples.platform_view;
+
+import android.app.Activity;
+import android.content.Intent;
+import android.os.Bundle;
+import android.view.View;
+import android.widget.Button;
+import android.widget.TextView;
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.appcompat.widget.Toolbar;
+import com.google.android.material.floatingactionbutton.FloatingActionButton;
+
+public class CountActivity extends AppCompatActivity {
+ public static final String EXTRA_COUNTER = "counter";
+ private int counter;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.android_full_screen_layout);
+ Toolbar myToolbar = findViewById(R.id.my_toolbar);
+ myToolbar.setTitle("Platform View");
+ setSupportActionBar(myToolbar);
+
+ counter = getIntent().getIntExtra(EXTRA_COUNTER, 0);
+ updateText();
+
+ FloatingActionButton fab = findViewById(R.id.fab);
+ fab.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ counter++;
+ updateText();
+ }
+ });
+
+ Button switchViewButton = findViewById(R.id.button);
+ switchViewButton.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ returnToFlutterView();
+ }
+ });
+ }
+
+ private void updateText() {
+ TextView textView = findViewById(R.id.button_tap);
+ String value = "Button tapped " + counter + (counter == 1 ? " time" : " times");
+ textView.setText(value);
+ }
+
+ private void returnToFlutterView() {
+ Intent returnIntent = new Intent();
+ returnIntent.putExtra(EXTRA_COUNTER, counter);
+ setResult(Activity.RESULT_OK, returnIntent);
+ finish();
+ }
+
+ public void onBackPressed() {
+ returnToFlutterView();
+ }
+}
diff --git a/flutter/examples/platform_view/android/app/src/main/java/io/flutter/examples/platform_view/MainActivity.java b/flutter/examples/platform_view/android/app/src/main/java/io/flutter/examples/platform_view/MainActivity.java
new file mode 100644
index 0000000000000000000000000000000000000000..8a637a4239b023027b1f3b2c47dfe7d3243fea5f
--- /dev/null
+++ b/flutter/examples/platform_view/android/app/src/main/java/io/flutter/examples/platform_view/MainActivity.java
@@ -0,0 +1,56 @@
+// 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 io.flutter.examples.platform_view;
+
+import android.content.Intent;
+import androidx.annotation.NonNull;
+import io.flutter.embedding.android.FlutterActivity;
+import io.flutter.embedding.engine.FlutterEngine;
+import io.flutter.plugin.common.MethodCall;
+import io.flutter.plugin.common.MethodChannel;
+import io.flutter.plugins.GeneratedPluginRegistrant;
+
+public class MainActivity extends FlutterActivity {
+ private static final String CHANNEL = "samples.flutter.io/platform_view";
+ private static final String METHOD_SWITCH_VIEW = "switchView";
+ private static final int COUNT_REQUEST = 1;
+
+ private MethodChannel.Result result;
+
+ @Override
+ public void configureFlutterEngine(@NonNull FlutterEngine flutterEngine) {
+ new MethodChannel(flutterEngine.getDartExecutor(), CHANNEL).setMethodCallHandler(
+ new MethodChannel.MethodCallHandler() {
+ @Override
+ public void onMethodCall(MethodCall methodCall, MethodChannel.Result result) {
+ MainActivity.this.result = result;
+ int count = methodCall.arguments();
+ if (methodCall.method.equals(METHOD_SWITCH_VIEW)) {
+ onLaunchFullScreen(count);
+ } else {
+ result.notImplemented();
+ }
+ }
+ }
+ );
+ }
+
+ private void onLaunchFullScreen(int count) {
+ Intent fullScreenIntent = new Intent(this, CountActivity.class);
+ fullScreenIntent.putExtra(CountActivity.EXTRA_COUNTER, count);
+ startActivityForResult(fullScreenIntent, COUNT_REQUEST);
+ }
+
+ @Override
+ protected void onActivityResult(int requestCode, int resultCode, Intent data) {
+ if (requestCode == COUNT_REQUEST) {
+ if (resultCode == RESULT_OK) {
+ result.success(data.getIntExtra(CountActivity.EXTRA_COUNTER, 0));
+ } else {
+ result.error("ACTIVITY_FAILURE", "Failed while launching activity", null);
+ }
+ }
+ }
+}
diff --git a/flutter/examples/platform_view/android/app/src/main/res/drawable/ic_add_black_24dp.xml b/flutter/examples/platform_view/android/app/src/main/res/drawable/ic_add_black_24dp.xml
new file mode 100644
index 0000000000000000000000000000000000000000..f99c4c64f65c169034105c526ea7c011d4ac418f
--- /dev/null
+++ b/flutter/examples/platform_view/android/app/src/main/res/drawable/ic_add_black_24dp.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
diff --git a/flutter/examples/platform_view/android/app/src/main/res/layout/android_full_screen_layout.xml b/flutter/examples/platform_view/android/app/src/main/res/layout/android_full_screen_layout.xml
new file mode 100644
index 0000000000000000000000000000000000000000..d0dbc52707a2bbf62b4d9ff0813c4302d4ca8806
--- /dev/null
+++ b/flutter/examples/platform_view/android/app/src/main/res/layout/android_full_screen_layout.xml
@@ -0,0 +1,83 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/flutter/examples/platform_view/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/flutter/examples/platform_view/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 0000000000000000000000000000000000000000..db77bb4b7b0906d62b1847e87f15cdcacf6a4f29
Binary files /dev/null and b/flutter/examples/platform_view/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/flutter/examples/platform_view/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/flutter/examples/platform_view/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 0000000000000000000000000000000000000000..17987b79bb8a35cc66c3c1fd44f5a5526c1b78be
Binary files /dev/null and b/flutter/examples/platform_view/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/flutter/examples/platform_view/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/flutter/examples/platform_view/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 0000000000000000000000000000000000000000..09d4391482be68e9e4a07fab769b5de337d16eb1
Binary files /dev/null and b/flutter/examples/platform_view/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/flutter/examples/platform_view/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/flutter/examples/platform_view/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000000000000000000000000000000000000..d5f1c8d34e7a88e3f88bea192c3a370d44689c3c
Binary files /dev/null and b/flutter/examples/platform_view/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/flutter/examples/platform_view/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/flutter/examples/platform_view/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 0000000000000000000000000000000000000000..4d6372eebdb28e45604e46eeda8dd24651419bc0
Binary files /dev/null and b/flutter/examples/platform_view/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/flutter/examples/platform_view/android/app/src/main/res/values/colors.xml b/flutter/examples/platform_view/android/app/src/main/res/values/colors.xml
new file mode 100644
index 0000000000000000000000000000000000000000..0e1a899246a1f322647009813f3ca9dd48544332
--- /dev/null
+++ b/flutter/examples/platform_view/android/app/src/main/res/values/colors.xml
@@ -0,0 +1,9 @@
+
+
+
+ - #9E9E9E
+ - #FFFFFF
+ - #000000
+
diff --git a/flutter/examples/platform_view/android/app/src/main/res/values/dimens.xml b/flutter/examples/platform_view/android/app/src/main/res/values/dimens.xml
new file mode 100644
index 0000000000000000000000000000000000000000..1078837b05261f699ed602ea685aad09dd1b0827
--- /dev/null
+++ b/flutter/examples/platform_view/android/app/src/main/res/values/dimens.xml
@@ -0,0 +1,11 @@
+
+
+
+ 16dp
+ 6dp
+ 12dp
+ 17sp
+ 30sp
+
diff --git a/flutter/examples/platform_view/android/app/src/main/res/values/strings.xml b/flutter/examples/platform_view/android/app/src/main/res/values/strings.xml
new file mode 100644
index 0000000000000000000000000000000000000000..d22c2e87bd198caafb3dc6376577c5bf6858ff59
--- /dev/null
+++ b/flutter/examples/platform_view/android/app/src/main/res/values/strings.xml
@@ -0,0 +1,11 @@
+
+
+
+ Platform View
+ Flutter Application
+ Button tapped 0 times.
+ "Continue in Flutter view"
+ Android
+
diff --git a/flutter/examples/platform_view/android/app/src/main/res/values/styles.xml b/flutter/examples/platform_view/android/app/src/main/res/values/styles.xml
new file mode 100644
index 0000000000000000000000000000000000000000..2aa6f92a1fbbe5093b04452798ec00a734ec3229
--- /dev/null
+++ b/flutter/examples/platform_view/android/app/src/main/res/values/styles.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
diff --git a/flutter/examples/platform_view/android/build.gradle b/flutter/examples/platform_view/android/build.gradle
new file mode 100644
index 0000000000000000000000000000000000000000..2de20623576a82c3115eca8b1bdb56fd5b5051cb
--- /dev/null
+++ b/flutter/examples/platform_view/android/build.gradle
@@ -0,0 +1,51 @@
+// 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
+}
diff --git a/flutter/examples/platform_view/android/buildscript-gradle.lockfile b/flutter/examples/platform_view/android/buildscript-gradle.lockfile
new file mode 100644
index 0000000000000000000000000000000000000000..efe13277310ee8fef3c9d7f6f8a2cbbe601d110f
--- /dev/null
+++ b/flutter/examples/platform_view/android/buildscript-gradle.lockfile
@@ -0,0 +1,163 @@
+# 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=classpath
+androidx.databinding:databinding-compiler-common:7.2.0=classpath
+com.android.databinding:baseLibrary:7.2.0=classpath
+com.android.tools.analytics-library:crash:30.2.0=classpath
+com.android.tools.analytics-library:protos:30.2.0=classpath
+com.android.tools.analytics-library:shared:30.2.0=classpath
+com.android.tools.analytics-library:tracker:30.2.0=classpath
+com.android.tools.build.jetifier:jetifier-core:1.0.0-beta09=classpath
+com.android.tools.build.jetifier:jetifier-processor:1.0.0-beta09=classpath
+com.android.tools.build:aapt2-proto:7.2.0-7984345=classpath
+com.android.tools.build:aaptcompiler:7.2.0=classpath
+com.android.tools.build:apksig:7.2.0=classpath
+com.android.tools.build:apkzlib:7.2.0=classpath
+com.android.tools.build:builder-model:7.2.0=classpath
+com.android.tools.build:builder-test-api:7.2.0=classpath
+com.android.tools.build:builder:7.2.0=classpath
+com.android.tools.build:bundletool:1.8.2=classpath
+com.android.tools.build:gradle-api:7.2.0=classpath
+com.android.tools.build:gradle:7.2.0=classpath
+com.android.tools.build:manifest-merger:30.2.0=classpath
+com.android.tools.build:transform-api:2.0.0-deprecated-use-gradle-api=classpath
+com.android.tools.ddms:ddmlib:30.2.0=classpath
+com.android.tools.layoutlib:layoutlib-api:30.2.0=classpath
+com.android.tools.lint:lint-model:30.2.0=classpath
+com.android.tools.lint:lint-typedef-remover:30.2.0=classpath
+com.android.tools.utp:android-device-provider-ddmlib-proto:30.2.0=classpath
+com.android.tools.utp:android-device-provider-gradle-proto:30.2.0=classpath
+com.android.tools.utp:android-test-plugin-host-additional-test-output-proto:30.2.0=classpath
+com.android.tools.utp:android-test-plugin-host-coverage-proto:30.2.0=classpath
+com.android.tools.utp:android-test-plugin-host-retention-proto:30.2.0=classpath
+com.android.tools.utp:android-test-plugin-result-listener-gradle-proto:30.2.0=classpath
+com.android.tools:annotations:30.2.0=classpath
+com.android.tools:common:30.2.0=classpath
+com.android.tools:dvlib:30.2.0=classpath
+com.android.tools:repository:30.2.0=classpath
+com.android.tools:sdk-common:30.2.0=classpath
+com.android.tools:sdklib:30.2.0=classpath
+com.android:signflinger:7.2.0=classpath
+com.android:zipflinger:7.2.0=classpath
+com.fasterxml.jackson.core:jackson-annotations:2.11.1=classpath
+com.fasterxml.jackson.core:jackson-core:2.11.1=classpath
+com.fasterxml.jackson.core:jackson-databind:2.11.1=classpath
+com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.11.1=classpath
+com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.11.1=classpath
+com.fasterxml.jackson.module:jackson-module-kotlin:2.11.1=classpath
+com.fasterxml.woodstox:woodstox-core:6.2.1=classpath
+com.github.gundy:semver4j:0.16.4=classpath
+com.google.android:annotations:4.1.1.4=classpath
+com.google.api.grpc:proto-google-common-protos:1.12.0=classpath
+com.google.auto.value:auto-value-annotations:1.6.2=classpath
+com.google.code.findbugs:jsr305:3.0.2=classpath
+com.google.code.gson:gson:2.8.6=classpath
+com.google.crypto.tink:tink:1.3.0-rc2=classpath
+com.google.dagger:dagger:2.28.3=classpath
+com.google.errorprone:error_prone_annotations:2.3.4=classpath
+com.google.flatbuffers:flatbuffers-java:1.12.0=classpath
+com.google.guava:failureaccess:1.0.1=classpath
+com.google.guava:guava:30.1-jre=classpath
+com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=classpath
+com.google.j2objc:j2objc-annotations:1.3=classpath
+com.google.jimfs:jimfs:1.1=classpath
+com.google.protobuf:protobuf-java-util:3.10.0=classpath
+com.google.protobuf:protobuf-java:3.10.0=classpath
+com.google.testing.platform:core-proto:0.0.8-alpha07=classpath
+com.googlecode.json-simple:json-simple:1.1=classpath
+com.googlecode.juniversalchardet:juniversalchardet:1.0.3=classpath
+com.squareup:javapoet:1.10.0=classpath
+com.squareup:javawriter:2.5.0=classpath
+com.sun.activation:javax.activation:1.2.0=classpath
+com.sun.istack:istack-commons-runtime:3.0.8=classpath
+com.sun.xml.fastinfoset:FastInfoset:1.2.16=classpath
+commons-codec:commons-codec:1.11=classpath
+commons-io:commons-io:2.4=classpath
+commons-logging:commons-logging:1.2=classpath
+de.undercouch:gradle-download-task:4.1.1=classpath
+io.grpc:grpc-api:1.21.1=classpath
+io.grpc:grpc-context:1.21.1=classpath
+io.grpc:grpc-core:1.21.1=classpath
+io.grpc:grpc-netty:1.21.1=classpath
+io.grpc:grpc-protobuf-lite:1.21.1=classpath
+io.grpc:grpc-protobuf:1.21.1=classpath
+io.grpc:grpc-stub:1.21.1=classpath
+io.netty:netty-buffer:4.1.34.Final=classpath
+io.netty:netty-codec-http2:4.1.34.Final=classpath
+io.netty:netty-codec-http:4.1.34.Final=classpath
+io.netty:netty-codec-socks:4.1.34.Final=classpath
+io.netty:netty-codec:4.1.34.Final=classpath
+io.netty:netty-common:4.1.34.Final=classpath
+io.netty:netty-handler-proxy:4.1.34.Final=classpath
+io.netty:netty-handler:4.1.34.Final=classpath
+io.netty:netty-resolver:4.1.34.Final=classpath
+io.netty:netty-transport:4.1.34.Final=classpath
+io.opencensus:opencensus-api:0.21.0=classpath
+io.opencensus:opencensus-contrib-grpc-metrics:0.21.0=classpath
+it.unimi.dsi:fastutil:8.4.0=classpath
+jakarta.activation:jakarta.activation-api:1.2.1=classpath
+jakarta.xml.bind:jakarta.xml.bind-api:2.3.2=classpath
+javax.inject:javax.inject:1=classpath
+net.java.dev.jna:jna-platform:5.6.0=classpath
+net.java.dev.jna:jna:5.6.0=classpath
+net.sf.jopt-simple:jopt-simple:4.9=classpath
+net.sf.kxml:kxml2:2.3.0=classpath
+org.apache.commons:commons-compress:1.20=classpath
+org.apache.httpcomponents:httpclient:4.5.9=classpath
+org.apache.httpcomponents:httpcore:4.4.11=classpath
+org.apache.httpcomponents:httpmime:4.5.6=classpath
+org.bitbucket.b_c:jose4j:0.7.0=classpath
+org.bouncycastle:bcpkix-jdk15on:1.56=classpath
+org.bouncycastle:bcprov-jdk15on:1.56=classpath
+org.checkerframework:checker-qual:3.5.0=classpath
+org.codehaus.mojo:animal-sniffer-annotations:1.17=classpath
+org.codehaus.woodstox:stax2-api:4.2.1=classpath
+org.glassfish.jaxb:jaxb-runtime:2.3.2=classpath
+org.glassfish.jaxb:txw2:2.3.2=classpath
+org.jdom:jdom2:2.0.6=classpath
+org.jetbrains.dokka:dokka-core:1.4.32=classpath
+org.jetbrains.intellij.deps:trove4j:1.0.20181211=classpath
+org.jetbrains.kotlin:kotlin-android-extensions:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-annotation-processing-gradle:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-build-common:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-compiler-embeddable:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-compiler-runner:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-daemon-client:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-daemon-embeddable:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-gradle-plugin-model:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-klib-commonizer-api:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-native-utils:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-project-model:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-reflect:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-scripting-common:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-scripting-jvm:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-stdlib-common:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-stdlib:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-tooling-metadata:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-util-io:1.5.31=classpath
+org.jetbrains.kotlin:kotlin-util-klib:1.5.31=classpath
+org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.5.0=classpath
+org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0=classpath
+org.jetbrains:annotations:13.0=classpath
+org.jetbrains:markdown-jvm:0.2.1=classpath
+org.jetbrains:markdown:0.2.1=classpath
+org.json:json:20180813=classpath
+org.jsoup:jsoup:1.13.1=classpath
+org.jvnet.staxex:stax-ex:1.8.1=classpath
+org.ow2.asm:asm-analysis:9.1=classpath
+org.ow2.asm:asm-commons:9.1=classpath
+org.ow2.asm:asm-tree:9.1=classpath
+org.ow2.asm:asm-util:9.1=classpath
+org.ow2.asm:asm:9.1=classpath
+org.slf4j:slf4j-api:1.7.30=classpath
+org.tensorflow:tensorflow-lite-metadata:0.1.0-rc2=classpath
+xerces:xercesImpl:2.12.0=classpath
+xml-apis:xml-apis:1.4.01=classpath
+empty=
diff --git a/flutter/examples/platform_view/android/gradle.properties b/flutter/examples/platform_view/android/gradle.properties
new file mode 100644
index 0000000000000000000000000000000000000000..598d13fee446372f156ecc38527b54c7cdcc8e3b
--- /dev/null
+++ b/flutter/examples/platform_view/android/gradle.properties
@@ -0,0 +1,3 @@
+org.gradle.jvmargs=-Xmx4G
+android.useAndroidX=true
+android.enableJetifier=true
diff --git a/flutter/examples/platform_view/android/gradle/wrapper/gradle-wrapper.properties b/flutter/examples/platform_view/android/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000000000000000000000000000000000000..e1ca574ef017c1bc00556b96ea372e2c07948771
--- /dev/null
+++ b/flutter/examples/platform_view/android/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,5 @@
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip
diff --git a/flutter/examples/platform_view/android/project-app.lockfile b/flutter/examples/platform_view/android/project-app.lockfile
new file mode 100644
index 0000000000000000000000000000000000000000..607f89c82b3473c34b4fdedca4f5aeb69bd8d933
--- /dev/null
+++ b/flutter/examples/platform_view/android/project-app.lockfile
@@ -0,0 +1,138 @@
+# 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,releaseUnitTestRuntimeClasspath
+androidx.annotation:annotation-experimental:1.1.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.annotation:annotation:1.2.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.appcompat:appcompat-resources:1.1.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.appcompat:appcompat:1.1.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.arch.core:core-common:2.1.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.arch.core:core-runtime:2.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.asynclayoutinflater:asynclayoutinflater:1.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.cardview:cardview:1.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.collection:collection:1.1.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.coordinatorlayout:coordinatorlayout:1.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.core:core:1.6.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.cursoradapter:cursoradapter:1.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.customview:customview:1.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.documentfile:documentfile:1.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.drawerlayout:drawerlayout:1.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.fragment:fragment:1.1.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.interpolator:interpolator:1.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.legacy:legacy-support-core-ui:1.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.legacy:legacy-support-core-utils:1.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.lifecycle:lifecycle-common-java8:2.2.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.lifecycle:lifecycle-common:2.2.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.lifecycle:lifecycle-livedata-core:2.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.lifecycle:lifecycle-livedata:2.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.lifecycle:lifecycle-runtime:2.2.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.lifecycle:lifecycle-viewmodel:2.1.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.loader:loader:1.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.localbroadcastmanager:localbroadcastmanager:1.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.print:print:1.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.recyclerview:recyclerview:1.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.savedstate:savedstate:1.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.slidingpanelayout:slidingpanelayout:1.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.swiperefreshlayout:swiperefreshlayout:1.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.tracing:tracing:1.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.transition:transition:1.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.vectordrawable:vectordrawable-animated:1.1.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.vectordrawable:vectordrawable:1.1.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.versionedparcelable:versionedparcelable:1.1.1=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.viewpager:viewpager:1.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.window:window-java:1.0.0-beta04=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+androidx.window:window:1.0.0-beta04=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+com.android.tools.analytics-library:protos:27.1.3=lintClassPath
+com.android.tools.analytics-library:shared:27.1.3=lintClassPath
+com.android.tools.analytics-library:tracker:27.1.3=lintClassPath
+com.android.tools.build:aapt2-proto:4.1.0-alpha01-6193524=lintClassPath
+com.android.tools.build:aapt2:4.1.3-6503028=_internal_aapt2_binary
+com.android.tools.build:apksig:4.1.3=lintClassPath
+com.android.tools.build:apkzlib:4.1.3=lintClassPath
+com.android.tools.build:builder-model:4.1.3=lintClassPath
+com.android.tools.build:builder-test-api:4.1.3=lintClassPath
+com.android.tools.build:builder:4.1.3=lintClassPath
+com.android.tools.build:gradle-api:4.1.3=lintClassPath
+com.android.tools.build:manifest-merger:27.1.3=lintClassPath
+com.android.tools.ddms:ddmlib:27.1.3=lintClassPath
+com.android.tools.external.com-intellij:intellij-core:27.1.3=lintClassPath
+com.android.tools.external.com-intellij:kotlin-compiler:27.1.3=lintClassPath
+com.android.tools.external.org-jetbrains:uast:27.1.3=lintClassPath
+com.android.tools.layoutlib:layoutlib-api:27.1.3=lintClassPath
+com.android.tools.lint:lint-api:27.1.3=lintClassPath
+com.android.tools.lint:lint-checks:27.1.3=lintClassPath
+com.android.tools.lint:lint-gradle-api:27.1.3=lintClassPath
+com.android.tools.lint:lint-gradle:27.1.3=lintClassPath
+com.android.tools.lint:lint-model:27.1.3=lintClassPath
+com.android.tools.lint:lint:27.1.3=lintClassPath
+com.android.tools:annotations:27.1.3=lintClassPath
+com.android.tools:common:27.1.3=lintClassPath
+com.android.tools:dvlib:27.1.3=lintClassPath
+com.android.tools:repository:27.1.3=lintClassPath
+com.android.tools:sdk-common:27.1.3=lintClassPath
+com.android.tools:sdklib:27.1.3=lintClassPath
+com.android:signflinger:4.1.3=lintClassPath
+com.android:zipflinger:4.1.3=lintClassPath
+com.google.android.material:material:1.0.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+com.google.code.findbugs:jsr305:3.0.2=lintClassPath
+com.google.code.gson:gson:2.8.5=lintClassPath
+com.google.errorprone:error_prone_annotations:2.3.2=lintClassPath
+com.google.guava:failureaccess:1.0.1=lintClassPath
+com.google.guava:guava:28.1-jre=lintClassPath
+com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=lintClassPath
+com.google.j2objc:j2objc-annotations:1.3=lintClassPath
+com.google.jimfs:jimfs:1.1=lintClassPath
+com.google.protobuf:protobuf-java:3.10.0=lintClassPath
+com.googlecode.json-simple:json-simple:1.1=lintClassPath
+com.squareup:javawriter:2.5.0=lintClassPath
+com.sun.activation:javax.activation:1.2.0=lintClassPath
+com.sun.istack:istack-commons-runtime:3.0.7=lintClassPath
+com.sun.xml.fastinfoset:FastInfoset:1.2.15=lintClassPath
+commons-codec:commons-codec:1.10=lintClassPath
+commons-logging:commons-logging:1.2=lintClassPath
+it.unimi.dsi:fastutil:7.2.0=lintClassPath
+javax.activation:javax.activation-api:1.2.0=lintClassPath
+javax.inject:javax.inject:1=lintClassPath
+javax.xml.bind:jaxb-api:2.3.1=lintClassPath
+net.sf.jopt-simple:jopt-simple:4.9=lintClassPath
+net.sf.kxml:kxml2:2.3.0=lintClassPath
+org.apache.commons:commons-compress:1.12=lintClassPath
+org.apache.httpcomponents:httpclient:4.5.6=lintClassPath
+org.apache.httpcomponents:httpcore:4.4.10=lintClassPath
+org.apache.httpcomponents:httpmime:4.5.6=lintClassPath
+org.bouncycastle:bcpkix-jdk15on:1.56=lintClassPath
+org.bouncycastle:bcprov-jdk15on:1.56=lintClassPath
+org.checkerframework:checker-qual:2.8.1=lintClassPath
+org.codehaus.groovy:groovy-all:2.4.15=lintClassPath
+org.codehaus.mojo:animal-sniffer-annotations:1.18=lintClassPath
+org.glassfish.jaxb:jaxb-runtime:2.3.1=lintClassPath
+org.glassfish.jaxb:txw2:2.3.1=lintClassPath
+org.jacoco:org.jacoco.agent:0.8.7=androidJacocoAnt
+org.jacoco:org.jacoco.ant:0.8.7=androidJacocoAnt
+org.jacoco:org.jacoco.core:0.8.7=androidJacocoAnt
+org.jacoco:org.jacoco.report:0.8.7=androidJacocoAnt
+org.jetbrains.kotlin:kotlin-reflect:1.3.72=lintClassPath
+org.jetbrains.kotlin:kotlin-stdlib-common:1.3.72=lintClassPath
+org.jetbrains.kotlin:kotlin-stdlib-common:1.5.31=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.72=lintClassPath
+org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.5.30=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.72=lintClassPath
+org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.30=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+org.jetbrains.kotlin:kotlin-stdlib:1.3.72=lintClassPath
+org.jetbrains.kotlin:kotlin-stdlib:1.5.31=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.5.2=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+org.jetbrains.trove4j:trove4j:20160824=lintClassPath
+org.jetbrains:annotations:13.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,lintClassPath,profileCompileClasspath,profileRuntimeClasspath,profileUnitTestCompileClasspath,profileUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
+org.jvnet.staxex:stax-ex:1.8=lintClassPath
+org.ow2.asm:asm-analysis:7.0=lintClassPath
+org.ow2.asm:asm-analysis:9.1=androidJacocoAnt
+org.ow2.asm:asm-commons:7.0=lintClassPath
+org.ow2.asm:asm-commons:9.1=androidJacocoAnt
+org.ow2.asm:asm-tree:7.0=lintClassPath
+org.ow2.asm:asm-tree:9.1=androidJacocoAnt
+org.ow2.asm:asm-util:7.0=lintClassPath
+org.ow2.asm:asm:7.0=lintClassPath
+org.ow2.asm:asm:9.1=androidJacocoAnt
+empty=androidApis,androidJdkImage,androidTestUtil,compile,coreLibraryDesugaring,debugAndroidTestAnnotationProcessorClasspath,debugAndroidTestRuntimeClasspath,debugAnnotationProcessorClasspath,debugReverseMetadataValues,debugUnitTestAnnotationProcessorClasspath,debugWearBundling,lintChecks,lintPublish,profileAnnotationProcessorClasspath,profileReverseMetadataValues,profileUnitTestAnnotationProcessorClasspath,profileWearBundling,releaseAnnotationProcessorClasspath,releaseReverseMetadataValues,releaseUnitTestAnnotationProcessorClasspath,releaseWearBundling,testCompile
diff --git a/flutter/examples/platform_view/android/settings.gradle b/flutter/examples/platform_view/android/settings.gradle
new file mode 100644
index 0000000000000000000000000000000000000000..03ae72d135c01f849e6812b36575b62b14fee791
--- /dev/null
+++ b/flutter/examples/platform_view/android/settings.gradle
@@ -0,0 +1,21 @@
+// 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"
diff --git a/flutter/examples/platform_view/assets/flutter-mark-square-64.png b/flutter/examples/platform_view/assets/flutter-mark-square-64.png
new file mode 100644
index 0000000000000000000000000000000000000000..56f22d5bd8f4a90724fcd9aca3a0ec85932c4a48
Binary files /dev/null and b/flutter/examples/platform_view/assets/flutter-mark-square-64.png differ
diff --git a/flutter/examples/platform_view/full_platform_view.iml b/flutter/examples/platform_view/full_platform_view.iml
new file mode 100644
index 0000000000000000000000000000000000000000..1d83ed3abc9085f991ca3f8f864f38df5577a8a6
--- /dev/null
+++ b/flutter/examples/platform_view/full_platform_view.iml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/flutter/examples/platform_view/ios/Flutter/AppFrameworkInfo.plist b/flutter/examples/platform_view/ios/Flutter/AppFrameworkInfo.plist
new file mode 100644
index 0000000000000000000000000000000000000000..8c6e56146e23c84aa60ea78f20bc3a7b3d8ef259
--- /dev/null
+++ b/flutter/examples/platform_view/ios/Flutter/AppFrameworkInfo.plist
@@ -0,0 +1,26 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ $(DEVELOPMENT_LANGUAGE)
+ CFBundleExecutable
+ App
+ CFBundleIdentifier
+ io.flutter.flutter.app
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ App
+ CFBundlePackageType
+ FMWK
+ CFBundleShortVersionString
+ 1.0
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ 1.0
+ MinimumOSVersion
+ 12.0
+
+
diff --git a/flutter/examples/platform_view/ios/Flutter/Debug.xcconfig b/flutter/examples/platform_view/ios/Flutter/Debug.xcconfig
new file mode 100644
index 0000000000000000000000000000000000000000..592ceee85b89bd111b779db6116b130509ab6d4b
--- /dev/null
+++ b/flutter/examples/platform_view/ios/Flutter/Debug.xcconfig
@@ -0,0 +1 @@
+#include "Generated.xcconfig"
diff --git a/flutter/examples/platform_view/ios/Flutter/Release.xcconfig b/flutter/examples/platform_view/ios/Flutter/Release.xcconfig
new file mode 100644
index 0000000000000000000000000000000000000000..592ceee85b89bd111b779db6116b130509ab6d4b
--- /dev/null
+++ b/flutter/examples/platform_view/ios/Flutter/Release.xcconfig
@@ -0,0 +1 @@
+#include "Generated.xcconfig"
diff --git a/flutter/examples/platform_view/ios/Podfile.lock b/flutter/examples/platform_view/ios/Podfile.lock
new file mode 100644
index 0000000000000000000000000000000000000000..3c4f716588627c5e7bb68723e1efae5b2873d8b8
--- /dev/null
+++ b/flutter/examples/platform_view/ios/Podfile.lock
@@ -0,0 +1,16 @@
+PODS:
+ - Flutter (1.0.0)
+
+DEPENDENCIES:
+ - Flutter (from `Flutter`)
+
+EXTERNAL SOURCES:
+ Flutter:
+ :path: Flutter
+
+SPEC CHECKSUMS:
+ Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
+
+PODFILE CHECKSUM: 3dbe063e9c90a5d7c9e4e76e70a821b9e2c1d271
+
+COCOAPODS: 1.8.3
diff --git a/flutter/examples/platform_view/ios/Runner.xcodeproj/project.pbxproj b/flutter/examples/platform_view/ios/Runner.xcodeproj/project.pbxproj
new file mode 100644
index 0000000000000000000000000000000000000000..083c9c730ac496e3e3fcc388cbfa63649dd8f795
--- /dev/null
+++ b/flutter/examples/platform_view/ios/Runner.xcodeproj/project.pbxproj
@@ -0,0 +1,476 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 54;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
+ 2DAF064C1ED38C3E00716BEE /* PlatformViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DAF064B1ED38C3E00716BEE /* PlatformViewController.m */; };
+ 2DAF064E1ED4224F00716BEE /* ic_add.png in Resources */ = {isa = PBXBuildFile; fileRef = 2DAF064D1ED4224F00716BEE /* ic_add.png */; };
+ 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
+ 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
+ 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
+ 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
+ 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
+ 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+ 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 2147483647;
+ dstPath = "";
+ dstSubfolderSpec = 10;
+ files = (
+ );
+ name = "Embed Frameworks";
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
+ 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
+ 2DAF064A1ED38C2300716BEE /* PlatformViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PlatformViewController.h; sourceTree = ""; };
+ 2DAF064B1ED38C3E00716BEE /* PlatformViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PlatformViewController.m; sourceTree = ""; };
+ 2DAF064D1ED4224F00716BEE /* ic_add.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ic_add.png; sourceTree = ""; };
+ 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
+ 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
+ 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
+ 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
+ 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
+ 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
+ 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
+ 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
+ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
+ 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
+ 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 97C146EB1CF9000F007C117D /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 9740EEB11CF90186004384FC /* Flutter */ = {
+ isa = PBXGroup;
+ children = (
+ 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
+ 9740EEB21CF90195004384FC /* Debug.xcconfig */,
+ 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
+ 9740EEB31CF90195004384FC /* Generated.xcconfig */,
+ );
+ name = Flutter;
+ sourceTree = "";
+ };
+ 97C146E51CF9000F007C117D = {
+ isa = PBXGroup;
+ children = (
+ 9740EEB11CF90186004384FC /* Flutter */,
+ 97C146F01CF9000F007C117D /* Runner */,
+ 97C146EF1CF9000F007C117D /* Products */,
+ );
+ sourceTree = "";
+ };
+ 97C146EF1CF9000F007C117D /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 97C146EE1CF9000F007C117D /* Runner.app */,
+ );
+ name = Products;
+ sourceTree = "";
+ };
+ 97C146F01CF9000F007C117D /* Runner */ = {
+ isa = PBXGroup;
+ children = (
+ 2DAF064D1ED4224F00716BEE /* ic_add.png */,
+ 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */,
+ 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */,
+ 97C146FA1CF9000F007C117D /* Main.storyboard */,
+ 97C146FD1CF9000F007C117D /* Assets.xcassets */,
+ 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
+ 97C147021CF9000F007C117D /* Info.plist */,
+ 97C146F11CF9000F007C117D /* Supporting Files */,
+ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
+ 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
+ 2DAF064A1ED38C2300716BEE /* PlatformViewController.h */,
+ 2DAF064B1ED38C3E00716BEE /* PlatformViewController.m */,
+ );
+ path = Runner;
+ sourceTree = "";
+ };
+ 97C146F11CF9000F007C117D /* Supporting Files */ = {
+ isa = PBXGroup;
+ children = (
+ 97C146F21CF9000F007C117D /* main.m */,
+ );
+ name = "Supporting Files";
+ sourceTree = "";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 97C146ED1CF9000F007C117D /* Runner */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
+ buildPhases = (
+ 9740EEB61CF901F6004384FC /* Run Script */,
+ 97C146EA1CF9000F007C117D /* Sources */,
+ 97C146EB1CF9000F007C117D /* Frameworks */,
+ 97C146EC1CF9000F007C117D /* Resources */,
+ 9705A1C41CF9048500538489 /* Embed Frameworks */,
+ 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = Runner;
+ productName = Runner;
+ productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 97C146E61CF9000F007C117D /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 1510;
+ ORGANIZATIONNAME = "The Flutter Authors";
+ TargetAttributes = {
+ 97C146ED1CF9000F007C117D = {
+ CreatedOnToolsVersion = 7.3.1;
+ };
+ };
+ };
+ buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
+ compatibilityVersion = "Xcode 3.2";
+ developmentRegion = en;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ Base,
+ );
+ mainGroup = 97C146E51CF9000F007C117D;
+ productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 97C146ED1CF9000F007C117D /* Runner */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 97C146EC1CF9000F007C117D /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 2DAF064E1ED4224F00716BEE /* ic_add.png in Resources */,
+ 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
+ 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
+ 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
+ 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+ 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
+ isa = PBXShellScriptBuildPhase;
+ alwaysOutOfDate = 1;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
+ );
+ name = "Thin Binary";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
+ };
+ 9740EEB61CF901F6004384FC /* Run Script */ = {
+ isa = PBXShellScriptBuildPhase;
+ alwaysOutOfDate = 1;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ name = "Run Script";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
+ };
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 97C146EA1CF9000F007C117D /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */,
+ 97C146F31CF9000F007C117D /* main.m in Sources */,
+ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
+ 2DAF064C1ED38C3E00716BEE /* PlatformViewController.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+ 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 97C146FB1CF9000F007C117D /* Base */,
+ );
+ name = Main.storyboard;
+ sourceTree = "";
+ };
+ 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 97C147001CF9000F007C117D /* Base */,
+ );
+ name = LaunchScreen.storyboard;
+ sourceTree = "";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ 247F125D21828DC300C50710 /* Profile */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 12.0;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ SDKROOT = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Profile;
+ };
+ 247F125E21828DC300C50710 /* Profile */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ ENABLE_BITCODE = NO;
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+ PRODUCT_BUNDLE_IDENTIFIER = io.flutter.examples.fullPlatformView;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Profile;
+ };
+ 97C147031CF9000F007C117D /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ ENABLE_TESTABILITY = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 12.0;
+ MTL_ENABLE_DEBUG_INFO = YES;
+ ONLY_ACTIVE_ARCH = YES;
+ SDKROOT = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ };
+ name = Debug;
+ };
+ 97C147041CF9000F007C117D /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 12.0;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ SDKROOT = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Release;
+ };
+ 97C147061CF9000F007C117D /* Debug */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ ENABLE_BITCODE = NO;
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+ PRODUCT_BUNDLE_IDENTIFIER = io.flutter.examples.fullPlatformView;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Debug;
+ };
+ 97C147071CF9000F007C117D /* Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ ENABLE_BITCODE = NO;
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+ PRODUCT_BUNDLE_IDENTIFIER = io.flutter.examples.fullPlatformView;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 97C147031CF9000F007C117D /* Debug */,
+ 97C147041CF9000F007C117D /* Release */,
+ 247F125D21828DC300C50710 /* Profile */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 97C147061CF9000F007C117D /* Debug */,
+ 97C147071CF9000F007C117D /* Release */,
+ 247F125E21828DC300C50710 /* Profile */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 97C146E61CF9000F007C117D /* Project object */;
+}
diff --git a/flutter/examples/platform_view/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/flutter/examples/platform_view/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000000000000000000000000000000000000..919434a6254f0e9651f402737811be6634a03e9c
--- /dev/null
+++ b/flutter/examples/platform_view/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+
+
+
+
+
diff --git a/flutter/examples/platform_view/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/flutter/examples/platform_view/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 0000000000000000000000000000000000000000..18d981003d68d0546c4804ac2ff47dd97c6e7921
--- /dev/null
+++ b/flutter/examples/platform_view/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/flutter/examples/platform_view/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/flutter/examples/platform_view/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
new file mode 100644
index 0000000000000000000000000000000000000000..e67b2808af02f9ec16f2d72b7961aefdf844afa5
--- /dev/null
+++ b/flutter/examples/platform_view/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
@@ -0,0 +1,91 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/flutter/examples/platform_view/ios/Runner.xcworkspace/contents.xcworkspacedata b/flutter/examples/platform_view/ios/Runner.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000000000000000000000000000000000000..1d526a16ed0f1cd0c2409d848bf489b93fefa3b2
--- /dev/null
+++ b/flutter/examples/platform_view/ios/Runner.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+
+
+
+
+
diff --git a/flutter/examples/platform_view/ios/Runner/AppDelegate.h b/flutter/examples/platform_view/ios/Runner/AppDelegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..7b21cde6825b7e6f1d26d1b3f61a7e23b5b2468f
--- /dev/null
+++ b/flutter/examples/platform_view/ios/Runner/AppDelegate.h
@@ -0,0 +1,10 @@
+// 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
+#import
+#import "PlatformViewController.h"
+
+@interface AppDelegate : FlutterAppDelegate
+@end
diff --git a/flutter/examples/platform_view/ios/Runner/AppDelegate.m b/flutter/examples/platform_view/ios/Runner/AppDelegate.m
new file mode 100644
index 0000000000000000000000000000000000000000..26ec2ed56645332ce07c9abef7c59ccb7b5352e9
--- /dev/null
+++ b/flutter/examples/platform_view/ios/Runner/AppDelegate.m
@@ -0,0 +1,43 @@
+// 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 "AppDelegate.h"
+#import "GeneratedPluginRegistrant.h"
+#import "PlatformViewController.h"
+
+@implementation AppDelegate {
+ FlutterResult _flutterResult;
+}
+
+- (BOOL)application:(UIApplication *)application
+didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
+ [GeneratedPluginRegistrant registerWithRegistry:self];
+ FlutterViewController* controller =
+ (FlutterViewController*)self.window.rootViewController;
+ FlutterMethodChannel* channel =
+ [FlutterMethodChannel methodChannelWithName:@"samples.flutter.io/platform_view"
+ binaryMessenger:controller];
+ [channel setMethodCallHandler:^(FlutterMethodCall* call, FlutterResult result) {
+ if ([@"switchView" isEqualToString:call.method]) {
+ _flutterResult = result;
+ PlatformViewController* platformViewController =
+ [controller.storyboard instantiateViewControllerWithIdentifier:@"PlatformView"];
+ platformViewController.counter = ((NSNumber*)call.arguments).intValue;
+ platformViewController.delegate = self;
+ UINavigationController* navigationController =
+ [[UINavigationController alloc] initWithRootViewController:platformViewController];
+ navigationController.navigationBar.topItem.title = @"Platform View";
+ [controller presentViewController:navigationController animated:NO completion:nil];
+ } else {
+ result(FlutterMethodNotImplemented);
+ }
+ }];
+ return [super application:application didFinishLaunchingWithOptions:launchOptions];
+}
+
+- (void)didUpdateCounter:(int)counter {
+ _flutterResult([NSNumber numberWithInt:counter]);
+}
+
+@end
diff --git a/flutter/examples/platform_view/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/flutter/examples/platform_view/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
new file mode 100644
index 0000000000000000000000000000000000000000..d22f10b2ab630561596b343e0bd6eb2a0fe90df4
--- /dev/null
+++ b/flutter/examples/platform_view/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
@@ -0,0 +1,116 @@
+{
+ "images" : [
+ {
+ "size" : "20x20",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-20x20@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "20x20",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-20x20@3x.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-29x29@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-29x29@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-29x29@3x.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-40x40@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-40x40@3x.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "60x60",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-60x60@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "60x60",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-60x60@3x.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "20x20",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-20x20@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "20x20",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-20x20@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-29x29@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-29x29@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-40x40@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-40x40@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "76x76",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-76x76@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "76x76",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-76x76@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "83.5x83.5",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-83.5x83.5@2x.png",
+ "scale" : "2x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
diff --git a/flutter/examples/platform_view/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/flutter/examples/platform_view/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
new file mode 100644
index 0000000000000000000000000000000000000000..28c6bf03016f6c994b70f38d1b7346e5831b531f
Binary files /dev/null and b/flutter/examples/platform_view/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ
diff --git a/flutter/examples/platform_view/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/flutter/examples/platform_view/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
new file mode 100644
index 0000000000000000000000000000000000000000..2ccbfd967d9697cd4b83225558af2911e9571c9b
Binary files /dev/null and b/flutter/examples/platform_view/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ
diff --git a/flutter/examples/platform_view/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/flutter/examples/platform_view/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
new file mode 100644
index 0000000000000000000000000000000000000000..f091b6b0bca859a3f474b03065bef75ba58a9e4c
Binary files /dev/null and b/flutter/examples/platform_view/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ
diff --git a/flutter/examples/platform_view/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/flutter/examples/platform_view/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
new file mode 100644
index 0000000000000000000000000000000000000000..4cde12118dda48d71e01fcb589a74d069c5d7cb5
Binary files /dev/null and b/flutter/examples/platform_view/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ
diff --git a/flutter/examples/platform_view/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/flutter/examples/platform_view/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
new file mode 100644
index 0000000000000000000000000000000000000000..d0ef06e7edb86cdfe0d15b4b0d98334a86163658
Binary files /dev/null and b/flutter/examples/platform_view/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ
diff --git a/flutter/examples/platform_view/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/flutter/examples/platform_view/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
new file mode 100644
index 0000000000000000000000000000000000000000..dcdc2306c28505ebc0b6c3a359c4d252bf626b9f
Binary files /dev/null and b/flutter/examples/platform_view/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ
diff --git a/flutter/examples/platform_view/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/flutter/examples/platform_view/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
new file mode 100644
index 0000000000000000000000000000000000000000..2ccbfd967d9697cd4b83225558af2911e9571c9b
Binary files /dev/null and b/flutter/examples/platform_view/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ
diff --git a/flutter/examples/platform_view/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/flutter/examples/platform_view/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
new file mode 100644
index 0000000000000000000000000000000000000000..c8f9ed8f5cee1c98386d13b17e89f719e83555b2
Binary files /dev/null and b/flutter/examples/platform_view/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ
diff --git a/flutter/examples/platform_view/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/flutter/examples/platform_view/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
new file mode 100644
index 0000000000000000000000000000000000000000..a6d6b8609df07bf62e5100a53a01510388bd2b22
Binary files /dev/null and b/flutter/examples/platform_view/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ
diff --git a/flutter/examples/platform_view/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/flutter/examples/platform_view/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
new file mode 100644
index 0000000000000000000000000000000000000000..a6d6b8609df07bf62e5100a53a01510388bd2b22
Binary files /dev/null and b/flutter/examples/platform_view/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ
diff --git a/flutter/examples/platform_view/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/flutter/examples/platform_view/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
new file mode 100644
index 0000000000000000000000000000000000000000..75b2d164a5a98e212cca15ea7bf2ab5de5108680
Binary files /dev/null and b/flutter/examples/platform_view/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ
diff --git a/flutter/examples/platform_view/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/flutter/examples/platform_view/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
new file mode 100644
index 0000000000000000000000000000000000000000..c4df70d39da7941ef3f6dcb7f06a192d8dcb308d
Binary files /dev/null and b/flutter/examples/platform_view/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ
diff --git a/flutter/examples/platform_view/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/flutter/examples/platform_view/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
new file mode 100644
index 0000000000000000000000000000000000000000..6a84f41e14e27f4b11f16f9ee39279ac98f8d5ac
Binary files /dev/null and b/flutter/examples/platform_view/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ
diff --git a/flutter/examples/platform_view/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/flutter/examples/platform_view/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
new file mode 100644
index 0000000000000000000000000000000000000000..d0e1f58536026aebc4f1f70e481f6993c9ff088d
Binary files /dev/null and b/flutter/examples/platform_view/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ
diff --git a/flutter/examples/platform_view/ios/Runner/Base.lproj/LaunchScreen.storyboard b/flutter/examples/platform_view/ios/Runner/Base.lproj/LaunchScreen.storyboard
new file mode 100644
index 0000000000000000000000000000000000000000..ebf48f6039745ccdb57ad6237321024eb6cdf9af
--- /dev/null
+++ b/flutter/examples/platform_view/ios/Runner/Base.lproj/LaunchScreen.storyboard
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/flutter/examples/platform_view/ios/Runner/Base.lproj/Main.storyboard b/flutter/examples/platform_view/ios/Runner/Base.lproj/Main.storyboard
new file mode 100644
index 0000000000000000000000000000000000000000..00f884a6d17367123594f297e9c05379a8cff8ac
--- /dev/null
+++ b/flutter/examples/platform_view/ios/Runner/Base.lproj/Main.storyboard
@@ -0,0 +1,142 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/flutter/examples/platform_view/ios/Runner/Info.plist b/flutter/examples/platform_view/ios/Runner/Info.plist
new file mode 100644
index 0000000000000000000000000000000000000000..ca51ebe361e8685ff658795a50ef46cb07a487aa
--- /dev/null
+++ b/flutter/examples/platform_view/ios/Runner/Info.plist
@@ -0,0 +1,47 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ $(DEVELOPMENT_LANGUAGE)
+ CFBundleExecutable
+ $(EXECUTABLE_NAME)
+ CFBundleIdentifier
+ $(PRODUCT_BUNDLE_IDENTIFIER)
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ platform_view
+ CFBundlePackageType
+ APPL
+ CFBundleShortVersionString
+ 1.0
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ 1
+ LSRequiresIPhoneOS
+
+ UILaunchStoryboardName
+ LaunchScreen
+ UIMainStoryboardFile
+ Main
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UISupportedInterfaceOrientations~ipad
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationPortraitUpsideDown
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ CADisableMinimumFrameDurationOnPhone
+
+ UIApplicationSupportsIndirectInputEvents
+
+
+
diff --git a/flutter/examples/platform_view/ios/Runner/PlatformViewController.h b/flutter/examples/platform_view/ios/Runner/PlatformViewController.h
new file mode 100644
index 0000000000000000000000000000000000000000..8fea8243c3df94b46cbdb743b3ee6f21892e1965
--- /dev/null
+++ b/flutter/examples/platform_view/ios/Runner/PlatformViewController.h
@@ -0,0 +1,15 @@
+// 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
+
+@protocol PlatformViewControllerDelegate
+- (void)didUpdateCounter:(int)counter;
+@end
+
+
+@interface PlatformViewController : UIViewController
+@property (strong, nonatomic) id delegate;
+@property int counter;
+@end
diff --git a/flutter/examples/platform_view/ios/Runner/PlatformViewController.m b/flutter/examples/platform_view/ios/Runner/PlatformViewController.m
new file mode 100644
index 0000000000000000000000000000000000000000..397dd3c75642da85502c41c11ae67b2ce5819274
--- /dev/null
+++ b/flutter/examples/platform_view/ios/Runner/PlatformViewController.m
@@ -0,0 +1,36 @@
+// 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
+#import "PlatformViewController.h"
+
+@interface PlatformViewController ()
+@property (weak, nonatomic) IBOutlet UILabel *incrementLabel;
+@end
+
+@implementation PlatformViewController
+
+- (void)viewDidLoad {
+ [super viewDidLoad];
+ [self setIncrementLabelText];
+}
+
+- (IBAction)handleIncrement:(id)sender {
+ self.counter++;
+ [self setIncrementLabelText];
+}
+
+- (IBAction)switchToFlutterView:(id)sender {
+ [self.delegate didUpdateCounter:self.counter];
+ [self dismissViewControllerAnimated:NO completion:nil];
+}
+
+- (void)setIncrementLabelText {
+ NSString* text = [NSString stringWithFormat:@"Button tapped %d %@.",
+ self.counter,
+ (self.counter == 1) ? @"time" : @"times"];
+ self.incrementLabel.text = text;
+}
+
+@end
diff --git a/flutter/examples/platform_view/ios/Runner/ic_add.png b/flutter/examples/platform_view/ios/Runner/ic_add.png
new file mode 100644
index 0000000000000000000000000000000000000000..23bf119211e02b139ad2e0961bc71662ce1caf1e
Binary files /dev/null and b/flutter/examples/platform_view/ios/Runner/ic_add.png differ
diff --git a/flutter/examples/platform_view/ios/Runner/main.m b/flutter/examples/platform_view/ios/Runner/main.m
new file mode 100644
index 0000000000000000000000000000000000000000..86070722733949a969321315b3d1ad7ed69711bc
--- /dev/null
+++ b/flutter/examples/platform_view/ios/Runner/main.m
@@ -0,0 +1,14 @@
+// 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
+#import
+#import "AppDelegate.h"
+
+int main(int argc, char * argv[]) {
+ @autoreleasepool {
+ return UIApplicationMain(argc, argv, nil,
+ NSStringFromClass([AppDelegate class]));
+ }
+}
diff --git a/flutter/examples/platform_view/ios/RunnerTests/PlatformViewControllerTests.m b/flutter/examples/platform_view/ios/RunnerTests/PlatformViewControllerTests.m
new file mode 100644
index 0000000000000000000000000000000000000000..4ce3beb49825822db660575f0b424234bed97317
--- /dev/null
+++ b/flutter/examples/platform_view/ios/RunnerTests/PlatformViewControllerTests.m
@@ -0,0 +1,36 @@
+// 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
+#import
+
+#import "PlatformViewController.h"
+
+@interface PlatformViewControllerTests : XCTestCase
+@property (nonatomic, strong) XCUIApplication *app;
+@end
+
+@implementation PlatformViewControllerTests
+
+- (void)setUp {
+ // Put setup code here.
+ // This method is called before the invocation of each test method in the class.
+}
+
+- (void)tearDown {
+ // Put teardown code here.
+ // This method is called after the invocation of each test method in the class.
+}
+
+- (void)testViewControllerIconLoaded {
+ UIStoryboard* storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
+ PlatformViewController* controller = [storyboard instantiateViewControllerWithIdentifier:@"PlatformView"];
+ XCTAssertNotNil(controller);
+ [controller loadViewIfNeeded];
+
+ UIImage* incrementButtonIcon = [controller.incrementButton imageForState:UIControlStateNormal];
+ XCTAssertNotNil(incrementButtonIcon);
+}
+
+@end
diff --git a/flutter/examples/platform_view/lib/main.dart b/flutter/examples/platform_view/lib/main.dart
new file mode 100644
index 0000000000000000000000000000000000000000..5efefe72ffd4a3cd4be9aa2d0b73d92d28293f7c
--- /dev/null
+++ b/flutter/examples/platform_view/lib/main.dart
@@ -0,0 +1,117 @@
+// 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 'dart:async';
+import 'package:flutter/foundation.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter/services.dart';
+
+void main() {
+ runApp(const PlatformView());
+}
+
+class PlatformView extends StatelessWidget {
+ const PlatformView({super.key});
+
+ @override
+ Widget build(BuildContext context) {
+ return MaterialApp(
+ title: 'Platform View',
+ theme: ThemeData(
+ primarySwatch: Colors.grey,
+ ),
+ home: const MyHomePage(title: 'Platform View'),
+ );
+ }
+}
+
+class MyHomePage extends StatefulWidget {
+ const MyHomePage({super.key, required this.title});
+
+ final String title;
+
+ @override
+ State createState() => _MyHomePageState();
+}
+
+class _MyHomePageState extends State {
+ static const MethodChannel _methodChannel =
+ MethodChannel('samples.flutter.io/platform_view');
+
+ int _counter = 0;
+
+ void _incrementCounter() {
+ setState(() {
+ _counter++;
+ });
+ }
+
+ static Widget get _buttonText {
+ return switch (defaultTargetPlatform) {
+ TargetPlatform.android => const Text('Continue in Android view'),
+ TargetPlatform.iOS => const Text('Continue in iOS view'),
+ TargetPlatform.windows => const Text('Continue in Windows view'),
+ TargetPlatform.macOS => const Text('Continue in macOS view'),
+ TargetPlatform.linux => const Text('Continue in Linux view'),
+ TargetPlatform.fuchsia => throw UnimplementedError('Platform not yet implemented'),
+ };
+ }
+
+ Future _launchPlatformCount() async {
+ final int? platformCounter =
+ await _methodChannel.invokeMethod('switchView', _counter);
+ setState(() {
+ _counter = platformCounter!;
+ });
+ }
+
+ @override
+ Widget build(BuildContext context) => Scaffold(
+ appBar: AppBar(
+ title: Text(widget.title),
+ ),
+ body: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Expanded(
+ child: Center(
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Text(
+ 'Button tapped $_counter time${ _counter == 1 ? '' : 's' }.',
+ style: const TextStyle(fontSize: 17.0),
+ ),
+ Padding(
+ padding: const EdgeInsets.all(18.0),
+ child: ElevatedButton(
+ onPressed: _launchPlatformCount,
+ child: _buttonText,
+ ),
+ ),
+ ],
+ ),
+ ),
+ ),
+ Container(
+ padding: const EdgeInsets.only(bottom: 15.0, left: 5.0),
+ child: Row(
+ children: [
+ Image.asset('assets/flutter-mark-square-64.png', scale: 1.5),
+ const Text(
+ 'Flutter',
+ style: TextStyle(fontSize: 30.0),
+ ),
+ ],
+ ),
+ ),
+ ],
+ ),
+ floatingActionButton: FloatingActionButton(
+ onPressed: _incrementCounter,
+ tooltip: 'Increment',
+ child: const Icon(Icons.add),
+ ),
+ );
+}
diff --git a/flutter/examples/platform_view/linux/CMakeLists.txt b/flutter/examples/platform_view/linux/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..67f289712447faeb9d486c3f3b5ecc1fa05e708a
--- /dev/null
+++ b/flutter/examples/platform_view/linux/CMakeLists.txt
@@ -0,0 +1,140 @@
+# Project-level configuration.
+cmake_minimum_required(VERSION 3.10)
+project(runner LANGUAGES CXX)
+set(CMAKE_CXX_STANDARD 17)
+
+# The name of the executable created for the application. Change this to change
+# the on-disk name of your application.
+set(BINARY_NAME "platform_view")
+# The unique GTK application identifier for this application. See:
+# https://wiki.gnome.org/HowDoI/ChooseApplicationID
+set(APPLICATION_ID "io.flutter.examples.platform_view")
+
+# 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 "$<$>:-O3>")
+ target_compile_definitions(${TARGET} PRIVATE "$<$>: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()
diff --git a/flutter/examples/platform_view/linux/flutter/CMakeLists.txt b/flutter/examples/platform_view/linux/flutter/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..d5bd01648a96d50136b2a97c8bb9aa5b711f6c39
--- /dev/null
+++ b/flutter/examples/platform_view/linux/flutter/CMakeLists.txt
@@ -0,0 +1,88 @@
+# This file controls Flutter-level build steps. It should not be edited.
+cmake_minimum_required(VERSION 3.10)
+
+set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral")
+
+# Configuration provided via flutter tool.
+include(${EPHEMERAL_DIR}/generated_config.cmake)
+
+# TODO: Move the rest of this into files in ephemeral. See
+# https://github.com/flutter/flutter/issues/57146.
+
+# Serves the same purpose as list(TRANSFORM ... PREPEND ...),
+# which isn't available in 3.10.
+function(list_prepend LIST_NAME PREFIX)
+ set(NEW_LIST "")
+ foreach(element ${${LIST_NAME}})
+ list(APPEND NEW_LIST "${PREFIX}${element}")
+ endforeach(element)
+ set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE)
+endfunction()
+
+# === Flutter Library ===
+# System-level dependencies.
+find_package(PkgConfig REQUIRED)
+pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
+pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0)
+pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0)
+
+set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so")
+
+# Published to parent scope for install step.
+set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE)
+set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE)
+set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE)
+set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE)
+
+list(APPEND FLUTTER_LIBRARY_HEADERS
+ "fl_basic_message_channel.h"
+ "fl_binary_codec.h"
+ "fl_binary_messenger.h"
+ "fl_dart_project.h"
+ "fl_engine.h"
+ "fl_json_message_codec.h"
+ "fl_json_method_codec.h"
+ "fl_message_codec.h"
+ "fl_method_call.h"
+ "fl_method_channel.h"
+ "fl_method_codec.h"
+ "fl_method_response.h"
+ "fl_plugin_registrar.h"
+ "fl_plugin_registry.h"
+ "fl_standard_message_codec.h"
+ "fl_standard_method_codec.h"
+ "fl_string_codec.h"
+ "fl_value.h"
+ "fl_view.h"
+ "flutter_linux.h"
+)
+list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/")
+add_library(flutter INTERFACE)
+target_include_directories(flutter INTERFACE
+ "${EPHEMERAL_DIR}"
+)
+target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}")
+target_link_libraries(flutter INTERFACE
+ PkgConfig::GTK
+ PkgConfig::GLIB
+ PkgConfig::GIO
+)
+add_dependencies(flutter flutter_assemble)
+
+# === Flutter tool backend ===
+# _phony_ is a non-existent file to force this command to run every time,
+# since currently there's no way to get a full input/output list from the
+# flutter tool.
+add_custom_command(
+ OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS}
+ ${CMAKE_CURRENT_BINARY_DIR}/_phony_
+ COMMAND ${CMAKE_COMMAND} -E env
+ ${FLUTTER_TOOL_ENVIRONMENT}
+ "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh"
+ ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE}
+ VERBATIM
+)
+add_custom_target(flutter_assemble DEPENDS
+ "${FLUTTER_LIBRARY}"
+ ${FLUTTER_LIBRARY_HEADERS}
+)
diff --git a/flutter/examples/platform_view/linux/main.cc b/flutter/examples/platform_view/linux/main.cc
new file mode 100644
index 0000000000000000000000000000000000000000..281a29e16b599a95421e7a35112eda77900ff549
--- /dev/null
+++ b/flutter/examples/platform_view/linux/main.cc
@@ -0,0 +1,10 @@
+// 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);
+}
diff --git a/flutter/examples/platform_view/linux/my_application.cc b/flutter/examples/platform_view/linux/my_application.cc
new file mode 100644
index 0000000000000000000000000000000000000000..403df877b0ac7d70004e0253a20a022c07c39060
--- /dev/null
+++ b/flutter/examples/platform_view/linux/my_application.cc
@@ -0,0 +1,167 @@
+// 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
+
+#ifdef GDK_WINDOWING_X11
+#include
+#endif
+
+#include "flutter/generated_plugin_registrant.h"
+
+struct _MyApplication {
+ GtkApplication parent_instance;
+
+ // Channel to receive platform view requests from Flutter.
+ FlMethodChannel* platform_view_channel;
+
+ // Main window.
+ GtkWindow* window;
+
+ // Current counter.
+ int64_t counter;
+
+ // Request in progress.
+ FlMethodCall* method_call;
+
+ // Native window requested by Flutter.
+ GtkWindow* native_window;
+
+ // Label to show count.
+ GtkLabel* counter_label;
+};
+
+G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION)
+
+static void update_counter_label(MyApplication* self) {
+ g_autofree gchar* text =
+ g_strdup_printf("Button tapped %" G_GINT64_FORMAT " %s.", self->counter,
+ self->counter == 1 ? "time" : "times");
+ gtk_label_set_text(self->counter_label, text);
+}
+
+static void button_clicked_cb(MyApplication* self) {
+ self->counter++;
+ update_counter_label(self);
+}
+
+static void native_window_delete_event_cb(MyApplication* self,
+ gint response_id) {
+ g_autoptr(FlValue) counter_value = fl_value_new_int(self->counter);
+ fl_method_call_respond_success(self->method_call, counter_value, nullptr);
+ g_clear_object(&self->method_call);
+}
+
+// Handle request to switch the view.
+static void handle_switch_view(MyApplication* self, FlMethodCall* method_call) {
+ FlValue* counter_value = fl_method_call_get_args(method_call);
+ if (fl_value_get_type(counter_value) != FL_VALUE_TYPE_INT) {
+ fl_method_call_respond_error(self->method_call, "Invalid args",
+ "Invalid switchView args", nullptr, nullptr);
+ return;
+ }
+
+ self->counter = fl_value_get_int(counter_value);
+ self->method_call = FL_METHOD_CALL(g_object_ref(method_call));
+
+ // Show the same UI in a native window.
+ self->native_window = GTK_WINDOW(gtk_window_new(GTK_WINDOW_TOPLEVEL));
+ gtk_window_set_transient_for(self->native_window, self->window);
+ gtk_window_set_modal(self->native_window, TRUE);
+ gtk_window_set_destroy_with_parent(self->native_window, TRUE);
+ g_signal_connect_swapped(self->native_window, "delete-event",
+ G_CALLBACK(native_window_delete_event_cb), self);
+
+ GtkWidget* box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 12);
+ gtk_widget_set_margin_start(box, 24);
+ gtk_widget_set_margin_end(box, 24);
+ gtk_widget_set_margin_top(box, 24);
+ gtk_widget_set_margin_bottom(box, 24);
+ gtk_widget_show(box);
+ gtk_container_add(GTK_CONTAINER(self->native_window), box);
+
+ self->counter_label = GTK_LABEL(gtk_label_new(""));
+ gtk_widget_show(GTK_WIDGET(self->counter_label));
+ gtk_container_add(GTK_CONTAINER(box), GTK_WIDGET(self->counter_label));
+
+ GtkWidget* button = gtk_button_new_with_label("+");
+ gtk_style_context_add_class(gtk_widget_get_style_context(GTK_WIDGET(button)),
+ "circular");
+ gtk_widget_set_halign(button, GTK_ALIGN_CENTER);
+ gtk_widget_show(button);
+ gtk_container_add(GTK_CONTAINER(box), button);
+ g_signal_connect_swapped(button, "clicked", G_CALLBACK(button_clicked_cb),
+ self);
+
+ update_counter_label(self);
+
+ gtk_window_present(self->native_window);
+}
+
+// Handle platform view requests from Flutter.
+static void platform_view_channel_method_cb(FlMethodChannel* channel,
+ FlMethodCall* method_call,
+ gpointer user_data) {
+ MyApplication* self = MY_APPLICATION(user_data);
+
+ const char* name = fl_method_call_get_name(method_call);
+ if (g_str_equal(name, "switchView")) {
+ handle_switch_view(self, method_call);
+ } else {
+ fl_method_call_respond_not_implemented(method_call, nullptr);
+ }
+}
+
+// Implements GObject::dispose.
+static void my_application_dispose(GObject* object) {
+ MyApplication* self = MY_APPLICATION(object);
+
+ g_clear_object(&self->platform_view_channel);
+
+ G_OBJECT_CLASS(my_application_parent_class)->dispose(object);
+}
+
+// Implements GApplication::activate.
+static void my_application_activate(GApplication* application) {
+ MyApplication* self = MY_APPLICATION(application);
+ self->window =
+ GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application)));
+
+ gtk_window_set_default_size(self->window, 1280, 720);
+ gtk_widget_show(GTK_WIDGET(self->window));
+
+ g_autoptr(FlDartProject) project = fl_dart_project_new();
+ FlView* view = fl_view_new(project);
+ gtk_widget_show(GTK_WIDGET(view));
+ gtk_container_add(GTK_CONTAINER(self->window), GTK_WIDGET(view));
+
+ // Create channel to handle platform view requests from Flutter.
+ FlEngine* engine = fl_view_get_engine(view);
+ g_autoptr(FlStandardMethodCodec) codec = fl_standard_method_codec_new();
+ self->platform_view_channel = fl_method_channel_new(
+ fl_engine_get_binary_messenger(engine),
+ "samples.flutter.io/platform_view", FL_METHOD_CODEC(codec));
+ fl_method_channel_set_method_call_handler(self->platform_view_channel,
+ platform_view_channel_method_cb,
+ self, nullptr);
+
+ fl_register_plugins(FL_PLUGIN_REGISTRY(view));
+
+ gtk_widget_grab_focus(GTK_WIDGET(view));
+}
+
+static void my_application_class_init(MyApplicationClass* klass) {
+ G_OBJECT_CLASS(klass)->dispose = my_application_dispose;
+ G_APPLICATION_CLASS(klass)->activate = my_application_activate;
+}
+
+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));
+}
diff --git a/flutter/examples/platform_view/linux/my_application.h b/flutter/examples/platform_view/linux/my_application.h
new file mode 100644
index 0000000000000000000000000000000000000000..8c66ec485434d1f922c9915bdaefcb8969cdfec9
--- /dev/null
+++ b/flutter/examples/platform_view/linux/my_application.h
@@ -0,0 +1,22 @@
+// 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
+
+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_
diff --git a/flutter/examples/platform_view/macos/Flutter/Flutter-Debug.xcconfig b/flutter/examples/platform_view/macos/Flutter/Flutter-Debug.xcconfig
new file mode 100644
index 0000000000000000000000000000000000000000..c2efd0b608ba84712fb3e1d01122468a50c7fba1
--- /dev/null
+++ b/flutter/examples/platform_view/macos/Flutter/Flutter-Debug.xcconfig
@@ -0,0 +1 @@
+#include "ephemeral/Flutter-Generated.xcconfig"
diff --git a/flutter/examples/platform_view/macos/Flutter/Flutter-Release.xcconfig b/flutter/examples/platform_view/macos/Flutter/Flutter-Release.xcconfig
new file mode 100644
index 0000000000000000000000000000000000000000..c2efd0b608ba84712fb3e1d01122468a50c7fba1
--- /dev/null
+++ b/flutter/examples/platform_view/macos/Flutter/Flutter-Release.xcconfig
@@ -0,0 +1 @@
+#include "ephemeral/Flutter-Generated.xcconfig"
diff --git a/flutter/examples/platform_view/macos/Runner.xcodeproj/project.pbxproj b/flutter/examples/platform_view/macos/Runner.xcodeproj/project.pbxproj
new file mode 100644
index 0000000000000000000000000000000000000000..23575315d5d465e0e57e98686bac4f1ff132fb81
--- /dev/null
+++ b/flutter/examples/platform_view/macos/Runner.xcodeproj/project.pbxproj
@@ -0,0 +1,581 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 54;
+ objects = {
+
+/* Begin PBXAggregateTarget section */
+ 33CC111A2044C6BA0003C045 /* Flutter Assemble */ = {
+ isa = PBXAggregateTarget;
+ buildConfigurationList = 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */;
+ buildPhases = (
+ 33CC111E2044C6BF0003C045 /* ShellScript */,
+ );
+ dependencies = (
+ );
+ name = "Flutter Assemble";
+ productName = FLX;
+ };
+/* End PBXAggregateTarget section */
+
+/* Begin PBXBuildFile section */
+ 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; };
+ 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; };
+ 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; };
+ 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; };
+ 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; };
+ F34FE5C128C663500068B3C3 /* PlatformViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F34FE5BF28C663500068B3C3 /* PlatformViewController.swift */; };
+ F34FE5C228C663500068B3C3 /* PlatformViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = F34FE5C028C663500068B3C3 /* PlatformViewController.xib */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+ 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 33CC10E52044A3C60003C045 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 33CC111A2044C6BA0003C045;
+ remoteInfo = FLX;
+ };
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+ 33CC110E2044A8840003C045 /* Bundle Framework */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 2147483647;
+ dstPath = "";
+ dstSubfolderSpec = 10;
+ files = (
+ );
+ name = "Bundle Framework";
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+ 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; };
+ 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = ""; };
+ 33CC10ED2044A3C60003C045 /* platform_view.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = platform_view.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
+ 33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = ""; };
+ 33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; };
+ 33CC10F72044A3C60003C045 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Runner/Info.plist; sourceTree = ""; };
+ 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainFlutterWindow.swift; sourceTree = ""; };
+ 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Debug.xcconfig"; sourceTree = ""; };
+ 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Release.xcconfig"; sourceTree = ""; };
+ 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "Flutter-Generated.xcconfig"; path = "ephemeral/Flutter-Generated.xcconfig"; sourceTree = ""; };
+ 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = ""; };
+ 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = ""; };
+ 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = ""; };
+ 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; };
+ 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; };
+ F34FE5BF28C663500068B3C3 /* PlatformViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlatformViewController.swift; sourceTree = ""; };
+ F34FE5C028C663500068B3C3 /* PlatformViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = PlatformViewController.xib; sourceTree = ""; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 33CC10EA2044A3C60003C045 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 33BA886A226E78AF003329D5 /* Configs */ = {
+ isa = PBXGroup;
+ children = (
+ 33E5194F232828860026EE4D /* AppInfo.xcconfig */,
+ 9740EEB21CF90195004384FC /* Debug.xcconfig */,
+ 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
+ 333000ED22D3DE5D00554162 /* Warnings.xcconfig */,
+ );
+ path = Configs;
+ sourceTree = "";
+ };
+ 33CC10E42044A3C60003C045 = {
+ isa = PBXGroup;
+ children = (
+ 33FAB671232836740065AC1E /* Runner */,
+ 33CEB47122A05771004F2AC0 /* Flutter */,
+ 33CC10EE2044A3C60003C045 /* Products */,
+ D73912EC22F37F3D000D13A0 /* Frameworks */,
+ );
+ sourceTree = "";
+ };
+ 33CC10EE2044A3C60003C045 /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 33CC10ED2044A3C60003C045 /* platform_view.app */,
+ );
+ name = Products;
+ sourceTree = "";
+ };
+ 33CC11242044D66E0003C045 /* Resources */ = {
+ isa = PBXGroup;
+ children = (
+ 33CC10F22044A3C60003C045 /* Assets.xcassets */,
+ 33CC10F42044A3C60003C045 /* MainMenu.xib */,
+ 33CC10F72044A3C60003C045 /* Info.plist */,
+ );
+ name = Resources;
+ path = ..;
+ sourceTree = "";
+ };
+ 33CEB47122A05771004F2AC0 /* Flutter */ = {
+ isa = PBXGroup;
+ children = (
+ 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */,
+ 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */,
+ 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */,
+ 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */,
+ );
+ path = Flutter;
+ sourceTree = "";
+ };
+ 33FAB671232836740065AC1E /* Runner */ = {
+ isa = PBXGroup;
+ children = (
+ 33CC10F02044A3C60003C045 /* AppDelegate.swift */,
+ 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */,
+ F34FE5BF28C663500068B3C3 /* PlatformViewController.swift */,
+ F34FE5C028C663500068B3C3 /* PlatformViewController.xib */,
+ 33E51913231747F40026EE4D /* DebugProfile.entitlements */,
+ 33E51914231749380026EE4D /* Release.entitlements */,
+ 33CC11242044D66E0003C045 /* Resources */,
+ 33BA886A226E78AF003329D5 /* Configs */,
+ );
+ path = Runner;
+ sourceTree = "";
+ };
+ D73912EC22F37F3D000D13A0 /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ );
+ name = Frameworks;
+ sourceTree = "";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 33CC10EC2044A3C60003C045 /* Runner */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */;
+ buildPhases = (
+ 33CC10E92044A3C60003C045 /* Sources */,
+ 33CC10EA2044A3C60003C045 /* Frameworks */,
+ 33CC10EB2044A3C60003C045 /* Resources */,
+ 33CC110E2044A8840003C045 /* Bundle Framework */,
+ 3399D490228B24CF009A79C7 /* ShellScript */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ 33CC11202044C79F0003C045 /* PBXTargetDependency */,
+ );
+ name = Runner;
+ productName = Runner;
+ productReference = 33CC10ED2044A3C60003C045 /* platform_view.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 33CC10E52044A3C60003C045 /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastSwiftUpdateCheck = 0920;
+ LastUpgradeCheck = 1510;
+ ORGANIZATIONNAME = "";
+ TargetAttributes = {
+ 33CC10EC2044A3C60003C045 = {
+ CreatedOnToolsVersion = 9.2;
+ LastSwiftMigration = 1100;
+ ProvisioningStyle = Automatic;
+ SystemCapabilities = {
+ com.apple.Sandbox = {
+ enabled = 1;
+ };
+ };
+ };
+ 33CC111A2044C6BA0003C045 = {
+ CreatedOnToolsVersion = 9.2;
+ ProvisioningStyle = Manual;
+ };
+ };
+ };
+ buildConfigurationList = 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */;
+ compatibilityVersion = "Xcode 9.3";
+ developmentRegion = en;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ Base,
+ );
+ mainGroup = 33CC10E42044A3C60003C045;
+ productRefGroup = 33CC10EE2044A3C60003C045 /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 33CC10EC2044A3C60003C045 /* Runner */,
+ 33CC111A2044C6BA0003C045 /* Flutter Assemble */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 33CC10EB2044A3C60003C045 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */,
+ 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */,
+ F34FE5C228C663500068B3C3 /* PlatformViewController.xib in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+ 3399D490228B24CF009A79C7 /* ShellScript */ = {
+ isa = PBXShellScriptBuildPhase;
+ alwaysOutOfDate = 1;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputFileListPaths = (
+ );
+ inputPaths = (
+ );
+ outputFileListPaths = (
+ );
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "echo \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh embed\n";
+ };
+ 33CC111E2044C6BF0003C045 /* ShellScript */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputFileListPaths = (
+ Flutter/ephemeral/FlutterInputs.xcfilelist,
+ );
+ inputPaths = (
+ Flutter/ephemeral/tripwire,
+ );
+ outputFileListPaths = (
+ Flutter/ephemeral/FlutterOutputs.xcfilelist,
+ );
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire";
+ };
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 33CC10E92044A3C60003C045 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */,
+ 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */,
+ 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */,
+ F34FE5C128C663500068B3C3 /* PlatformViewController.swift in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+ 33CC11202044C79F0003C045 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 33CC111A2044C6BA0003C045 /* Flutter Assemble */;
+ targetProxy = 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */;
+ };
+/* End PBXTargetDependency section */
+
+/* Begin PBXVariantGroup section */
+ 33CC10F42044A3C60003C045 /* MainMenu.xib */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 33CC10F52044A3C60003C045 /* Base */,
+ );
+ name = MainMenu.xib;
+ path = Runner;
+ sourceTree = "";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ 338D0CE9231458BD00FA5F75 /* Profile */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CODE_SIGN_IDENTITY = "-";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu11;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ MACOSX_DEPLOYMENT_TARGET = 10.14;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ SDKROOT = macosx;
+ SWIFT_COMPILATION_MODE = wholemodule;
+ SWIFT_OPTIMIZATION_LEVEL = "-O";
+ };
+ name = Profile;
+ };
+ 338D0CEA231458BD00FA5F75 /* Profile */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ENABLE_MODULES = YES;
+ CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
+ CODE_SIGN_STYLE = Automatic;
+ COMBINE_HIDPI_IMAGES = YES;
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/../Frameworks",
+ );
+ PROVISIONING_PROFILE_SPECIFIER = "";
+ SWIFT_VERSION = 5.0;
+ };
+ name = Profile;
+ };
+ 338D0CEB231458BD00FA5F75 /* Profile */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CODE_SIGN_STYLE = Manual;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Profile;
+ };
+ 33CC10F92044A3C60003C045 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CODE_SIGN_IDENTITY = "-";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ ENABLE_TESTABILITY = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu11;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ MACOSX_DEPLOYMENT_TARGET = 10.14;
+ MTL_ENABLE_DEBUG_INFO = YES;
+ ONLY_ACTIVE_ARCH = YES;
+ SDKROOT = macosx;
+ SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
+ SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+ };
+ name = Debug;
+ };
+ 33CC10FA2044A3C60003C045 /* Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CODE_SIGN_IDENTITY = "-";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu11;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ MACOSX_DEPLOYMENT_TARGET = 10.14;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ SDKROOT = macosx;
+ SWIFT_COMPILATION_MODE = wholemodule;
+ SWIFT_OPTIMIZATION_LEVEL = "-O";
+ };
+ name = Release;
+ };
+ 33CC10FC2044A3C60003C045 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ENABLE_MODULES = YES;
+ CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
+ CODE_SIGN_STYLE = Automatic;
+ COMBINE_HIDPI_IMAGES = YES;
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/../Frameworks",
+ );
+ PROVISIONING_PROFILE_SPECIFIER = "";
+ SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+ SWIFT_VERSION = 5.0;
+ };
+ name = Debug;
+ };
+ 33CC10FD2044A3C60003C045 /* Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ENABLE_MODULES = YES;
+ CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements;
+ CODE_SIGN_STYLE = Automatic;
+ COMBINE_HIDPI_IMAGES = YES;
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/../Frameworks",
+ );
+ PROVISIONING_PROFILE_SPECIFIER = "";
+ SWIFT_VERSION = 5.0;
+ };
+ name = Release;
+ };
+ 33CC111C2044C6BA0003C045 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CODE_SIGN_STYLE = Manual;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Debug;
+ };
+ 33CC111D2044C6BA0003C045 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CODE_SIGN_STYLE = Automatic;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 33CC10F92044A3C60003C045 /* Debug */,
+ 33CC10FA2044A3C60003C045 /* Release */,
+ 338D0CE9231458BD00FA5F75 /* Profile */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 33CC10FC2044A3C60003C045 /* Debug */,
+ 33CC10FD2044A3C60003C045 /* Release */,
+ 338D0CEA231458BD00FA5F75 /* Profile */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 33CC111C2044C6BA0003C045 /* Debug */,
+ 33CC111D2044C6BA0003C045 /* Release */,
+ 338D0CEB231458BD00FA5F75 /* Profile */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 33CC10E52044A3C60003C045 /* Project object */;
+}
diff --git a/flutter/examples/platform_view/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/flutter/examples/platform_view/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 0000000000000000000000000000000000000000..18d981003d68d0546c4804ac2ff47dd97c6e7921
--- /dev/null
+++ b/flutter/examples/platform_view/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/flutter/examples/platform_view/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/flutter/examples/platform_view/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
new file mode 100644
index 0000000000000000000000000000000000000000..cbcf3c2dd486772469647d3a877daa84af4e5f7d
--- /dev/null
+++ b/flutter/examples/platform_view/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
@@ -0,0 +1,87 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/flutter/examples/platform_view/macos/Runner.xcworkspace/contents.xcworkspacedata b/flutter/examples/platform_view/macos/Runner.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000000000000000000000000000000000000..1d526a16ed0f1cd0c2409d848bf489b93fefa3b2
--- /dev/null
+++ b/flutter/examples/platform_view/macos/Runner.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+
+
+
+
+
diff --git a/flutter/examples/platform_view/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/flutter/examples/platform_view/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 0000000000000000000000000000000000000000..18d981003d68d0546c4804ac2ff47dd97c6e7921
--- /dev/null
+++ b/flutter/examples/platform_view/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/flutter/examples/platform_view/macos/Runner/AppDelegate.swift b/flutter/examples/platform_view/macos/Runner/AppDelegate.swift
new file mode 100644
index 0000000000000000000000000000000000000000..d080d41951d3506a861ceadcf4354bbbb609a562
--- /dev/null
+++ b/flutter/examples/platform_view/macos/Runner/AppDelegate.swift
@@ -0,0 +1,13 @@
+// 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 Cocoa
+import FlutterMacOS
+
+@NSApplicationMain
+class AppDelegate: FlutterAppDelegate {
+ override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
+ return true
+ }
+}
diff --git a/flutter/examples/platform_view/macos/Runner/Base.lproj/MainMenu.xib b/flutter/examples/platform_view/macos/Runner/Base.lproj/MainMenu.xib
new file mode 100644
index 0000000000000000000000000000000000000000..80e867a4e06b4dc26d0a2b327cbd54041addc50a
--- /dev/null
+++ b/flutter/examples/platform_view/macos/Runner/Base.lproj/MainMenu.xib
@@ -0,0 +1,343 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/flutter/examples/platform_view/macos/Runner/Configs/AppInfo.xcconfig b/flutter/examples/platform_view/macos/Runner/Configs/AppInfo.xcconfig
new file mode 100644
index 0000000000000000000000000000000000000000..0ec4e5a45b55fec25ce49e4fcc1f8685f66c3a2e
--- /dev/null
+++ b/flutter/examples/platform_view/macos/Runner/Configs/AppInfo.xcconfig
@@ -0,0 +1,14 @@
+// Application-level settings for the Runner target.
+//
+// This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the
+// future. If not, the values below would default to using the project name when this becomes a
+// 'flutter create' template.
+
+// The application's name. By default this is also the title of the Flutter window.
+PRODUCT_NAME = platform_view
+
+// The application's bundle identifier
+PRODUCT_BUNDLE_IDENTIFIER = io.flutter.examples.platformView
+
+// The copyright displayed in application information
+PRODUCT_COPYRIGHT = Copyright © 2022 io.flutter.examples. All rights reserved.
diff --git a/flutter/examples/platform_view/macos/Runner/Configs/Debug.xcconfig b/flutter/examples/platform_view/macos/Runner/Configs/Debug.xcconfig
new file mode 100644
index 0000000000000000000000000000000000000000..36b0fd9464f45b33f482e64bea579787e142affa
--- /dev/null
+++ b/flutter/examples/platform_view/macos/Runner/Configs/Debug.xcconfig
@@ -0,0 +1,2 @@
+#include "../../Flutter/Flutter-Debug.xcconfig"
+#include "Warnings.xcconfig"
diff --git a/flutter/examples/platform_view/macos/Runner/Configs/Release.xcconfig b/flutter/examples/platform_view/macos/Runner/Configs/Release.xcconfig
new file mode 100644
index 0000000000000000000000000000000000000000..dff4f49561c816f70eaea557d889d31cf63447ac
--- /dev/null
+++ b/flutter/examples/platform_view/macos/Runner/Configs/Release.xcconfig
@@ -0,0 +1,2 @@
+#include "../../Flutter/Flutter-Release.xcconfig"
+#include "Warnings.xcconfig"
diff --git a/flutter/examples/platform_view/macos/Runner/Configs/Warnings.xcconfig b/flutter/examples/platform_view/macos/Runner/Configs/Warnings.xcconfig
new file mode 100644
index 0000000000000000000000000000000000000000..42bcbf4780b187e80025b7917058bcb882012aa1
--- /dev/null
+++ b/flutter/examples/platform_view/macos/Runner/Configs/Warnings.xcconfig
@@ -0,0 +1,13 @@
+WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings
+GCC_WARN_UNDECLARED_SELECTOR = YES
+CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES
+CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE
+CLANG_WARN__DUPLICATE_METHOD_MATCH = YES
+CLANG_WARN_PRAGMA_PACK = YES
+CLANG_WARN_STRICT_PROTOTYPES = YES
+CLANG_WARN_COMMA = YES
+GCC_WARN_STRICT_SELECTOR_MATCH = YES
+CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES
+CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES
+GCC_WARN_SHADOW = YES
+CLANG_WARN_UNREACHABLE_CODE = YES
diff --git a/flutter/examples/platform_view/macos/Runner/DebugProfile.entitlements b/flutter/examples/platform_view/macos/Runner/DebugProfile.entitlements
new file mode 100644
index 0000000000000000000000000000000000000000..dddb8a30c851e7ef5b16a9108934bd1217b6b43f
--- /dev/null
+++ b/flutter/examples/platform_view/macos/Runner/DebugProfile.entitlements
@@ -0,0 +1,12 @@
+
+
+
+
+ com.apple.security.app-sandbox
+
+ com.apple.security.cs.allow-jit
+
+ com.apple.security.network.server
+
+
+
diff --git a/flutter/examples/platform_view/macos/Runner/Info.plist b/flutter/examples/platform_view/macos/Runner/Info.plist
new file mode 100644
index 0000000000000000000000000000000000000000..4789daa6a443eefa7f3f729164a18351e06e9800
--- /dev/null
+++ b/flutter/examples/platform_view/macos/Runner/Info.plist
@@ -0,0 +1,32 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ $(DEVELOPMENT_LANGUAGE)
+ CFBundleExecutable
+ $(EXECUTABLE_NAME)
+ CFBundleIconFile
+
+ CFBundleIdentifier
+ $(PRODUCT_BUNDLE_IDENTIFIER)
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ $(PRODUCT_NAME)
+ CFBundlePackageType
+ APPL
+ CFBundleShortVersionString
+ $(FLUTTER_BUILD_NAME)
+ CFBundleVersion
+ $(FLUTTER_BUILD_NUMBER)
+ LSMinimumSystemVersion
+ $(MACOSX_DEPLOYMENT_TARGET)
+ NSHumanReadableCopyright
+ $(PRODUCT_COPYRIGHT)
+ NSMainNibFile
+ MainMenu
+ NSPrincipalClass
+ NSApplication
+
+
diff --git a/flutter/examples/platform_view/macos/Runner/MainFlutterWindow.swift b/flutter/examples/platform_view/macos/Runner/MainFlutterWindow.swift
new file mode 100644
index 0000000000000000000000000000000000000000..e56d2ac9905ddd43e6b3ea951c716e4951a1fe90
--- /dev/null
+++ b/flutter/examples/platform_view/macos/Runner/MainFlutterWindow.swift
@@ -0,0 +1,44 @@
+// 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 Cocoa
+import FlutterMacOS
+
+/**
+ The main application window.
+
+ Performs Flutter app initialization, and handles channel method calls over the
+ `samples.flutter.io/platform_view` channel.
+*/
+class MainFlutterWindow: NSWindow {
+ override func awakeFromNib() {
+ let flutterViewController = FlutterViewController()
+ let windowFrame = self.frame
+ self.contentViewController = flutterViewController
+ self.setFrame(windowFrame, display: true)
+
+ RegisterGeneratedPlugins(registry: flutterViewController)
+ RegisterMethodChannel(registry: flutterViewController)
+
+ super.awakeFromNib()
+ }
+
+ func RegisterMethodChannel(registry: FlutterPluginRegistry) {
+ let registrar = registry.registrar(forPlugin: "platform_view")
+ let channel = FlutterMethodChannel(name: "samples.flutter.io/platform_view",
+ binaryMessenger: registrar.messenger)
+ channel.setMethodCallHandler({ (call, result) in
+ if (call.method == "switchView") {
+ let count = call.arguments as! Int
+ let controller: NSViewController = PlatformViewController(
+ withCount: count,
+ onClose: { platformViewController in
+ result(platformViewController.count)
+ }
+ )
+ self.contentViewController?.presentAsSheet(controller)
+ }
+ })
+ }
+}
diff --git a/flutter/examples/platform_view/macos/Runner/PlatformViewController.swift b/flutter/examples/platform_view/macos/Runner/PlatformViewController.swift
new file mode 100644
index 0000000000000000000000000000000000000000..12bbd4cbe8f226924ec34dca89a3b4cf1b446b42
--- /dev/null
+++ b/flutter/examples/platform_view/macos/Runner/PlatformViewController.swift
@@ -0,0 +1,57 @@
+// 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 Cocoa
+
+/**
+`ViewControllers` in the xib can inherit from this class to communicate with
+the flutter view for this application. ViewControllers that inherit from this
+class should be displayed as a popover or modal, with a button that binds to
+the IBAction `pop()`.
+
+To get the value of the popover during close, pass a callback function as
+the `dispose` parameter. The callback passed will have access to the
+`PlatformViewController` and all of it's properties at close so that the `count`
+can be passed back through the message channel if needed.
+*/
+class PlatformViewController: NSViewController {
+ var count: Int = 0
+
+ var dispose: ((PlatformViewController)->())?
+
+ @IBOutlet weak var label: NSTextField!
+
+ var labelText: String {
+ get {
+ return "Button tapped \(self.count) time\(self.count != 1 ? "s" : "")."
+ }
+ }
+
+ override func viewDidLoad() {
+ super.viewDidLoad()
+ self.label.stringValue = labelText
+ }
+
+ public required init?(coder aDecoder: NSCoder) {
+ self.count = 0
+ self.dispose = nil
+ super.init(coder: aDecoder)
+ }
+
+ init(withCount count: Int, onClose dispose: ((PlatformViewController)->())?) {
+ self.count = count
+ self.dispose = dispose
+ super.init(nibName: nil, bundle: nil)
+ }
+
+ @IBAction func pop(_ sender: Any) {
+ self.dispose?(self)
+ dismiss(self)
+ }
+
+ @IBAction func increment(_ sender: Any) {
+ self.count += 1
+ self.label.stringValue = labelText
+ }
+}
diff --git a/flutter/examples/platform_view/macos/Runner/PlatformViewController.xib b/flutter/examples/platform_view/macos/Runner/PlatformViewController.xib
new file mode 100644
index 0000000000000000000000000000000000000000..82a80df93e92137b942b26f0b4f761e44ff0c054
--- /dev/null
+++ b/flutter/examples/platform_view/macos/Runner/PlatformViewController.xib
@@ -0,0 +1,103 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/flutter/examples/platform_view/macos/Runner/Release.entitlements b/flutter/examples/platform_view/macos/Runner/Release.entitlements
new file mode 100644
index 0000000000000000000000000000000000000000..852fa1a4728ae4789e3bca55dd07caef3b41f2a5
--- /dev/null
+++ b/flutter/examples/platform_view/macos/Runner/Release.entitlements
@@ -0,0 +1,8 @@
+
+
+
+
+ com.apple.security.app-sandbox
+
+
+
diff --git a/flutter/examples/platform_view/pubspec.lock b/flutter/examples/platform_view/pubspec.lock
new file mode 100644
index 0000000000000000000000000000000000000000..36bc7e99c2379e280e9449f9a2375c5cc29f144d
--- /dev/null
+++ b/flutter/examples/platform_view/pubspec.lock
@@ -0,0 +1,55 @@
+# Generated by pub
+# See https://dart.dev/tools/pub/glossary#lockfile
+packages:
+ 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"
diff --git a/flutter/examples/platform_view/pubspec.yaml b/flutter/examples/platform_view/pubspec.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..2026264243950346cc54a5d63dd15ecf92324d72
--- /dev/null
+++ b/flutter/examples/platform_view/pubspec.yaml
@@ -0,0 +1,22 @@
+name: platform_view
+
+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: 4694
diff --git a/flutter/examples/platform_view/windows/CMakeLists.txt b/flutter/examples/platform_view/windows/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..36fa4a7d46f67bec7da1938ed66fcda0d16a081f
--- /dev/null
+++ b/flutter/examples/platform_view/windows/CMakeLists.txt
@@ -0,0 +1,109 @@
+# 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.
+
+# Project-level configuration.
+cmake_minimum_required(VERSION 3.14)
+project(platform_view 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 "platform_view")
+
+# Explicitly opt in to modern CMake behaviors to avoid warnings with recent
+# versions of CMake.
+cmake_policy(VERSION 3.14...3.25)
+
+# Define build configuration option.
+get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
+if(IS_MULTICONFIG)
+ set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release"
+ CACHE STRING "" FORCE)
+else()
+ 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()
+endif()
+# Define settings for the Profile build mode.
+set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}")
+set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}")
+set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}")
+set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}")
+
+# Use Unicode for all projects.
+add_definitions(-DUNICODE -D_UNICODE)
+
+# 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_17)
+ target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100")
+ target_compile_options(${TARGET} PRIVATE /EHsc)
+ target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0")
+ target_compile_definitions(${TARGET} PRIVATE "$<$:_DEBUG>")
+endfunction()
+
+# Flutter library and tool build rules.
+set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter")
+add_subdirectory(${FLUTTER_MANAGED_DIR})
+
+# Application build; see runner/CMakeLists.txt.
+add_subdirectory("runner")
+
+# Generated plugin build rules, which manage building the plugins and adding
+# them to the application.
+include(flutter/generated_plugins.cmake)
+
+target_include_directories(${BINARY_NAME} INTERFACE
+ "${CMAKE_CURRENT_SOURCE_DIR}/flutter")
+target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_plugin)
+
+# === Installation ===
+# Support files are copied into place next to the executable, so that it can
+# run in place. This is done instead of making a separate bundle (as on Linux)
+# so that building and running from within Visual Studio will work.
+set(BUILD_BUNDLE_DIR "$")
+# Make the "install" step default, as it's required to run.
+set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1)
+if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
+ set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE)
+endif()
+
+set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data")
+set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}")
+
+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)
+
+set(PLUGIN_BUNDLED_LIBRARIES)
+if(PLUGIN_BUNDLED_LIBRARIES)
+ install(FILES "${PLUGIN_BUNDLED_LIBRARIES}"
+ DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
+ COMPONENT Runtime)
+endif()
+
+# 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.
+install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}"
+ CONFIGURATIONS Profile;Release
+ COMPONENT Runtime)
diff --git a/flutter/examples/platform_view/windows/flutter/CMakeLists.txt b/flutter/examples/platform_view/windows/flutter/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..c8f7abf1ebea9a6acf8801c930ba7fe241bebbee
--- /dev/null
+++ b/flutter/examples/platform_view/windows/flutter/CMakeLists.txt
@@ -0,0 +1,113 @@
+# 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 controls Flutter-level build steps. It should not be edited.
+cmake_minimum_required(VERSION 3.14)
+
+set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral")
+
+# Configuration provided via flutter tool.
+include(${EPHEMERAL_DIR}/generated_config.cmake)
+
+# TODO: Move the rest of this into files in ephemeral. See
+# https://github.com/flutter/flutter/issues/57146.
+set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper")
+
+# Set fallback configurations for older versions of the flutter tool.
+if (NOT DEFINED FLUTTER_TARGET_PLATFORM)
+ set(FLUTTER_TARGET_PLATFORM "windows-x64")
+endif()
+
+# === Flutter Library ===
+set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll")
+
+# Published to parent scope for install step.
+set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE)
+set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE)
+set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE)
+set(AOT_LIBRARY "${PROJECT_DIR}/build/windows/app.so" PARENT_SCOPE)
+
+list(APPEND FLUTTER_LIBRARY_HEADERS
+ "flutter_export.h"
+ "flutter_windows.h"
+ "flutter_messenger.h"
+ "flutter_plugin_registrar.h"
+ "flutter_texture_registrar.h"
+)
+list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/")
+add_library(flutter INTERFACE)
+target_include_directories(flutter INTERFACE
+ "${EPHEMERAL_DIR}"
+)
+target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib")
+add_dependencies(flutter flutter_assemble)
+
+# === Wrapper ===
+list(APPEND CPP_WRAPPER_SOURCES_CORE
+ "core_implementations.cc"
+ "standard_codec.cc"
+)
+list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/")
+list(APPEND CPP_WRAPPER_SOURCES_PLUGIN
+ "plugin_registrar.cc"
+)
+list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/")
+list(APPEND CPP_WRAPPER_SOURCES_APP
+ "flutter_engine.cc"
+ "flutter_view_controller.cc"
+)
+list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/")
+
+# Wrapper sources needed for a plugin.
+add_library(flutter_wrapper_plugin STATIC
+ ${CPP_WRAPPER_SOURCES_CORE}
+ ${CPP_WRAPPER_SOURCES_PLUGIN}
+)
+apply_standard_settings(flutter_wrapper_plugin)
+set_target_properties(flutter_wrapper_plugin PROPERTIES
+ POSITION_INDEPENDENT_CODE ON)
+set_target_properties(flutter_wrapper_plugin PROPERTIES
+ CXX_VISIBILITY_PRESET hidden)
+target_link_libraries(flutter_wrapper_plugin PUBLIC flutter)
+target_include_directories(flutter_wrapper_plugin PUBLIC
+ "${WRAPPER_ROOT}/include"
+)
+add_dependencies(flutter_wrapper_plugin flutter_assemble)
+
+# Wrapper sources needed for the runner.
+add_library(flutter_wrapper_app STATIC
+ ${CPP_WRAPPER_SOURCES_CORE}
+ ${CPP_WRAPPER_SOURCES_APP}
+)
+apply_standard_settings(flutter_wrapper_app)
+target_link_libraries(flutter_wrapper_app PUBLIC flutter)
+target_include_directories(flutter_wrapper_app PUBLIC
+ "${WRAPPER_ROOT}/include"
+)
+add_dependencies(flutter_wrapper_app flutter_assemble)
+
+# === Flutter tool backend ===
+# _phony_ is a non-existent file to force this command to run every time,
+# since currently there's no way to get a full input/output list from the
+# flutter tool.
+set(PHONY_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_phony_")
+set_source_files_properties("${PHONY_OUTPUT}" PROPERTIES SYMBOLIC TRUE)
+add_custom_command(
+ OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS}
+ ${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN}
+ ${CPP_WRAPPER_SOURCES_APP}
+ ${PHONY_OUTPUT}
+ COMMAND ${CMAKE_COMMAND} -E env
+ ${FLUTTER_TOOL_ENVIRONMENT}
+ "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat"
+ ${FLUTTER_TARGET_PLATFORM} $
+ VERBATIM
+)
+add_custom_target(flutter_assemble DEPENDS
+ "${FLUTTER_LIBRARY}"
+ ${FLUTTER_LIBRARY_HEADERS}
+ ${CPP_WRAPPER_SOURCES_CORE}
+ ${CPP_WRAPPER_SOURCES_PLUGIN}
+ ${CPP_WRAPPER_SOURCES_APP}
+)
diff --git a/flutter/examples/platform_view/windows/runner/CMakeLists.txt b/flutter/examples/platform_view/windows/runner/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..e851e112e09f327d5ff51fe4001fd4d4a414c5a0
--- /dev/null
+++ b/flutter/examples/platform_view/windows/runner/CMakeLists.txt
@@ -0,0 +1,43 @@
+# 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.
+
+cmake_minimum_required(VERSION 3.14)
+project(runner LANGUAGES CXX)
+
+# Define the application target. To change its name, change BINARY_NAME in the
+# top-level CMakeLists.txt, 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} WIN32
+ "flutter_window.cpp"
+ "main.cpp"
+ "utils.cpp"
+ "win32_window.cpp"
+ "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc"
+ "Runner.rc"
+ "runner.exe.manifest"
+)
+
+# Apply the standard set of build settings. This can be removed for applications
+# that need different build settings.
+apply_standard_settings(${BINARY_NAME})
+
+# Add preprocessor definitions for the build version.
+target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION=\"${FLUTTER_VERSION}\"")
+target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MAJOR=${FLUTTER_VERSION_MAJOR}")
+target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MINOR=${FLUTTER_VERSION_MINOR}")
+target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_PATCH=${FLUTTER_VERSION_PATCH}")
+target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_BUILD=${FLUTTER_VERSION_BUILD}")
+
+# Disable Windows macros that collide with C++ standard library functions.
+target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX")
+
+# Add dependency libraries and include directories. Add any application-specific
+# dependencies here.
+target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app)
+target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}")
+
+# Run the Flutter tool portions of the build. This must not be removed.
+add_dependencies(${BINARY_NAME} flutter_assemble)
diff --git a/flutter/examples/platform_view/windows/runner/Runner.rc b/flutter/examples/platform_view/windows/runner/Runner.rc
new file mode 100644
index 0000000000000000000000000000000000000000..d9d83c4f73acfcad6e03a98284d6b0ef7f2d8bac
--- /dev/null
+++ b/flutter/examples/platform_view/windows/runner/Runner.rc
@@ -0,0 +1,121 @@
+// Microsoft Visual C++ generated resource script.
+//
+#pragma code_page(65001)
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "winres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (United States) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#include ""winres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+// IDI_APP_ICON ICON "resources\\app_icon.ico"
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+#if defined(FLUTTER_VERSION_MAJOR) && defined(FLUTTER_VERSION_MINOR) && defined(FLUTTER_VERSION_PATCH) && defined(FLUTTER_VERSION_BUILD)
+#define VERSION_AS_NUMBER FLUTTER_VERSION_MAJOR,FLUTTER_VERSION_MINOR,FLUTTER_VERSION_PATCH,FLUTTER_VERSION_BUILD
+#else
+#define VERSION_AS_NUMBER 1,0,0,0
+#endif
+
+#if defined(FLUTTER_VERSION)
+#define VERSION_AS_STRING FLUTTER_VERSION
+#else
+#define VERSION_AS_STRING "1.0.0"
+#endif
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION VERSION_AS_NUMBER
+ PRODUCTVERSION VERSION_AS_NUMBER
+ FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
+#ifdef _DEBUG
+ FILEFLAGS VS_FF_DEBUG
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS VOS__WINDOWS32
+ FILETYPE VFT_APP
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904e4"
+ BEGIN
+ VALUE "CompanyName", "io.flutter.examples" "\0"
+ VALUE "FileDescription", "platform_view" "\0"
+ VALUE "FileVersion", VERSION_AS_STRING "\0"
+ VALUE "InternalName", "platform_view" "\0"
+ VALUE "LegalCopyright", "Copyright (C) 2022 io.flutter.examples. All rights reserved." "\0"
+ VALUE "OriginalFilename", "platform_view.exe" "\0"
+ VALUE "ProductName", "platform_view" "\0"
+ VALUE "ProductVersion", VERSION_AS_STRING "\0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1252
+ END
+END
+
+#endif // English (United States) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
diff --git a/flutter/examples/platform_view/windows/runner/flutter_window.cpp b/flutter/examples/platform_view/windows/runner/flutter_window.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..643a1c3cad4f0040452915a12546132f9e5e65b6
--- /dev/null
+++ b/flutter/examples/platform_view/windows/runner/flutter_window.cpp
@@ -0,0 +1,94 @@
+// 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 "flutter_window.h"
+
+#include
+#include
+#include
+#include
+#include
+
+#include
+#include
+#include
+#include
+
+#include "flutter/generated_plugin_registrant.h"
+
+void RegisterMethodChannel(flutter::FlutterEngine* engine) {
+ FlutterDesktopPluginRegistrarRef plugin_registrar_ref =
+ engine->GetRegistrarForPlugin("platform_view");
+ flutter::PluginRegistrarWindows* registrar =
+ flutter::PluginRegistrarManager::GetInstance()
+ ->GetRegistrar(plugin_registrar_ref);
+ auto channel =
+ std::make_unique>(
+ registrar->messenger(), "samples.flutter.io/platform_view",
+ &flutter::StandardMethodCodec::GetInstance());
+ channel->SetMethodCallHandler([](const auto& call, auto result) {
+ int counter = std::get(*call.arguments());
+ std::string msg = std::string("Pressed the button ") +
+ std::to_string(counter) + " times!";
+ MessageBoxA(NULL, msg.c_str(), "Popup", MB_OK);
+ result->Success(flutter::EncodableValue(counter));
+ });
+}
+
+FlutterWindow::FlutterWindow(const flutter::DartProject& project)
+ : project_(project) {}
+
+FlutterWindow::~FlutterWindow() {}
+
+bool FlutterWindow::OnCreate() {
+ if (!Win32Window::OnCreate()) {
+ return false;
+ }
+
+ RECT frame = GetClientArea();
+
+ // The size here must match the window dimensions to avoid unnecessary surface
+ // creation / destruction in the startup path.
+ flutter_controller_ = std::make_unique(
+ frame.right - frame.left, frame.bottom - frame.top, project_);
+ // Ensure that basic setup of the controller was successful.
+ if (!flutter_controller_->engine() || !flutter_controller_->view()) {
+ return false;
+ }
+ RegisterPlugins(flutter_controller_->engine());
+ RegisterMethodChannel(flutter_controller_->engine());
+ SetChildContent(flutter_controller_->view()->GetNativeWindow());
+ return true;
+}
+
+void FlutterWindow::OnDestroy() {
+ if (flutter_controller_) {
+ flutter_controller_ = nullptr;
+ }
+
+ Win32Window::OnDestroy();
+}
+
+LRESULT
+FlutterWindow::MessageHandler(HWND hwnd, UINT const message,
+ WPARAM const wparam,
+ LPARAM const lparam) noexcept {
+ // Give Flutter, including plugins, an opportunity to handle window messages.
+ if (flutter_controller_) {
+ std::optional result =
+ flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam,
+ lparam);
+ if (result) {
+ return *result;
+ }
+ }
+
+ switch (message) {
+ case WM_FONTCHANGE:
+ flutter_controller_->engine()->ReloadSystemFonts();
+ break;
+ }
+
+ return Win32Window::MessageHandler(hwnd, message, wparam, lparam);
+}
diff --git a/flutter/examples/platform_view/windows/runner/flutter_window.h b/flutter/examples/platform_view/windows/runner/flutter_window.h
new file mode 100644
index 0000000000000000000000000000000000000000..bbc5836c018a235235e8094ab411d98e1c5443fa
--- /dev/null
+++ b/flutter/examples/platform_view/windows/runner/flutter_window.h
@@ -0,0 +1,37 @@
+// 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 RUNNER_FLUTTER_WINDOW_H_
+#define RUNNER_FLUTTER_WINDOW_H_
+
+#include
+#include
+
+#include
+
+#include "win32_window.h"
+
+// A window that does nothing but host a Flutter view.
+class FlutterWindow : public Win32Window {
+ public:
+ // Creates a new FlutterWindow hosting a Flutter view running |project|.
+ explicit FlutterWindow(const flutter::DartProject& project);
+ virtual ~FlutterWindow();
+
+ protected:
+ // Win32Window:
+ bool OnCreate() override;
+ void OnDestroy() override;
+ LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam,
+ LPARAM const lparam) noexcept override;
+
+ private:
+ // The project to run.
+ flutter::DartProject project_;
+
+ // The Flutter instance hosted by this window.
+ std::unique_ptr flutter_controller_;
+};
+
+#endif // RUNNER_FLUTTER_WINDOW_H_
diff --git a/flutter/examples/platform_view/windows/runner/main.cpp b/flutter/examples/platform_view/windows/runner/main.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..573327f640cb1c39f02e6b2b1adafcf71eaaab5f
--- /dev/null
+++ b/flutter/examples/platform_view/windows/runner/main.cpp
@@ -0,0 +1,47 @@
+// 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