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: Add support to submit a form #119

Closed
4 tasks
RodolfoSilva opened this issue May 6, 2023 · 0 comments · Fixed by #110
Closed
4 tasks

feat: Add support to submit a form #119

RodolfoSilva opened this issue May 6, 2023 · 0 comments · Fixed by #110
Assignees
Labels

Comments

@RodolfoSilva
Copy link
Contributor

RodolfoSilva commented May 6, 2023

Description

In the LSD library, I've implemented a method to store input values using an InheritedWidget, maintaining all form values in a Map<String, String>. I believe we can incorporate a similar approach in Mirai. Additionally, we can introduce a signal to instruct the UI to disable all input modifications and other related buttons while the form is being submitted. Once the server responds, an Action will be dispatched to inform the UI of any further steps required.

I'm curious if there might be a better approach to achieve this.

Based on your experiences, @divyanshub024 and @i-asimkhan, what do you think is the best way to implement this feature?

Requirements

  • Submit a form
  • Disable fields when form is submitting
  • Disable buttons when the form is submitting
  • Execute a action in the end of the submission request, sented by the server

Additional Context

This issue is complement of: #107, #51

LSD Form Provider:
https://github.com/RodolfoSilva/lsd/blob/main/packages/lsd_form/lib/src/lsd_form_provider.dart

LSD Field Builder:
https://github.com/RodolfoSilva/lsd/blob/main/packages/lsd_form/lib/src/lsd_form_field.dart

LSD Form state
https://github.com/RodolfoSilva/lsd/blob/main/packages/lsd_form/lib/src/lsd_form_data_state.dart

LSD Form widget
https://github.com/RodolfoSilva/lsd/blob/main/packages/lsd_form/lib/src/lsd_form_widget.dart

LSD From Action:
https://github.com/RodolfoSilva/lsd/blob/main/packages/lsd_form/lib/src/lsd_submit_form.dart

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants