-
Notifications
You must be signed in to change notification settings - Fork 87
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
[bug] 'Null' is not a subtype of type 'String' in type cast #2
Comments
Thanks for the bug report. I've updated the example with the following code, which is more straightforward and easier to understand: emojiSet: [
CategoryEmoji(
Category.ANIMALS,
[
Emoji(
'emoji',
'name',
hasSkinTone: false,
),
],
)
], When using static Emoji fromJson(Map<String, dynamic> json) {
return Emoji(
json['emoji'] as String,
json['name'] as String,
hasSkinTone:
json['hasSkinTone'] != null ? json['hasSkinTone'] as bool : false,
);
} |
Much Appreciated, using null also works by loading all emojis, but seeing a value of "null" makes it confusing as in to showing nothing. works like a charm |
Much Appreciated, using null also works by loading all emojis, but seeing a value of "null" makes it confusing as in to showing nothing. works like a charm |
Addressed the example bug in `emojiSet`, providing a fix that aligns with the details discussed in GitHub issue #2 (#2 (comment)). This update ensures `emojiSet` functions as intended.
Describe the bug
An error appears when trying to pass emoji set as below per example documentation:
'Null' is not a subtype of type 'String' in type cast
Steps to Reproduce
Expected Behavior
To work as expected and open up the emoji tab
The text was updated successfully, but these errors were encountered: