handleMethodCall method
Implementation
Future<dynamic> handleMethodCall(MethodCall call) async {
switch (call.method) {
case 'getDeviceId':
return WebUtils.getBrowserId();
case 'getDeviceModel':
return WebUtils.getBrowserName();
case 'getTotalRam':
return WebUtils.getRam();
case 'getCpuInfo':
return WebUtils.getCpu();
case 'getOsVersion':
return WebUtils.getPlatform();
case 'getManufacturer':
return 'Browser Vendor';
case 'getBrand':
return 'Web';
case 'getTotalStorage':
return 'Not Accessible on Web';
default:
throw PlatformException(
code: 'Unimplemented',
details:
'flutter_device_inspector for web doesn\'t implement \'${call.method}\'',
);
}
}