-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(device_info_plus)!: return type of isPhysicalDevice as boolean for ios #2508
Conversation
NSNumber *isPhysicalNumber = | ||
[NSNumber numberWithBool:[self isDevicePhysical]]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Objective-C is weird :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was my first time writing code in Objective-C, from a Java and Android background. Undoubtedly, it was horrible for me.
Thanks! Change LGTM, but I want to run it before approval, that will take a day or two. |
I could test it now and it works as expected! Just curious, why did you need to use |
@vbuberen I changed the title to |
I tried to do so, however, Bool is a primitive data type and we couldn't pass any primitive data types to the map object. That's why I used NSNumber to represent boolean. |
This change looks good to me as well. @miquelbeltran are you Ok with merging this change? |
All good from my side as well @vbuberen |
Description
For iOS devices
isPhysicalDevice
was returned asString
from native platform, now it is returning boolean from native platform.Related Issues
Replace this paragraph with a list of issues related to this PR from the issue database. Indicate, which of these issues are resolved or fixed by this PR.
e.g.
Checklist
CHANGELOG.md
nor the plugin version inpubspec.yaml
files.flutter analyze
) does not report any problems on my PR.Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?
!
in the title as explained in Conventional Commits).