canonical / ubuntu-flutter-plugins

A collection of Flutter plugins and packages for Ubuntu applications.
46 stars 11 forks source link

feat: providing an optional render when an icon fails to resolve entirely #388

Closed mattkae closed 5 months ago

mattkae commented 5 months ago

Reopening of https://github.com/canonical/ubuntu-flutter-plugins/pull/385 with signed commits

What's new?

Motivation

We might want to show some sort of nice "Icon not found" icon when it is unavailable on a system for any reason.

Example usage

return XdgIcon(
        name: iconName,
        size: size,
        iconNotFoundBuilder: () {
          return SizedBox(
              width: size.toDouble(),
              height: size.toDouble(),
              child: Center(
                  child: Text(
                      iconName.isEmpty ? "U" : iconName[0].toUpperCase(),
                      style: Theme.of(context).textTheme.displayLarge)));
        });
mattkae commented 5 months ago

@spydon The work is over here now. Moved to fast and broke my history when I amended the commits for signing. Should be all good over here :+1:

spydon commented 5 months ago

@mattkae now you used the wrong e-mail instead, this one isn't connected to your launchpad account (your canonical e-mail that you had before was fine) :sweat_smile:

mattkae commented 5 months ago

@mattkae now you used the wrong e-mail instead, this one isn't connected to your launchpad account (your canonical e-mail that you had before was fine) 😅

That wasn't the one used to sign my key though :joy: Too much context switching. Maybe I'll make a canonical key and resign...

spydon commented 5 months ago

@mattkae you can also login to your launchpad account and add the other e-mail there as well, that's probably easier and less error prone for the future :)

mattkae commented 5 months ago

@mattkae you can also login to your launchpad account and add the other e-mail there as well, that's probably easier and less error prone for the future :)

Hm I had already added my new email to the account, but to no avail. Maybe I'll try forcing the CI to rerun

mattkae commented 5 months ago

@spydon Okay that should be all good now :)

spydon commented 5 months ago

@mattkae your change was released in v0.0.5 :)

mattkae commented 5 months ago

@spydon Thanks a bunch :)

mattkae commented 5 months ago

@spydon Does that take a bit to publish to pub.dev?

spydon commented 5 months ago

@spydon Does that take a bit to publish to pub.dev?

Ooh, seems like I only did the dry run, published it properly now!

mattkae commented 5 months ago

@spydon Thanks very much :smile: