VeryGoodOpenSource / flutter_web_preloader

A brick that creates a smart web entrypoint for Flutter and preloads any type of asset before starting an app.
https://brickhub.dev/bricks/flutter_web_preloader/0.2.0
MIT License
77 stars 7 forks source link

refactor: use the `fetch` API #33

Closed lishaduck closed 1 month ago

lishaduck commented 1 month ago

Status

READY

Description

Rewrote it all! :)

In more seriousness: 1) Uses the fetch API uniformly. 2) Adds a new use of await and removes a usage of async. Neither should actually affect the behavior. 3) Moved some code's scope to make it cleaner.

Probably review one-commit-at-a-time?

Closes: #32

Type of Change

lishaduck commented 1 month ago

Oh, another thing is that this is in sloppy mode, probably worth adding a "use strict" directive. I don't particularly want to file another PR, but if y'all want to keep this small(er), I don't mind if y'all add it yourselves.

wolfenrain commented 1 month ago

Oh, another thing is that this is in sloppy mode, probably worth adding a "use strict" directive. I don't particularly want to file another PR, but if y'all want to keep this small(er), I don't mind if y'all add it yourselves.

I am not against adding that here directly, afaik it is just a one-liner right?