# addGroupKeyB method

Future<Either<String, dynamic>> addGroupKeyB({

1. required int groupKeyB,

})

Adds a group key B to the secure storage and invokes the corresponding native method.

If the provided `groupKeyB` is 0, it clears the group key B from the secure storage and invokes the `SmartfaceMobile.clearGroupKeyB` native method. Otherwise, it adds the `groupKeyB` to the secure storage and invokes the `SmartfaceMobile.addGroupKeyB` native method with the provided `groupKeyB`.

Args: groupKeyB (int): The group key B to be added. If 0, the group key B will be cleared.

Returns: Future<Either<String, dynamic>>: A future that resolves to an Either containing a String error message or a dynamic result from the native method invocation.

## Implementation

    Future<Either<String, dynamic>> addGroupKeyB({required int groupKeyB}) async {
      await _secureStorageWrite(
        key: 'groupKeyB',
        value: groupKeyB == 0 ? '' : groupKeyB.toString(),
      );

      if (groupKeyB == 0) {
        return invokeNativeMethod('SmartfaceMobile.clearGroupKeyB');
      }

      return invokeNativeMethod('SmartfaceMobile.addGroupKeyB', {
        'arg0': groupKeyB,
      });
    }