polyicon icon indicating copy to clipboard operation
polyicon copied to clipboard

Allow multiplatform icons

Open danielgomezrico opened this issue 3 years ago • 0 comments

Sometimes there are icons that works for android but on iOS are different by their patterns, like share button:

  • Android: image

  • iOS: image

It will be cool if we can check from the UI if there are multiple version of the same icon per platform, and then it generates something like:

static const IconData ic_share_android =
      IconData(0xe80f, fontFamily: _kFontFam, fontPackage: _kFontPkg);

static const IconData ic_share_ios =
      IconData(0xe82a, fontFamily: _kFontFam, fontPackage: _kFontPkg);

static IconData get ic_share {
    return Platform.isIOS ? ic_share_ios : ic_share_android;
}

So the code should check the platform by himself "automatically" and show the proper icon on each side.

That's just an Idea that may help in the proccess

danielgomezrico avatar Jan 07 '21 20:01 danielgomezrico