# addGroupKeyA method

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

1. required int groupKeyA,

})

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

If the provided `groupKeyA` is 0, it clears the group key A from the secure storage and invokes the `SmartfaceMobile.clearGroupKeyA` native method. Otherwise, it adds the group key A to the secure storage and invokes the `SmartfaceMobile.addGroupKeyA` native method with the provided `groupKeyA`.

Parameters:

- `groupKeyA`: The group key A to be added. If it is 0, the group key A will be cleared.

Returns: A Future that completes with an Either containing a String error message or a dynamic result.

## Implementation

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

      if (groupKeyA == 0) {
        return invokeNativeMethod('SmartfaceMobile.clearGroupKeyA');
      }

      return invokeNativeMethod('SmartfaceMobile.addGroupKeyA', {
        'arg0': groupKeyA,
      });
    }