-
Notifications
You must be signed in to change notification settings - Fork 67
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: Add Mirai Switch #207
feat: Add Mirai Switch #207
Conversation
Hi @divyanshub024 , @i-asimkhan. First of all, it was great working on MIRAI and with no due time I was able to adde the support to have a This is not the full implementation, there are some more addition, which has been added in the TBD section and also need to discuss on those points. |
1a5c1b2
to
064e846
Compare
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.
Thank you very much for this @kushalmahapatro I have a few suggestions in the comments comparing other parts of the widgets parsers in MIrai.
packages/mirai/lib/src/parsers/mirai_switch/mirai_switch_parser.dart
Outdated
Show resolved
Hide resolved
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.
Thanks a lot, @kushalmahapatro for this PR. Please check my comments.
packages/mirai/lib/src/parsers/mirai_switch/cubit/mirai_switch_cubit.dart
Outdated
Show resolved
Hide resolved
b7b3b91
to
1fc0107
Compare
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.
Looks good, I have only one more comment. 👍 👍 👍
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.
Blocked by review from @divyanshub024
packages/mirai/lib/src/parsers/mirai_switch/widget/mirai_switch_widget_state.dart
Outdated
Show resolved
Hide resolved
e25416d
to
3f70210
Compare
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.
@kushalmahapatro Thank you so much for this valuable PR. 💯 🙏🏻
Description
Add support for switch in Mirai.
This basically takes up an initial value and a listener onChanged.
The state of the switch is being handled by
MiraiSwitchCubit
.This is a draft PR raised to confirm that we are following the right practices and to verify if this is the correct approach for handling the state.
TBD
onChanged
. (network call / updating value in shared preference or storage etc.)Related Issues
feat: Add support for Switch in Mirai #168
Type of Change