Home > Net >  flutter type 'int' is not a subtype of type 'Int64?'
flutter type 'int' is not a subtype of type 'Int64?'

Time:10-27

How to initialize an Int64 number in dart

I want this number to be an Int64 number.

Int64 secs = Int64(5);

But I get this warning

A value of type 'int' can't be assigned to a variable of type 'Int64'.
Try changing the type of the variable, or casting the right-hand type to 

CodePudding user response:

You can try using BigInt from dart core.

Also Int64 from fixnum.

 Int64 secs = Int64(5);
  • Related