[Widgets]: [WIP]: Implement Pagination in ActiveAppWidget based on user interaction

This commit is contained in:
Magesh K
2025-01-09 05:07:13 +05:30
parent bb8a1b57cd
commit 46871f63ed
7 changed files with 277 additions and 14 deletions

View File

@@ -53,4 +53,29 @@ extension View
self
}
}
@ViewBuilder
func pageUpButton(widgetID: String) -> some View {
if #available(iOSApplicationExtension 17, *) {
Button(intent: PaginationIntent(.up, widgetID)){
self
}
.buttonStyle(.plain)
} else {
self
}
}
@ViewBuilder
func pageDownButton(widgetID: String) -> some View {
if #available(iOSApplicationExtension 17, *) {
Button(intent: PaginationIntent(.down, widgetID)){
self
}
.buttonStyle(.plain)
} else {
self
}
}
}