xclud / dart_crc

MIT License
2 stars 2 forks source link

Exception #1

Open AndyAls opened 1 year ago

AndyAls commented 1 year ago

the packages has not completed?

vdaele commented 1 year ago

When running the example code (on Flutter web) int crc16 = crc.xmodem.calculate(data); I also get an exception

Error: UnimplementedError
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 266:49  throw_
packages/crc/src/crc16.dart 17:5                                              calculate
tattivitorino commented 1 year ago

whats the point of this package? both calculate methods (xmodem and ccitt) throw UnimplementedError() :(((((

import 'dart:typed_data';

const xmodem = XModem._();
const ccitt = CCITT._();

abstract class CRC16 {
  const CRC16();

  int calculate(Uint8List input);
}

class XModem extends CRC16 {
  const XModem._();

  @override
  int calculate(Uint8List input) {
    throw UnimplementedError();
  }
}

class CCITT extends CRC16 {
  const CCITT._();

  @override
  int calculate(Uint8List input) {
    throw UnimplementedError();
  }
}
pavel0001 commented 4 months ago

Same error. It look like prank