Image.asset(name) is essentially Image(image: AssetImage(name)),
Image.file(path) is essentially Image(image: FileImage(File(path))),
Image.network(url) is essentially Image(image: NetworkImage(url)),
Image.memory(list) is essentially Image(image: MemoryImage(list))
1. add the following codes to 【pubspec.yaml】
____________________________________________________________________________________
assets:
- assets/xxx/xxx/xxx.jpg
____________________________________________________________________________________
2. call assets with the following code
AssetImage('assets/xxx/xxx/xxx.jpg')
eg : CircleAvatar(
radius: 50,
backgroundImage: AssetImage('assets/images/app_logo/guest.jpg'),)
____________________________________________________________________________________