IntKind class final
- Inheritance
- Mixed-in types
Constructors
-
IntKind({bool isUnsigned = false, int bits = bitsWhenJsCompatible, int? min, int? max, List<
Trait> ? traits}) -
Constructs a Kind for a signed int.
const
- IntKind.exactly(int value)
-
A shorthand for expressing that an int must be equal to
value
.const -
IntKind.int16({int? min, int? max, List<
Trait> ? traits}) -
Constructs a Kind for a signed 16 bit int.
const
-
IntKind.int32({int? min, int? max, List<
Trait> ? traits}) -
Constructs a Kind for a signed 32 bit int.
const
-
IntKind.int64({int? min, int? max, List<
Trait> ? traits}) -
Constructs a Kind for a signed 64 bit int.
const
-
IntKind.int8({int? min, int? max, List<
Trait> ? traits}) -
Constructs a Kind for a signed 8 bit int.
const
-
IntKind.uint16({int min = 0, int? max, List<
Trait> ? traits}) -
Constructs a Kind for an unsigned 16 bit int.
const
-
IntKind.uint32({int min = 0, int? max, List<
Trait> ? traits}) -
Constructs a Kind for an unsigned 32 bit int.
const
-
IntKind.uint64({int min = 0, int? max, List<
Trait> ? traits}) -
Constructs a Kind for an unsigned 64 bit int.
const
-
IntKind.uint8({int min = 0, int? max, List<
Trait> ? traits}) -
Constructs a Kind for an unsigned 8 bit int.
const
-
IntKind.unsigned({int bits = bitsWhenJsCompatibleUnsigned, int min = 0, int? max, List<
Trait> ? traits}) -
Constructs a Kind for an unsigned int.
const
Properties
- bits → int
-
Maximum number of bits.
final
- dartType → Type
-
Type
T
.no setterinherited - defaultValueMirror → InstanceMirror
-
InstanceMirror for the default value.
no setterinherited
- equality → Equality
-
Equality for the kind;
no setterinherited
-
examples
→ Iterable<
int> -
Examples of instances that are valid (isValidDynamic).
no setterinherited
-
examplesThatAreInvalid
→ Iterable<
int> -
Examples of instances that are NOT valid (isValidDynamic).
no setterinherited
-
examplesWithoutValidation
→ Iterable<
int> -
Interesting examples of instances (may be valid or invalid).
no setteroverride
- hashCode → int
-
The hash code for this object.
no setteroverride
- isJsCompatible → bool
-
Whether all values of this kind can be represented as a double.
no setter
- isNullable → bool
-
Whether this kind is nullable.
no setterinherited
- isPrimitive → bool
-
Whether instances of the kind can't have references to other instances.
no setterinherited
- isUnsigned → bool
-
Whether the integer is unsigned.
final
- jsonName → String?
-
JSON identifier of the class.
finalinherited
- max → int?
-
Maximum value.
final
- min → int?
-
Minimum value.
final
- name → String
-
Dart identifier of the class.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
traits
→ List<
Trait> -
Traits of the kind.
finalinherited
Methods
-
asType(
Object? value) → int -
Casts
value
toT
.inherited -
checkDeclaration(
) → void -
Checks that the declaration makes sense.
inherited
-
checkInstance(
Object? value) → void -
inherited
-
checkValid(
int instance, {String? label}) → void -
override
-
checkValidDynamic(
Object? instance) → void -
Throws ArgumentError error if
instance
is not valid (isValidDynamic).inherited -
clone(
int instance) → int -
Clones the instance.
inherited
-
compare(
int left, int right) → int -
Compares two values.
inherited
-
debugString(
int instance) → String -
Constructs a string for debugging
instance
.inherited -
decodeJsonTree(
Object? json) → int -
Converts
json
(any JSON tree) to an instance ofT
.override -
decodeString(
String string) → int -
Decodes
string
to an instance ofT
.override -
encodeJsonTree(
int instance) → Object? -
Converts
instance
to a JSON tree.override -
encodeString(
int instance) → String -
Converts
instance
to a string.override -
isDefaultValue(
Object? instance) → bool -
Determines whether the argument is a default value of this kind.
inherited
-
isInstance(
Object? instance) → bool -
Determines whether the argument is an instance of
T
.inherited -
isInstanceOfList(
Object? instance) → bool -
Determines whether the argument is an instance of
List<T>
.inherited -
isInstanceOfSet(
Object? instance) → bool -
Determines whether the argument is an instance of
Set<T>
.inherited -
isNullableSubKind(
Kind other, {bool andNotEqual = true}) → bool -
Tells whether the argument is instance of
Kind<T>
and dartType values are different.inherited -
isSubKind(
Kind other, {bool andNotEqual = true}) → bool -
Tells whether the argument is instance of
Kind<T>
and dartType values are different.inherited -
isValid(
int instance) → bool -
Tells whether the instance is valid.
override
-
isValidDynamic(
Object? instance) → bool -
Tells whether the instance is valid.
inherited
-
memorySize(
int value) → int -
Estimates memory usage of
instance
.inherited -
memorySizeWith(
MemoryCounter counter, int value) → void -
Estimates memory usage with an instance of MemoryCounter.
inherited
-
newInstance(
) → int -
Constructs a new instance of the default value.
override
-
newList(
int length, {bool growable = true}) → List< int> -
Constructs a new list.
override
-
newListFrom(
Iterable< int> iterable, {bool growable = true}) → List<int> -
Constructs a new list from
iterable
.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
permute(
int instance) → int -
Generates another instance with some deterministic function.
override
-
register(
) → void -
Registers this kind so that it will be visible in Kind.all.
inherited
-
toList(
) → Kind< List< int> > -
Constructs Kind for
List<T>
.inherited -
toNonNullable(
) → Kind< int> -
Returns a non-nullable kind.
inherited
-
toNullable(
) → Kind< int?> -
Constructs Kind for
T?
.inherited -
toPolymorphic(
) → PolymorphicKind< int> -
Constructs a PolymorphicKind for this kind.
inherited
-
toSet(
) → Kind< Set< int> > -
Constructs Kind for
Set<T>
.inherited -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
maxWhenBits(
int bits, {required bool isUnsigned}) → int - Maximum value.
-
minWhenBits(
int bits, {bool isUnsigned = false}) → int - Minimum value
Constants
- bitsWhenJsCompatible → const int
- Value of bits when a signed integer is small enough to fit into a double.
- bitsWhenJsCompatibleUnsigned → const int
- Value of bits when an unsigned integer is small enough to fit into a double.
-
kindForKind
→ const ImmutableKind<
IntKind> - Kind for IntKind.