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

Form bloc no longer required and many other changes #308

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

SimoneBressan
Copy link
Contributor

I would recommend creating a dev branch and releasing this version in dev. It's not over but feedback is always welcome

Changes:

  • fix example android build
  • feat a field no longer needs to be inside a form bloc to be visible
  • feat now you can animate the appearance of a field even if it is only within a list
  • fix removed the name field from the block fields. Now the organization of the form values is similar to a json
  • fix now form bloc only manages the steps and not lists of field blocs
  • fix removed the form bloc field in the bloc fields to have no dependency on the form and to be able to use any field at will
  • feat Added validate method to form bloc. Validate the form without having to submit
  • feat now the package no longer depends on flutter_bloc, use whatever package you want: get_it, riverpod, getx or singletons ;)
  • feat added builders for lists and groups
  • feat now the relatives have the status of the children. Fantastic isn't it? Remember to avoid unnecessary widget rebuilds

BreX900 added 2 commits May 15, 2022 11:10
feat a field no longer needs to be inside a form bloc to be visible
feat now you can animate the appearance of a field even if it is only within a list
fix removed the name field from the block fields. Now the organization of the form values is similar to a json
fix now form bloc only manages the steps and not lists of field blocs
fix removed the form bloc field in the bloc fields to have no dependency on the form and to be able to use any field at will
feat Added validate method to form bloc. Validate the form without having to submit
feat now the package no longer depends on flutter_bloc, use whatever package you want: get_it, riverpod, getx or singletons ;)
feat added builders for lists and groups
feat now the relatives have the status of the children. Fantastic isn't it? Remember to avoid unnecessary widget rebuilds
@SimoneBressan SimoneBressan marked this pull request as draft May 15, 2022 09:39
@aaassseee
Copy link
Contributor

@SimoneBressan What is the benefit when the package not depend on flutter_bloc?

@BreX900
Copy link
Contributor

BreX900 commented May 21, 2022

@aaassseee You can use the flutter_form_bloc with get_it, riverpod or other, without having useless or unused dependencies or having name space conflicts

@aaassseee
Copy link
Contributor

aaassseee commented May 22, 2022

@BreX900 I am not sure what useless dependencies and name space conflicts that you are talking about. Reading with the pull request, I think you only replace bloc provider and bloc listener with your self made classes which is still depending on bloc.

To be honest, library user who are using get_it, riverpod or getx would not consider this library as their solution due to the library name form_bloc. Making the library not depends on flutter_bloc but still bloc will not increase the user acquisition.

In addition, by the past experience. Cloning library and make it on you own with few changes is a bad idea. Because all the users expect the library behavior is same as the library that you cloned. For example, people who use bloc will expect the same result with your self made bloc listener.

Moreover, self made library is hard to maintain because not many contributor migrate the latest function or bug fix on cloned library . This will make contributor much more harder to do migration or maintenance for the time being. Like flutter_typehead it is hard to maintain nowadays, because lots of changes were made.

If we use another library as our dependency we should depends on it instead of making our own. I think this direction should be the right play.

@aaassseee
Copy link
Contributor

Hi, @BreX900. Any update on this pull request. I am willing to help.

@BreX900
Copy link
Contributor

BreX900 commented Jun 27, 2022

@aaassseee You are right regarding removing flutter_bloc. It is best to keep it.
Also I wanted to divide the PR into several parts. It would also be interesting to leave the name field in the constructor to use it for debugging

@GiancarloCode
Copy link
Owner

@BreX900 @SimoneBressan Thanks, check discord please :)

@BreX900 BreX900 deleted the next branch May 24, 2024 15:26
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.

4 participants