Closed superiorsd10 closed 2 months ago
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 "padding": [10, 12, 10, 10],
. Can you please check?
196mββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ<β¦>
flutter: \^[[38;5;196mβ #0 Log.e (package:mirai/src/utils/log.dart:11:42)<β¦>
flutter: \^[[38;5;196mβ #1 Mirai.fromJson (package:mirai/src/framework/mirai.dart:107:11)<β¦>
flutter: \^[[38;5;196mββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ<β¦>
flutter: \^[[38;5;196mβ β Invalid argument(s): Invalid input format for MiraiEdgeInsets<β¦>
flutter: \^[[38;5;196mββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ<β¦>
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.
https://github.com/Securrency-OSS/mirai/assets/16731434/a301932d-3160-4f61-8822-43be6dfa7db7
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,
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
https://github.com/Securrency-OSS/mirai/assets/92971894/6396a9b4-71fd-4272-a5ce-28cb173999e3
Type of Change