• Latest
  • Hot
  • Ask
  • Full Apps
  • Ui
  • Packages
Ask August 11,2021

same code but error on web version in flutter. Why?

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


Solution 1: Klaus Greiner Fiorini

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


Twitter Facebook Reddit Hacker News LinkedIn Email

Most Viewed

Netflix UI Clone Build with Flutter and BloC

GitJournal - Markdown Notes Build with Fluter

How to debug multiple widgets used the same GlobalKey

Sign in up takes so long time to load from firebase

Featured Articles

Catagories

  • Ask63292
  • Full Apps40
  • Ui5
  • Packages2
  • Game2
  • Template0
  • flutter
  • flutter-layout
  • json
  • serialization
  • dart
  • flutter-cupertino
  • firebase-cloud-messaging
  • location
  • background-process
  • textfield
  • flutter-dependencies
  • android-studio
  • configuration
  • dart-sdk
  • android
  • nosuchmethoderror
  • authentication
  • amazon-web-services
  • api
  • aws-api-gateway
  • aws-amplify
  • layout
  • appbar
  • bottombar
  • flutter-sliver
  • sqflite
  • networkimageview
  • rive
  • mobile-application
  • hardware
  • flutter-packages
  • woocommerce-rest-api
  • agora.io
  • resources
  • apk
  • animation
  • timestamp
  • firebase
  • google-cloud-firestore
  • web
  • widget
  • flutter-web
  • stream-builder
  • logging
  • firebase-authentication
  • listview
  • horizontal-scrolling
  • flutter-widget
  • maps
  • ethereum
  • metamask
  • sql-server
  • pos
  • filter
  • row
  • youtube-player-flutter
  • cart
  • javascript
  • document
  • Privacy Policy
  • Submit Project
© Copyright © All rights reserved
Licensed under cc by-sa 3.0 with attribution required.

Catagories

  • Ask
  • Full Apps
  • Ui
  • Packages

Join our Newsletter