flutter_web_preloader icon indicating copy to clipboard operation
flutter_web_preloader copied to clipboard

refactor: use the `fetch` API

Open lishaduck opened this issue 1 year ago โ€ข 2 comments

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

  • [ ] โœจ New feature (non-breaking change which adds functionality)
  • [ ] ๐Ÿ› ๏ธ Bug fix (non-breaking change which fixes an issue)
  • [ ] โŒ Breaking change (fix or feature that would cause existing functionality to change)
  • [x] ๐Ÿงน Code refactor
  • [ ] โœ… Build configuration change
  • [ ] ๐Ÿ“ Documentation
  • [ ] ๐Ÿ—‘๏ธ Chore

lishaduck avatar Sep 23 '24 02:09 lishaduck

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.

lishaduck avatar Sep 27 '24 19:09 lishaduck

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?

wolfenrain avatar Oct 03 '24 13:10 wolfenrain