-
Notifications
You must be signed in to change notification settings - Fork 61
Adding an Image Resource To Your Application
Terry Yoon edited this page Jun 8, 2022
·
1 revision
- Add the image resource to the
example/android/app/src/main/res/drawable
directory. For details about supported file types and potential compression, check out here.
- Now you can use the image in the viewer. For example, if you add
button_close.png
to drawable, you could use'button_close'
in leadingNavButtonIcon.
- After pods has been installed, open the .xcworkspace file for this application in Xcode (in this case, it's
Runner.xcworkspace
), and navigate through the list below. This would allow you to add resources, in this case, an image, to your project.
- "Project navigator"
- "Runner" (or the app name)
- "Build Phases"
- "Copy Bundle Resources"
- "+".
- Now you can use the image in the viewer. For example, if you add
button_open.png
to the bundle, you could use'button_open.png'
in leadingNavButtonIcon.