Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

flutter type 'int' is not a subtype of type 'Int64?'

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

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

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 

>Solution :

You can try using BigInt from dart core.

Also Int64 from fixnum.

 Int64 secs = Int64(5);
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading