psk907 / fluttermoji

A light-weight and highly customizable SVG graphic set for Flutter which generates avatars and provides a Customizer Widget, personalized CircleAvatar and other utility functions.
https://pub.dev/packages/fluttermoji
MIT License
72 stars 50 forks source link

getting old code for the SVG when saving the avatar #21

Closed monikkacha closed 2 years ago

monikkacha commented 2 years ago

Hello you have made awesome library and thanks for that .

we are using FlutterMoji functions to get SVG code and then converting it into .svg file String encodeMySVGtoString = await FluttermojiFunctions().encodeMySVGtoString(); String decodeFluttermojifromString = await FluttermojiFunctions().decodeFluttermojifromString(encodeMySVGtoString);

problem is that here decodeFluttermojifromString gives the code for previous avatar , not the one i have customize right now .

calling , FlutterMoji functions from onTap callback of FluttermojiSaveWidget . call back supposed to be trigger after after saving the svg changes in SharedPreference according to document . Additonal callbacks to be triggered on tapping the widget after the save operation is executed.

but looking at flutterMojiSaveWidget.dart found that onTap callback being called without waiting for fluttermojiController.setFluttermoji(); , which can be done by await and async .

can you please check at issue

monikkacha commented 2 years ago

@psk907 made PR which solves above issue , pls check and merge . https://github.com/psk907/fluttermoji/pull/22

comment in the thread when new version is out .

Thanks.

Spiderbezno commented 2 years ago

this pull is not available in pub.dev ???

psk907 commented 2 years ago

PR #22 has been merged and new version is live on pub.dev