Brings the BLE peripheral-mode migration to universal_ble 2.0.0 into the
WiFi DirCon trainer-discovery branch and bumps universal_ble to the latest
fork commit (ref: changes, 2.0.0).
Conflict resolutions:
- prop submodule: merged the universal_ble 2.0 transporter migration with
the WiFi DirCon TrainerTransport refactor; kept the '0x' short-UUID
normalisation on startAdvertising. Updated BleCharacteristic call sites
to the new 3-arg (uuid, properties, descriptors) constructor.
- obc_ble_emulator.dart: took the PeripheralServer / universal_ble 2.0
write-handler migration; kept the richer Error(button:) context on
sendAction (using _currentDeviceId, the migrated connection tracker).
- unlock.dart: kept the main.dart import.
- pubspec.yaml: kept version 6.0.0+135; took ref: changes for universal_ble.
Pre-existing prop test failures (composite/dircon/fitness serviceUUIDs) are
unchanged by this merge — they fail identically on the pre-merge branch.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Drop bluetooth_low_energy. Move OBC BLE emulator, Zwift emulator, and
the remote mouse / keyboard pairing flows onto a new PeripheralServer
wrapper around UniversalBlePeripheral that routes per-characteristic
read/write handlers, so multiple peripheral instances coexist without
clobbering universal_ble's process-wide handlers.
Also: onValueChange callback gains a timestamp param (v1.0.0 breaking
change), PeripheralManager().showAppSettings() → openAppSettings(),
UUID.short(0x12) → literal UUID, and prop submodule bumped to the
matching universal_ble peripheral rewrite.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Drop desktop_multi_window entirely; unify macOS + Windows on
multi_window_native. Windows runner re-gets the CreateNewWindow /
CloseWindow / SetMainWindowMethodHandler plumbing with selective
sub-engine registration (only WindowManagerPlugin +
MultiWindowNativePlugin) to avoid the deadlock caused by full
RegisterPlugins on secondary engines. macOS MainFlutterWindow narrows
onEngineCreatedCallback from RegisterGeneratedPlugins to the same two
plugins for consistency.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add `desktop_multi_window: ^0.3.0` alongside `multi_window_native: ^1.0.4`.
On Windows the sub-window is now spawned via `WindowController.create` with a
JSON `role=trainer-overlay` argument (detected in `main()` before any heavy
bootstrap), and state/actions flow over `WindowMethodChannel(kOverlayChannel)`.
macOS continues using `MultiWindowNative.createWindow` / `notifyAllWindows` /
`registerListener` unchanged.
Windows runner reverts all `multi_window_native` plumbing:
`SecondaryWindowContext`, `CreateNewWindow`, `CloseWindow`,
`SetMainWindowMethodHandler`, and the plugin source compiled directly into the
runner are removed. `flutter_window.cpp` instead registers
`DesktopMultiWindowSetWindowCreatedCallback` so every sub-engine gets plugins.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Drops desktop_multi_window 0.3.0 in favour of multi_window_native 1.0.4
on a new branch (feature/trainer-overlay-multi-window-native).
Mechanism is different but the responsibilities map cleanly:
- `MultiWindowNative.createWindow([routeName, argsJson, theme])` spawns
the sub-window; main() detects it via the first arg.
- Communication is broadcast by method name through
`notifyAllWindows` + `registerListener`. Conventions:
main → overlay: trainerOverlay.state
overlay → main: trainerOverlay.action / ready / positionChanged
Each side filters by method name; the API has no per-window targeting.
- The overlay window grabs its windowId via `windowManager.getId()` and
broadcasts `trainerOverlay.ready` so the controller can later close it.
- `notifyUiRendered()` is called after the first frame, per the package's
black-screen workaround on macOS/Windows.
Native shims:
- macOS MainFlutterWindow.swift: re-register plugins on every new
sub-engine via `MultiWindowNativePlugin.onEngineCreatedCallback`. Kept
the `.statusBar` / `.fullScreenAuxiliary` elevation for visibility
above fullscreened trainer apps; the callback now finds the new
sub-window's NSWindow by matching the FlutterViewController's engine.
- Windows flutter_window.cpp: reverted the desktop_multi_window callback;
multi_window_native's Windows wiring requires a more invasive
flutter_window.h / cpp change (SetOnCloseCallback, GetFlutterViewController,
callback registration in main.cpp) which is TBD. The overlay is only
verified on macOS in this branch.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Add desktop_multi_window ^0.3.0 alongside window_manager. Update
macos/Runner/MainFlutterWindow.swift with the FlutterMultiWindowPlugin
window-created callback so sub-window engines register all generated
plugins automatically. Also includes flutter pub get generated changes to
linux/windows/macos plugin registrants.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>