@@ -20,7 +20,7 @@ struct Widgets: WidgetBundle {
2020struct PizzaDeliveryActivityWidget : Widget {
2121 var body : some WidgetConfiguration {
2222 ActivityConfiguration ( for: PizzaDeliveryAttributes . self) { context in
23- // For devices that don't support the Dynamic Island.
23+ // MARK: - For devices that don't support the Dynamic Island.
2424 VStack ( alignment: . leading) {
2525 HStack {
2626 VStack ( alignment: . leading) {
@@ -69,10 +69,11 @@ struct PizzaDeliveryActivityWidget: Widget {
6969 . foregroundColor ( . secondary)
7070 . padding ( . horizontal, 5 )
7171 } . padding ( 15 )
72+ // MARK: - For Dynamic Island
7273 } dynamicIsland: { context in
7374 DynamicIsland {
7475 DynamicIslandExpandedRegion ( . leading) {
75- Label ( " \( context. attributes. numberOfPizzas) Pizzas " , systemImage: " bag " )
76+ Label ( " \( context. attributes. numberOfPizzas) Pizza " , systemImage: " bag " )
7677 . font ( . title2)
7778 }
7879 DynamicIslandExpandedRegion ( . trailing) {
@@ -96,7 +97,7 @@ struct PizzaDeliveryActivityWidget: Widget {
9697 DynamicIslandExpandedRegion ( . bottom) {
9798 // Deep Linking
9899 HStack {
99- Link ( destination: URL ( string: " pizza://TIM " ) !) {
100+ Link ( destination: URL ( string: " pizza://contact: TIM " ) !) {
100101 Label ( " Contact driver " , systemImage: " phone.circle.fill " )
101102 . font ( . caption)
102103 . padding ( )
@@ -109,11 +110,11 @@ struct PizzaDeliveryActivityWidget: Widget {
109110 . padding ( )
110111 } . background ( Color . red)
111112 . clipShape ( RoundedRectangle ( cornerRadius: 15 ) )
112- } . padding ( )
113+ }
113114 }
114115 } compactLeading: {
115116 Label {
116- Text ( " \( context. attributes. numberOfPizzas) Pizzas " )
117+ Text ( " \( context. attributes. numberOfPizzas) Pizza " )
117118 } icon: {
118119 Image ( systemName: " bag " )
119120 }
0 commit comments