Skip to content

url_launcher_watchos 0.1.2: upstream's example and official test - #27

Merged
MAUstaoglu merged 1 commit into
mainfrom
examples-url-launcher
Oct 24, 2026
Merged

MAUstaoglu merged 1 commit into
mainfrom
examples-url-launcher

Conversation

@MAUstaoglu

Copy link
Copy Markdown
Member

Part of #24.

Example. Our example was a hand-written demo. It is now url_launcher's own example app with its official integration test, both unchanged apart from the formatting our CI checks, ported with flutter-watchos plugin port --include-example. There are no watchOS deviations. The example's pubspec adds path, which upstream's lib/files.dart imports.

Tests. The report said upstream's test was not reused because it asserts an in-app SFSafariViewController. That is url_launcher_ios's own test. The test the porter takes is the app-facing url_launcher's, which checks canLaunchUrl and the legacy canLaunch, and it passes as is. Our former test stays beside it as watchos_url_launcher_test.dart, covering the on-watch browser, Handoff and the refused schemes.

Verified on the watchOS 27.0 Simulator

  • url_launcher_test.dart (upstream): passes.
  • watchos_url_launcher_test.dart: 6 pass.
  • The example starts with no exception in its first 15 seconds and no overflow stripe. canLaunchUrl(tel:) answers at start, so the "Make phone call" button shows.

Unit tests (16) and flutter analyze lib test are clean. The repo's version, example-constraint, README-snippet, test-name, word and format checks pass.

Version 0.1.2 with a CHANGELOG entry. The README gains an Example section, and the PORTING_REPORT gets its verification rows and an Example section.

The example was a hand-written demo. AUTHORING.md §3 asks for upstream's
own example and official test, unchanged, so both are now url_launcher's,
ported with `flutter-watchos plugin port --include-example` (#24). The
example's pubspec adds `path`, which upstream's lib/files.dart imports.

The report said upstream's test was not reused because it asserts an in-app
SFSafariViewController. That is url_launcher_ios's test; the app-facing
url_launcher's test, which the porter takes, checks canLaunchUrl and the
legacy canLaunch, and passes verbatim. Our former test stays beside it as
watchos_url_launcher_test.dart: the on-watch browser, Handoff and the
refused schemes.

On the watchOS 27.0 Simulator both tests pass (1 and 6), and the example
starts with no exception in its first 15 seconds and no overflow.
@MAUstaoglu

Copy link
Copy Markdown
Member Author

Re-checked the example's start the way spec 0006 criterion 8a asks: built with --dart-define=flutter.inspector.structuredErrors=false, so framework errors such as an overflow reach the log, and read both the console and the unified log for the first 15 seconds. The first check lacked that flag. Result on the watchOS 27.0 Simulator: no exception and no overflow, so the claim above holds.

@MAUstaoglu
MAUstaoglu merged commit 59f834f into main Oct 24, 2026
2 checks passed
@MAUstaoglu
MAUstaoglu deleted the examples-url-launcher branch October 24, 2026 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant