0

in my flutter app when data adding from web version its shows error like this on mobile. but works fine on web, I use firebase as backend. why this is happeninghere is the picture

1
  • I had this issue, just cast to `in. It may happen because of render engine. Aug 11, 2021 at 14:43

1 Answer 1

1

Since web is transpiled to javascript, that has a type number (which receives both double and int). That problem maybe solved if you cast to right type.

You can learn more about how dart handles numbers in here: https://dart.dev/guides/language/numbers

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.