difference between image.Asset and AssetImage

20 views
Skip to first unread message

ibrahim shehu ibrahim

unread,
Oct 16, 2018, 10:45:42 AM10/16/18
to Flutter Dev
pls can anyone carify  the differences between image.asset and AssetImage in flutter

Kris Giesing

unread,
Oct 16, 2018, 11:28:13 AM10/16/18
to ibrahims...@gmail.com, Flutter Dev
AssetImage is a utility class for loading resolution-appropriate images from the application's AssetBundle.

Image.asset is a constructor for Image, which is a Widget subclass; this will place a visual item on screen, specifically one representing an Image loaded from the application's AssetBundle. It uses AssetImage in its implementation.

Typically you would call Image.asset (from your build method) rather than AssetImage directly.

Hope this helps,

- Kris

On Tue, Oct 16, 2018 at 7:45 AM ibrahim shehu ibrahim <ibrahims...@gmail.com> wrote:
pls can anyone carify  the differences between image.asset and AssetImage in flutter

--
You received this message because you are subscribed to the Google Groups "Flutter Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages