How to check if asset exists in flutter?

Posted by Ramesh Singh | Updated on | Flutter

If you want to check if asset exists in flutter? AssetBundle (as returned by rootBundle) abstracts over different ways of loading assets (local file, network) and there is no general way of checking if it exists.

You can easily wrap your loading code so that it becomes less “ugly”.

If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@] Your question and answer will appear on and help other developers.

Related Questions & Answers