handleMethodCall method

Future handleMethodCall(
  1. MethodCall call
)

Implementation

Future<dynamic> handleMethodCall(MethodCall call) async {
  switch (call.method) {
    case 'decodeFile':
      return decodeFile(call.arguments['filename']);
    case 'setBarcodeFormats':
      return setBarcodeFormats(call.arguments['formats']);
    case 'getParameters':
      return getParameters();
    case 'setParameters':
      return setParameters(call.arguments['params']);
    case 'init':
      return initBarcodeSDK();
    case 'setLicense':
      return setLicense(call.arguments['license']);
    case 'decodeImageBuffer':
      return decodeImageBuffer(
          call.arguments['bytes'],
          call.arguments['width'],
          call.arguments['height'],
          call.arguments['stride'],
          call.arguments['format']);
    default:
      throw PlatformException(
        code: 'Unimplemented',
        details:
            'flutter_barcode_sdk for web does not implement method: \'${call.method}\'',
      );
  }
}