【问题标题】:How to convert int into Uint32 in flutter如何在flutter中将int转换为Uint32
【发布时间】:2019-08-13 08:39:09
【问题描述】:

有没有办法将整数转换为 Uint32 格式。

int x = 94;
Uint32 y = x.toUint32(); ///Pseudocode

【问题讨论】:

  • flutter 只有int 类,没有Uint32 类——你的意思是Uint32ListUint32Buffer 可能吗?

标签: flutter dart type-conversion int uint32


【解决方案1】:

Dart 没有无符号整数。

但是,您可以使用 BigInt 并在对它执行每次操作后使用 toUnsigned(32)

【讨论】:

    猜你喜欢
    • 2014-10-24
    • 2016-02-17
    • 2017-10-15
    • 2020-03-25
    • 1970-01-01
    • 2017-02-20
    • 2016-07-20
    • 1970-01-01
    • 2011-11-14
    相关资源
    最近更新 更多