changeName method

Future<bool> changeName (
  1. String name
)

Sets the friendly Bluetooth name of the local Bluetooth adapter.

This name is visible to remote Bluetooth devices.

Valid Bluetooth names are a maximum of 248 bytes using UTF-8 encoding, although many remote devices can only display the first 40 characters, and some may be limited to just 20.

Does not work for third party applications starting at Android 6.0.

Implementation

Future<bool> changeName(String name) =>
    _methodChannel.invokeMethod("setName", {"name": name});