Skip to content
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 support for radio widget #90

Merged
merged 6 commits into from
Jan 9, 2025

Conversation

ishanvaghani
Copy link
Contributor

Description

Added support for radio widget along with radio group

Related Issues

Issue not listed

Screenshots

XRecorder_07012025_211550.mp4

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Code refactor
  • Build configuration change
  • Documentation
  • Chore

# Conflicts:
#	examples/mirai_gallery/assets/json/home_screen.json
#	packages/mirai/lib/src/framework/mirai.dart
#	packages/mirai/lib/src/parsers/parsers.dart
#	packages/mirai/lib/src/utils/widget_type.dart
@divyanshub024
Copy link
Member

Hey @ishanvaghani,

I'm getting this error while running the example app. Can you please take a look.

196m┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────<…>
flutter: \^[[38;5;196m│ #0   Log.e (package:mirai/src/utils/log.dart:11:42)<…>
flutter: \^[[38;5;196m│ #1   MiraiFormScope.of (package:mirai/src/parsers/mirai_form/mirai_form_scope.dart:22:11)<…>
flutter: \^[[38;5;196m├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄<…>
flutter: \^[[38;5;196m│ ⛔ MiraiFormScope.of() called with a context that does not contain a MiraiFormScope.<…>
flutter: \^[[38;5;196m└─────────────────

@ishanvaghani
Copy link
Contributor Author

Hey @ishanvaghani,

I'm getting this error while running the example app. Can you please take a look.

196m┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────<…>
flutter: \^[[38;5;196m│ #0   Log.e (package:mirai/src/utils/log.dart:11:42)<…>
flutter: \^[[38;5;196m│ #1   MiraiFormScope.of (package:mirai/src/parsers/mirai_form/mirai_form_scope.dart:22:11)<…>
flutter: \^[[38;5;196m├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄<…>
flutter: \^[[38;5;196m│ ⛔ MiraiFormScope.of() called with a context that does not contain a MiraiFormScope.<…>
flutter: \^[[38;5;196m└─────────────────

This is because sample radio_example.json does not have form scope. If we wrap is inside fromScope it will not give the exception. I have tested this with wrapping in formScope

@divyanshub024
Copy link
Member

Hey @ishanvaghani,
I'm getting this error while running the example app. Can you please take a look.

196m┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────<…>
flutter: \^[[38;5;196m│ #0   Log.e (package:mirai/src/utils/log.dart:11:42)<…>
flutter: \^[[38;5;196m│ #1   MiraiFormScope.of (package:mirai/src/parsers/mirai_form/mirai_form_scope.dart:22:11)<…>
flutter: \^[[38;5;196m├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄<…>
flutter: \^[[38;5;196m│ ⛔ MiraiFormScope.of() called with a context that does not contain a MiraiFormScope.<…>
flutter: \^[[38;5;196m└─────────────────

This is because sample radio_example.json does not have form scope. If we wrap is inside fromScope it will not give the exception. I have tested this with wrapping in formScope

@ishanvaghani Can you please add it to the example? It will be quite helpful for early adopters to understand the working of it.

@divyanshub024 divyanshub024 added this to the v0.9 milestone Jan 8, 2025
@ishanvaghani
Copy link
Contributor Author

Hey @ishanvaghani,
I'm getting this error while running the example app. Can you please take a look.

196m┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────<…>
flutter: \^[[38;5;196m│ #0   Log.e (package:mirai/src/utils/log.dart:11:42)<…>
flutter: \^[[38;5;196m│ #1   MiraiFormScope.of (package:mirai/src/parsers/mirai_form/mirai_form_scope.dart:22:11)<…>
flutter: \^[[38;5;196m├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄<…>
flutter: \^[[38;5;196m│ ⛔ MiraiFormScope.of() called with a context that does not contain a MiraiFormScope.<…>
flutter: \^[[38;5;196m└─────────────────

This is because sample radio_example.json does not have form scope. If we wrap is inside fromScope it will not give the exception. I have tested this with wrapping in formScope

@ishanvaghani Can you please add it to the example? It will be quite helpful for early adopters to understand the working of it.

Added in sample response

@divyanshub024 divyanshub024 changed the title Added support for radio widget feat: Added support for radio widget Jan 8, 2025
# Conflicts:
#	examples/mirai_gallery/assets/json/home_screen.json
#	packages/mirai/lib/src/framework/mirai.dart
#	packages/mirai/lib/src/parsers/parsers.dart
#	packages/mirai/lib/src/utils/widget_type.dart
Copy link
Member

@divyanshub024 divyanshub024 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this PR, @ishanvaghani !! 🎉

@divyanshub024 divyanshub024 merged commit 2c37dcb into StacDev:dev Jan 9, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants