Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Parameters that should be nullable are non-nullable #9

Closed
leonluc-dev opened this issue Jan 2, 2024 · 2 comments · Fixed by #10
Closed

Parameters that should be nullable are non-nullable #9

leonluc-dev opened this issue Jan 2, 2024 · 2 comments · Fixed by #10

Comments

@leonluc-dev
Copy link

In the original Objective-C library of this binding several parameters (title, image, style and completion) are nullable as can be seen in this example:

 [self.navigationController.view makeToast:@"This is a piece of toast with a title"
                                         duration:2.0
                                         position:CSToastPositionTop
                                            title:nil
                                            image:nil
                                            style:nil
                                       completion:nil];

However, in the binding calling the following method results in an ArgumentNullException:

myView.MakeToast("Test text", 2.0f, CSToastPosition.Top, null, null, null, null);

It seems these parameters haven't had their [NullAllowed] attributes set.

wcoder added a commit that referenced this issue Jan 5, 2024
@wcoder wcoder mentioned this issue Jan 5, 2024
1 task
@wcoder wcoder closed this as completed in #10 Jan 9, 2024
@wcoder
Copy link
Member

wcoder commented Jan 9, 2024

@leonluc-dev Thank you for the feedback!

Please check the new NuGet package v4.0.0.3

@leonluc-dev
Copy link
Author

Thanks. Nullability seems to work perfectly now!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants