Closed Ombuweb closed 1 year ago
When is it ideal to use fromAsset()
? It seems to achieve the same result as fromFile()
but the latter being simpler.
When is it ideal to use
fromAsset()
? It seems to achieve the same result asfromFile()
but the latter being simpler.
Sometimes you have an ImageAsset instance you need to convert, for example when taking an image with the camera usually results in an ImageAsset, which you convert to ImageSource to display in the app. There are likely other cases where that's useful, but I can't think of any.
I think the ImageAsset class has bugs. On iOS, the ios
property returns undefined
and the nativeImage
property returnsundefined
on Android.
@rigor789 I think we should move ImageSource
from /guide/core
to /guide/ui/image-source
. Then for the sidebar we can have following structure:
UI ...
...
/guide/ui/image-source
sounds good 👍
I need help with examples for
ImageSource.fromData()
andImageSource.fromFontIconCodeSync()
. I triedconst img = ImageSource.fromFontIconCodeSync("", new Font("serif", 12),new Color("red"))
but it's not converting that string to an icon.