Why is flutter unable to load asset image?

No errors in the code and as far as I can see the pubspec.yaml file is functional, as it worked before.

  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: SafeArea(
          child: Column(
            children: [
                child: Image.asset('anyaparent.jpeg'),

Error text "Unable to load asset"

[1]: https://i.stack.imgur.com/GeTW2.png
The pubspec.yaml file

>Solution :

try doing like this


Leave a Reply