Currently, I am trying to use my own image for an icon using
ImageIcon(AssetImage("assets\icon\logo.png")
)
My logo is in and I copied relative path
CodePudding user response:
add your image to pubspec.yaml
as an assets
an also you use wrong slash . it should be like below
- change this
ImageIcon(AssetImage("assets\icon\logo.png"))
- to this
ImageIcon(AssetImage("assets/icon/logo.png"))
CodePudding user response:
Change the slash
ImageIcon(AssetImage("assets/icon/logo.png"))