FlutterWatchOsConnectivity class
- Inheritance
-
- Object
- PlatformInterface
- FlutterSmartWatchPlatformInterface
- FlutterWatchOsConnectivity
Methods
-
configureAndActivateSession()
→ Future
-
Init and activate
WatchConnectivity
session
-
dispose()
→ void
-
override
-
getActivateState()
→ Future<ActivationState>
-
Get current
ActivateState
of WatchConnectivity
session
-
getApplicationContext()
→ Future<ApplicationContext>
-
Return the current ApplicationContext context of session
ApplicationContext is a map data which is synced across of IOS app and WatchOS app
-
getInProgressFileTransfers()
→ Future<List<FileTransfer>>
-
Retrieve a List of on progress FileTransfer
-
getInProgressUserInfoTransfers()
→ Future<List<UserInfoTransfer>>
-
Retrieve pending user info transfers.
-
getPairedDeviceInfo()
→ Future<WatchOsPairedDeviceInfo>
-
Get paired WatchOS device info
-
getReachability()
→ Future<bool>
-
Check whether the WatchOS companion app is in the foreground
If getReachability return true, the companion app is in the foreground, otherwise the companion app is in background or is teminated.
-
getRemainingComplicationUserInfoTransferCount()
→ Future<int>
-
Retrieve remaining transfer count, use this method to determine that you should send a
Complication
user info data.
-
isSupported()
→ Future<bool>
-
Check if your IOS device is supported to connect with WatchOS device
override
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
sendMessage(Map<String, dynamic> message, {MessageReplyHandler? replyHandler})
→ Future<void>
-
Send message to companion app, message can only be sent if getReachability is true
-
toString()
→ String
-
A string representation of this object.
inherited
-
transferFileInfo(File file, {Map<String, dynamic> metadata = const {}})
→ Future<FileTransfer?>
-
Transfer a File to WatchOS companion app
-
transferUserInfo(Map<String, dynamic> userInfo, {bool isComplication = false})
→ Future<UserInfoTransfer?>
-
Transfer user information.
-
updateApplicationContext(Map<String, dynamic> applicationContext)
→ Future
-
Update and sync the ApplicationContext.
ApplicationContext works like the common data between both WatchOS and IOS app,
which can be updated by calling updateApplicationContext method and synced via applicationContextUpdated.
You can call this method either the WatchOS companion app is in background or foreground