CopyPastor

Detecting plagiarism made easy.

Score: 0.8144695997899208; Reported for: String similarity Open both answers

Possible Plagiarism

Plagiarized on 2022-01-24
by Anmol Mishra

Original Post

Original - Posted on 2018-12-07
by Mahesh Jamdade



            
Present in both answers; Present only in the new answer; Present only in the old answer;

The simplest way is to reference your assest folder instead of the asset itself, just make sure you use proper indentations as the pubspec.yaml is indent sensitive. If you have multiple images that you want to include then you can leave off the file name and just use the directory name (include the final /)
flutter: uses-material-design: true assets: - images/
and you can simply access each image as

Image.asset('images/jon.png',width:30,height:30)


**OR**
Restart you IDE
The simplest way is to reference your assets folder instead of the asset itself, just make sure you use proper indentations as the `pubspec.yaml` is indent sensitive.
flutter: uses-material-design: true assets: - images/
and you can simply access each image as
Image.asset('images/pizza1.png', width:300, height:100)

        
Present in both answers; Present only in the new answer; Present only in the old answer;