Open mensurkurtagic opened 2 years ago
I experience the same thing too. I have to use the unofficial package instead, and it does support url in the button
Check it out at https://www.nuget.org/packages/OneSignal.RestAPIv3.Client
Might be a bit late for the show, but I had the same problem and I solved it using plain old inheritance:
public class ButtonWithUrl : Button
{
[DataMember(Name = "url", IsRequired = true, EmitDefaultValue = false)]
public string? Url { get; set; }
public ButtonWithUrl(string? id = null, string? text = null, string? icon = null, string? url = null)
: base(id, text, icon)
{
Url = url;
}
}
And then setting the web buttons using the above type instead of the builtin Button
-class:
new ButtonWithUrl(id: "yes", text: "Yes", url: "http://localhost:3000/settings")
Hi everyone, thank you for reporting,
This is a bug, the url
property is missing from the Button class so we will be fixing this in the next beta release update.
How can we help?
Documentation says that we can create WebButtons with LaunchUrl (Url) as a parameter, but WebButtons attribute is a List
Thank you.
Code of Conduct