feat(watch): clôture lot #91 - fréquence cardiaque live, notifications de séance et finitions montre
Consolide le lot applicatif watch companion validé : - télémétrie fréquence cardiaque live remontée montre -> téléphone (collecteur watch, adapter Wear Data Layer, persistance Drift, propagation aux écrans historique/programme/profil/exécution) - notifications de séance en arrière-plan côté téléphone (service foreground de statut + passerelle applicative) - finitions montre : chrono d'étape, score d'étape, retrait du bouton "lancer une séance", thème, icônes et polices watch_app Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@ -0,0 +1 @@
|
||||
export 'session_notification_gateway.dart';
|
||||
@ -0,0 +1,33 @@
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import '../../application/application.dart';
|
||||
|
||||
final class MethodChannelSessionNotificationGateway
|
||||
implements SessionNotificationGateway {
|
||||
const MethodChannelSessionNotificationGateway({
|
||||
MethodChannel methodChannel = const MethodChannel(_methodChannelName),
|
||||
}) : _methodChannel = methodChannel;
|
||||
|
||||
static const _methodChannelName = 'gametime.session_notification/methods';
|
||||
|
||||
final MethodChannel _methodChannel;
|
||||
|
||||
@override
|
||||
Future<void> show(SessionNotificationContent content) {
|
||||
return _invokeIgnoringMissingPlugin('show', content.toJson());
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> clear() {
|
||||
return _invokeIgnoringMissingPlugin('clear');
|
||||
}
|
||||
|
||||
Future<void> _invokeIgnoringMissingPlugin(
|
||||
String method, [
|
||||
Object? arguments,
|
||||
]) {
|
||||
return _methodChannel
|
||||
.invokeMethod<void>(method, arguments)
|
||||
.onError<MissingPluginException>((_, _) {});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user