setDeviceMeta method
Set the device meta
Implementation
Future<void> setDeviceMeta() async {
DeviceMeta deviceMeta =
await DeviceMeta.init(storageKey: "woosignal_woocommerce");
if (kIsWeb) {
_deviceMeta = {
"model": 'X Model',
"brand": 'X Brand',
"manufacturer": "X Manufacturer",
"version": 'X Version',
"uuid": '1234567890',
"platform_type": "web",
"api_version": "$_version/v1",
"sdk_name": "woosignal-woocommerce"
};
return;
}
if (Platform.environment.containsKey('FLUTTER_TEST')) {
_deviceMeta = {
"model": 'X Model',
"brand": 'X Brand',
"manufacturer": "X Manufacturer",
"version": 'X Version',
"uuid": '1234567890',
"platform_type": "testing",
"api_version": "$_version/v1",
"sdk_name": "woosignal-woocommerce"
};
return;
}
_deviceMeta = {
"model": deviceMeta.model,
"brand": deviceMeta.brand,
"manufacturer": deviceMeta.manufacturer,
"version": deviceMeta.version,
"uuid": deviceMeta.uuid,
"platform_type": deviceMeta.platformType,
"api_version": "$_version/v1",
"sdk_name": "woosignal-woocommerce"
};
}