fluttercommunity / font_awesome_flutter

The Font Awesome Icon pack available as Flutter Icons

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Configurator Error when Using Pro Icons

MatthewJones517 opened this issue · comments

So, I've looked through the code of this package and I don't see a huge reason to upgrade based on our use case. Still, SecOps gets squeamish when they see old version numbers. Consequently I'm trying to upgrade our local copy of this package to the latest version while keeping the old pro icon set that our app is actually using.

I've been following the instructions, and when it comes time to run the configurator I get the following error:

Downloading https://api.github.com/repos/fluttercommunity/font_awesome_flutter/releases
Unhandled exception:
type '_Map<String, dynamic>' is not a subtype of type 'List<dynamic>'
#0      printVersionNotice (file:///Users/mjones3/Desktop/font_awesome_flutter/util/lib/main.dart:487:10)
<asynchronous suspension>
#1      main (file:///Users/mjones3/Desktop/font_awesome_flutter/util/lib/main.dart:96:3)
<asynchronous suspension>

To reproduce:

  1. Clone a local copy of this repo.
  2. Run flutter pub get inside the repo.
  3. Copy the version 5 TTF webfonts to /lib/fonts (we're using 5.15.4)
  4. Run the configurator (We're doing ./configurator.sh --dynamic --exclude brands,duotone)

After completing these steps, the error above appears. It looks like the following line is causing the issue in /util/lib/main.dart
List releasesData = json.decode(rawReleasesData);

It looks like the GIthub release data changed from a List to a Map at some point? I haven't dug any further to figure out what's going on.

Closing this. It turns out the issue is I forgot to copy in the icons.json file.

We could probably do with a better error message in this situation. If I have time I'll whip up a PR and submit.