-
Notifications
You must be signed in to change notification settings - Fork 203
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
Get Fields from restful call #310
Comments
@bobosette It seems the scope is too large. Would you like to share a sample JSON with what questionnaire will return? |
There should be only SelelecFieldBox |
@bobosette It is hard to do example if you don't provide any runnable code. Lacking with information I can only provide a rough idea to help you. Lets say we have a JSON list with object contain type and options, you can generate the field blocs by lopping the object list and create list of field blocs. After constructing the field bloc you can add the list of field bloc by addFieldBlocs function before emitLoaded(). |
This could be a good option. I'll try and I'll let you know. Sorry for the
lack of code
Il Lun 6 Giu 2022, 14:57 Jack Liu ***@***.***> ha scritto:
… @bobosette <https://github.com/bobosette> It is hard to do example if you
don't provide any runnable code. Lacking with information I can only
provide a rough idea to help you. Lets say we have a JSON list with object
contain type and options, you can generate the field blocs by lopping the
object list and create list of field blocs. After constructing the field
bloc you can add the list of field bloc by addFieldBlocs function before
emitLoaded().
—
Reply to this email directly, view it on GitHub
<#310 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADEWB4NRKZC7MBKMXVATKDDVNXYVDANCNFSM5X6K7K7A>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@bobosette Sure, If you can give more information. I can give you a much more detail suggestion. |
When I'll come back to the laptop, I'll try and if needed I'll provided
more information
Il Lun 6 Giu 2022, 15:07 Jack Liu ***@***.***> ha scritto:
… @bobosette <https://github.com/bobosette> Sure, If you can give more
information. I can give you a much more detail suggestion.
—
Reply to this email directly, view it on GitHub
<#310 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADEWB4OBLHS4I36EVJXV653VNXZXNANCNFSM5X6K7K7A>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hi @aaassseee . I declared a |
@bobosette Happy to help. |
@aaassseee I have another question for you: What if I should have different FieldBloc inside my list (SelectFieldBloc, TextFieldBloc, etc....)?? Is it possible to declared a ListFieldBloc<dynamic, dynamic>() or I don't something similar? |
@bobosette dynamic is not the best options if there is a base type. For the field bloc except ListFieldBloc and GroupFieldBloc you can use SingleFieldBloc as their base type. If you include ListFieldBloc and GroupFieldBloc in your list of bloc, you can use FieldBloc as your base type. |
I'll try with SingleFieldBloc |
Hi everybody. I need to implement a questionnaire inside my app and I get questions and answers from a restful call, so when I initialize fields I don't know exactly how many they will be and their type, but i will get these informations when i will make the call inside the onLoading() method
`
@OverRide
void onLoading() async {
try {
await Future.delayed(Duration(milliseconds: 1500));
}
`
How can I dinamically add fields to my FormBloc directly from the onLoading() method?
The text was updated successfully, but these errors were encountered: