I'm new to flutter. While adding an image and trying to run I got an error that said "Flutter Error Unable to load asset". An image of the problem can be seen below. If anyone can help that would be really appreciated! IMAGE: [https://i.stack.imgur.com/7ZzvM.png]
            Asked
            
        
        
            Active
            
        
            Viewed 301 times
        
    -1
            
            
        - 
                    Did you defined the asset in your pubspec.yaml? Remember to pay attention to identention when configuring pubspec.yaml. – Richardd Apr 20 '21 at 23:11
 - 
                    Hi, yes I believe I have defined the asset, and I made sure my indentation was correct. – Kaustubh Kondapalli Apr 21 '21 at 17:16
 
2 Answers
0
            
            
        Please check your pubspec.yaml file for proper indentation. Also, once declared in pubspec, you're supposed to get dependencies in source code. Have you done both? Also, check this thread - fluttererror-unableToLoadAsset
- 
                    
 - 
                    Please check if this thread helps you - https://stackoverflow.com/questions/53659809/fluttererror-unable-to-load-asset – Shyam Sundar Bharathi Apr 21 '21 at 08:48
 
0
            
            
        Please check your folder name.
You have written asssets instead of assets that is why the error is occuring.
        adrsh23
        
- 210
 - 2
 - 10
 
- 
                    
 - 
                    Can you please show the code part where you have called the asset. I think the way you called is incorrect. Also please show the pubspec.yaml file also (The asset part) – adrsh23 Apr 23 '21 at 07:09
 - 
                    Hello, attached are images- https://drive.google.com/file/d/1KCzeDoN3lfwe06iuDIFic_s3k6EMh3fF/view?usp=sharing and https://drive.google.com/file/d/1PCGWuQOw42Up62QtaGp3wS1BVHVzUCdd/view?usp=sharing – Kaustubh Kondapalli Apr 23 '21 at 23:12
 - 
                    I did not find any problems, but are you getting any errors when running pub get. Coz there's a error code 1 in your terminal. This could be the reason that the assets are not registered. Do pub get and see where is the error coming from. – adrsh23 Apr 24 '21 at 07:43