Spec-Zone.ru › Dart 2

dart:core

isValidInt property

bool isValidInt

Whether this big integer can be represented as an int without losing precision.

Warning: this function may give a different result on dart2js, dev compiler, and the VM, due to the differences in integer precision.

Example:

var bigNumber = BigInt.parse('100000000000000000000000');
print(bigNumber.isValidInt); // false

var value = BigInt.parse('0xFF'); // 255
print(value.isValidInt); // true

Implementation

bool get isValidInt;

© 2012 the Dart project authors
Licensed under the BSD 3-Clause "New" or "Revised" License.
https://api.dart.dev/stable/2.19.6/dart-core/BigInt/isValidInt.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API