Skip to content

About

Flutter on Apple Watch: 17 watchOS plugin packages running live, a native SwiftUI platform view, and a fragment-shader gallery. Built with flutter-watchos.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

flutterwatch plugins showcase

A Flutter app for the Apple Watch that exercises 17 *_watchos plugin packages live on the device, plus a fragment-shader gallery.

It ships in companion mode: the watch app is embedded in the iOS host app under ios/, which is what the watch Info.plist's WKCompanionAppBundleIdentifier records. The CLI derives that from the project shape — an app with no ios/ directory builds as a standalone watch-only app instead, with no configuration either way.

It exists to answer one question honestly: what actually works today? Every screen calls the real plugin against the real system framework on the watch — nothing is stubbed.

Built with flutter-watchos — Flutter apps running on the Apple Watch itself.

What it demonstrates

Plugins. Every package resolves from pub.dev at its published version. There are no path: dependencies and no pubspec_overrides.yaml, so a plain checkout builds exactly what any user gets:

Storage path_provider · shared_preferences · flutter_secure_storage
Device package_info_plus · device_info_plus · battery_plus
Connectivity connectivity_plus · network_info_plus
Sensors & auth sensors_plus · geolocator · local_auth
Media video_player · audioplayers
Firebase firebase_core · firebase_auth · firebase_storage · firebase_messaging

Platform views. The video_player screen embeds a native SwiftUI VideoPlayer (AVKit) surface inside the Flutter widget tree, with Flutter drawing over it.

Fragment shaders. Ten GLSL effects under shaders/, with a FrameTiming-based HUD so you can see what each one costs rather than guess.

Running it

Requires the flutter-watchos toolchain (flutterwatch.dev). The watchOS Simulator needs no account; a paired Apple Watch needs a GitHub sign-in (flutter-watchos login).

flutter-watchos pub get
flutter-watchos run -d <watch-simulator-or-device>

flutter-watchos devices lists what's available. Debug builds run on the watchOS Simulator; a paired Apple Watch runs profile builds once you have signed in with flutter-watchos login.

Automated sweep

flutter-watchos test integration_test/all_plugins_test.dart -d <watch-sim>

integration_test/all_plugins_test.dart calls each plugin through its app-facing API against the real *_watchos FFI implementation. Paths needing hardware or interactive UI (sensors, geolocator, local_auth, APNs) assert the graceful Simulator behaviour rather than faking success.

Reading the shader numbers

The frame HUD is only meaningful in a profile build on real hardware. Debug builds and the Simulator rasterise far slower, and the app labels them as such — don't read a Simulator screenshot as a performance result.

Two things that cost more than the shader itself, both avoided here and worth copying: compile each FragmentProgram once and cache it rather than building it in build(), and drive animation from an AnimationController with vsync, so TickerMode mutes it when the page is covered. A bare Ticker keeps burning battery off-screen.

Firebase

lib/firebase_options.dart points at FlutterFire's own public end-to-end test project (flutterfire-e2e-tests) — the same configuration the upstream FlutterFire examples ship. It is not a private project. To point the Firebase screens at your own backend, replace that file with flutterfire configure output.

Storage writes go under the flutter-tests/ prefix, which that project's rules allow for anonymous users; other prefixes return [firebase_storage/unauthorized].

firebase_messaging needs the host app delegate, installed in watchos/Runner/App.swift:

@WKApplicationDelegateAdaptor(FlutterWatchOSAppDelegate.self)
private var flutterAppDelegate

The Simulator has no APNs, so the token is legitimately null there.

Credits

Sample media comes from upstream example apps and keeps its original licensing:

  • assets/Butterfly-209.mp4 — Flutter video_player example (flutter/packages, BSD-3-Clause)
  • assets/coins.wav — audioplayers example (bluefireteam/audioplayers, MIT)
  • assets/photos/ — frames extracted from Butterfly-209.mp4

The watchOS plugin implementations live at flutterwatch/plugins and are published on pub.dev under the flutterwatch.dev publisher.

Licence

BSD-3-Clause — see LICENSE.

Not affiliated with or endorsed by Google or Apple. Flutter is a trademark of Google LLC; Apple Watch and watchOS are trademarks of Apple Inc.

About

Flutter on Apple Watch: 17 watchOS plugin packages running live, a native SwiftUI platform view, and a fragment-shader gallery. Built with flutter-watchos.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages