Home > Software design >  Exception : Invalid Image Data
Exception : Invalid Image Data

Time:08-13

it's first time i use Flutter , so when i put any image from Network or from the Disk it's show me this Error (Eception : Invalid image Data)enter image description here

CodePudding user response:

I Solve the Problem >> you just need to make sure that you are writing the same name in the Folders and same extension

 class Home extends StatelessWidget{
  @override 
  Widget build(BuildContext context){
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: Text('OKay Okay Let\'s go')),
        body: Center(child: Container(child: Image(image: AssetImage('image/asi.JPEG'))))
      )
    );
  }
}

this's name of the image's floder

  • Related