flutter/packages/flutter_tools/templates
stuartmorgan f1d157bc29
Add an integration test to plugin template example (#117062)
* Add an integration test to plugin template example

Dart unit tests don't exercise host-side plugin code at all, so the
example tests in the plugin template currently have very little
meaningful coverage. This adds an integration test to the example app
when creating a plugin, so that there's an example of how to actually
test that a complete round-trip plugin call works.

This is done as a separate template that's currently only used by the
plugin template because I don't know what a good example for a
non-plugin case would be that isn't largely just a duplicate of the
widget tests. However, the integration test pre-includes conditionals
around the parts that are plugin-specific so that it can more easily be
expanded to other use cases later (e.g., in
https://github.com/flutter/flutter/issues/68818).

Part of https://github.com/flutter/flutter/issues/82458

* Add integration test to expected dependencies of a plugin app

* Test fixes

* Make an explicit test case
2022-12-15 19:49:14 +00:00
..
app Add an integration test to plugin template example (#117062) 2022-12-15 19:49:14 +00:00
app_integration_test/integration_test Add an integration test to plugin template example (#117062) 2022-12-15 19:49:14 +00:00
app_shared Increase minimum supported macOS version from 10.13 to 10.14 (#114713) 2022-11-07 11:32:42 +01:00
app_test_widget/test [flutter_tools] Use proper project name in templates (#96373) 2022-02-02 06:50:14 -08:00
cocoapods Increase minimum supported macOS version from 10.13 to 10.14 (#114713) 2022-11-07 11:32:42 +01:00
module Remove .pub directories from iml templates (#109622) 2022-09-09 22:20:12 +00:00
package Remove .pub directories from iml templates (#109622) 2022-09-09 22:20:12 +00:00
plugin Remove Swift plugin Objective-C files (#113585) 2022-10-18 18:41:08 +00:00
plugin_ffi Fix plugin_ffi bindings regen command and bump ffigen (#104844) 2022-05-27 15:08:07 -07:00
plugin_shared Remove .pub directories from iml templates (#109622) 2022-09-09 22:20:12 +00:00
skeleton Use super parameters in templates (#101157) 2022-04-14 13:26:38 -07:00
README.md FFI plugins (#96225) 2022-01-26 23:44:45 +01:00
template_manifest.json Add an integration test to plugin template example (#117062) 2022-12-15 19:49:14 +00:00

This directory contains templates for flutter create.

The *_shared subdirectories provide files for multiple templates.

  • app_shared for app and skeleton.
  • plugin_shared for (method channel) plugin and plugin_ffi.

For example, there are two app templates: app (the counter app) and skeleton (the more advanced list view/detail view app).

  ┌────────────┐
  │ app_shared │
  └──┬──────┬──┘
     │      │
     │      │
     ▼      ▼
┌─────┐    ┌──────────┐
│ app │    │ skeleton │
└─────┘    └──────────┘

Thanks to app_shared, the templates for app and skeleton can contain only the files that are specific to them alone, and the rest is automatically kept in sync.