firebase / flutterfire

🔥 A collection of Firebase plugins for Flutter apps.
https://firebase.google.com/docs/flutter/setup
BSD 3-Clause "New" or "Revised" License
8.44k stars 3.91k forks source link

fix(web): fixing some uncorrect type casting for Web #12696

Closed Lyokone closed 3 weeks ago

Lyokone commented 3 weeks ago

Description

Taking values from JSON and directly casting them to int or double makes them incompatible with dart2wasm, since in wasm they are two distinct types (as opposed to JavaScript where they are actually the same under the hood).

Related Issues

Replace this paragraph with a list of issues related to this PR from the issue database. Indicate, which of these issues are resolved or fixed by this PR. Note that you'll have to prefix the issue numbers with flutter/flutter#.

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process. Updating the pubspec.yaml and changelogs is not required.

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?