Flutter 编译错误 "The integer literal 9223372036854775807 can't be represented exactly in JavaScript"

Flutter compile error "The integer literal 9223372036854775807 can't be represented exactly in JavaScript"

我正在尝试构建我的 flutter 应用程序并抛出编译错误,基于错误,它似乎是 flutter 文件而不是我的代码。知道如何解决这个问题吗?

PS C:\Users\FlutterProject\tirthankar> flutter build web
Target dart2js failed: Exception: /C:/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-3.4.0+1/lib/src/X509Certificate/asn1_decoder.dart:163:25:
Error: The integer literal 9223372036854775807 can't be represented exactly in JavaScript.
    int int64MaxValue = 9223372036854775807;
                        ^^^^^^^^^^^^^^^^^^^
Error: Compilation failed.


Compiling lib\main.dart for the Web...                             18.3s
Exception: Failed to compile application for the Web.
PS C:\Users\FlutterProject\tirthankar>

下面是 dart/flutter 中失败的代码。

static List<int> loadSubContent({@required Iterator<int> iterator}) {
    var len = getContentLength(iterator: iterator);
    int int64MaxValue = 9223372036854775807;

    if (len >= BigInt.from(int64MaxValue)) {
      return <int>[];
    }

    var byteArray = <int>[];

    for (var i = 0; i < len.toInt(); i++) {
      if (iterator.moveNext()) {
        var n = iterator.current;
        if (n != null) {
          byteArray.add(n);
        }
      } else {
        throw ASN1OutOfBufferError();
      }
    }

    return byteArray;
  }

我相信 int 的范围在 2^62 和 -2^62-1 之间,我知道您已经达到了 64 位机器可以表示的 int 值的极限,但是您是否尝试过使用classBigInt从头开始BigInt bi = BigInt.parse("9223372036854775807");