commit method

Future<bool> commit()

Communicate changes made through this class to the native SDK.

Implementation

Future<bool> commit() async {
  final enabledPurposes = _purposesStatus.entries.where((e) => e.value).map((e) => e.key).toList();
  final disabledPurposes = _purposesStatus.entries.where((e) => !e.value).map((e) => e.key).toList();
  final enabledVendors = _vendorsStatus.entries.where((e) => e.value).map((e) => e.key).toList();
  final disabledVendors = _vendorsStatus.entries.where((e) => !e.value).map((e) => e.key).toList();

  return await _nativeCallback(enabledPurposes, disabledPurposes, enabledVendors, disabledVendors);
}