Toolbar button not showing in Canvas

Hi,
I have a toolbar and a share button on the left side. The button isn't showing up on the canvas, but does show when the app is run in the simulator or a device. Is this normal behavior or a bug? This is a test button so please forgive the print statement.

Here's the code:

Code Block .toolbar
        {
          ToolbarItem(placement: .bottomBar)
          {
            Button(action: {
              print ("Button Pressed!")
            }
              ){
              
              Image(systemName: "square.and.arrow.up")
            }
            }
        }


Answered by BabyJ in 661771022
You need to embed the view in the preview code at the bottom inside a NavigationView.
Accepted Answer
You need to embed the view in the preview code at the bottom inside a NavigationView.
oh, that would help! Thanks.
Toolbar button not showing in Canvas
 
 
Q