appinioGmbH / flutter_packages

Dart and Flutter plugins/packages used and maintained by @appinioGmbH
193 stars 224 forks source link

[appinio_social_share] [iOS] Background Color is not submitted to Instagram story share #137

Closed Linaks closed 1 year ago

Linaks commented 1 year ago

I tried to share a picture with a background color to Instagram stories, but it doesn't work on iOS. On Android it works as intended. Does anyone know what's the issue for that?

khanmujeeb687 commented 1 year ago

Hey @Linaks , I just tested the latest version of appinio social share and The background color is actually working, Could you please share your code snipped?

await appinioSocialShare.shareToInstagramStory( facebookAppId, stickerImage: sticker, backgroundBottomColor: '#FAFAFA', backgroundTopColor: '#000000', );

Linaks commented 1 year ago

You're right. I did some incorrect encoding of the RadixString by doing this: final backgroundTopColor = '#${pictureColor.value.toRadixString(16)}' However Android did the correct output...

EDIT: I should have used this: toRadixString(16).padLeft(6, '0')'; or String hexString = '#' + color.value.toRadixString(16).substring(2, hexString.length);

to substract the first two letters.

See: https://stackoverflow.com/questions/55147586/flutter-convert-color-to-hex-string#comment97036098_55147696

Thank you for the hint @khanmujeeb687 :)