create static method

Future<HardwareKey> create(
  1. String label, {
  2. bool biometric = false,
  3. HardwareBackend? backend,
})

Creates the key for label; throws exists if it is already there. backend overrides the platform module, for tests.

Implementation

static Future<HardwareKey> create(
  String label, {
  bool biometric = false,
  HardwareBackend? backend,
}) async {
  final b = backend ?? createPlatformBackend();
  final backing = await b.create(label, biometric: biometric);
  return HardwareKey._(label, backing, b);
}