-
Notifications
You must be signed in to change notification settings - Fork 66
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
feat: Added a new way to redefine how we declare EdgeInsets #276
feat: Added a new way to redefine how we declare EdgeInsets #276
Conversation
Hey @superiorsd10, Loved what you did with that PR! You nailed the fix and seriously upped our game. Big thanks for your awesome work! 🌟👍 There is one small error I'm getting when using
|
packages/mirai/lib/src/action_parsers/mirai_dialog_action/mirai_dialog_action.g.dart
Outdated
Show resolved
Hide resolved
Hello @divyanshub024 👋 On replicating the behavior stated by you, it's working fine, and I'm not getting any errors. Can you please tell me more about the issue? |
Hey @superiorsd10, I took the pull again and it still showed the same error. Screen.Recording.2024-02-29.at.5.50.45.PM.1.mov |
…if all elements are num
Hello @divyanshub024 👋 I have fixed the above issue. You can pull the latest changes now, and check if it works. I have tested it on my end, and it's working fine. Thank you, |
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.
LGTM!!
Thank you @superiorsd10 🎉
Description
Previously, there was only one way to define
MiraiEdgeInsets
and it looked like thisIn this pull request, I have added the two new ways as suggested to declare
MiraiEdgeInsets
.To approach this issue, I have defined a new static method inside
MiraiEdgeInsets
named_fromJson
that takes adynamic
argument and checks if the type of argument is among three acceptable types i.e.num, List<num>, Map<String, dynamic>
, and returnsMiraiEdgeInsets
; otherwise, throw anArgumentError
.Related Issues
Closes #260
Screen Recording
Screen.Recording.mp4
Type of Change