shareAppViaBluetooth method
This method redirects users to choose a receiver device from a list of all discoverable devices and then send the file.
Implementation
Future<String?> shareAppViaBluetooth(String packageName) async {
try {
String? shareResult = await _channel.invokeMethod(
"shareAppViaBluetooth",
{"packageName": packageName},
);
return shareResult;
} on PlatformException catch (e) {
throwError(e, "sharing an app");
return "UnexpectedError";
}
}