onRegister method
Callback method when this package is being registered.
Implementation
@override
void onRegister() {
// register all data types
FromJsonFactory().registerAll([
Connectivity(),
Bluetooth(),
Wifi(),
BeaconData(region: ''),
BluetoothScanPeriodicSamplingConfiguration(
interval: const Duration(minutes: 10),
duration: const Duration(seconds: 10),
),
BeaconRangingPeriodicSamplingConfiguration(
beaconDistance: 2, beaconRegions: [])
]);
// registering default privacy functions
DataTransformerSchemaRegistry()
.lookup(PrivacySchema.DEFAULT)!
.add(BLUETOOTH, bluetoothNameAnonymizer);
DataTransformerSchemaRegistry()
.lookup(PrivacySchema.DEFAULT)!
.add(WIFI, wifiNameAnonymizer);
}