requestPermission static method Null safety

Future<bool> requestPermission(
  1. {bool force = false}

Requests the required platform permission to read contacts and returns whether the permission was granted or not

On Android 11+ and all xiaomi devices this will request the Manifest.permission.READ_CONTACTS permission On Android 10 and prior and iOS this will always return true On Web this will throw an UnsupportedError as web implementation does not have permissions


static Future<bool> requestPermission(

        /// Whether permission should be requested anyways even if [hasPermission] returns true or not
        bool force = false}) async =>
    ContactPickerPlatform.instance.requestPermission(force: force);