canRequestPinWidget static method
Whether requestPinWidget can do anything on this device.
False on iOS (no such API exists) and on Android launchers that do not implement widget pinning. Use it to decide between showing an "Add to Home Screen" button and showing manual instructions.
Implementation
static Future<bool> canRequestPinWidget() async {
try {
return await _channel.invokeMethod<bool>('canRequestPinWidget') ?? false;
} on MissingPluginException {
return false;
} on PlatformException {
return false;
}
}