List {
//I Want This Button To Appear When User Over Scroll To Top
Button(action: { ... }, label: {
Text("Archive")
})
ForEach(0..<5) { item in
ChatButton()
}
.listRowInsets(EdgeInsets.init(top: 0, leading: 0, bottom: 0, trailing: 0))
.listRowPlatterColor(.clear)
Rectangle()
.frame(width: Sizes.width - 8, height: Sizes.h2)
.foregroundColor(Color("Background"))
.listRowInsets(EdgeInsets.init(top: 0, leading: 0, bottom: 0, trailing: 0))
.listRowPlatterColor(.clear)
CenteredTextButton(
text: "Durumlar", textColor: Color("White"),
isLink: true, destinationKey: "statuses", buttonAction: {}
)
.listRowInsets(EdgeInsets.init(top: 0, leading: 0, bottom: 0, trailing: 0))
.listRowPlatterColor(.clear)
}
In the above code, I want the Button that says Archive to appear when user scrolls to top when user already at the top (ex: on negative offset y)
