rapido-mobile / rapido-flutter

Library for RAD development in Flutter
BSD 2-Clause "Simplified" License
70 stars 13 forks source link

Can this be used also for single record maintenance form? #116

Closed jasonlaw closed 5 years ago

jasonlaw commented 5 years ago

Can we use this for single record form? such as user profile update, or application setting.

Thanks in advance.

rickspencer3 commented 5 years ago

The easiest way to do this right now it to simply use a DocumentList that has a single Document in it. That will give you all of the CRUD capabilities.

If you don't want the persistence capabilities, but only the automatically created forms, you can use Document and DocumentForm together, but you will need to provide your own persistence.

jasonlaw commented 5 years ago

Thanks for the suggestion, I will try that out. Btw, for normal document list, my data are keep in server and interface with web api, does that means I have to turn off the persistence too?

rickspencer3 commented 5 years ago

Turning off persistence is now supported. If you want to support an offline mode easily, you can keep the persistence turned on, but then when you connect to the server, clear the DocumentList and replace it with the new content from the server. In that way, if the user is not connected to the internet, they will still have the data from their last session.