For managing the data of a screen, the CustomScreen provides a simple API which can be accessed via getDataApi('DATA_PROVIDER_NAME') from anywhere in it's extended classes.
This API provides following functions:
dynamic getValue(String columnName)List getValues(List columnNames)setValue(String columnName, dynamic value)setValues(List columnNames, List values)insertRecord()deleteRecord(int index)selectRecord(int index)The client persists those changes by itself.
DataApi dataApi = getDataApi('JVxMobileDemo/Con-CG/contacts#4'); FlatButton( child: Text("Call"), onPressed: () { phone = dataApi.getValue("PHONE"); launch("tel://$phone"); })
DataApi dataApi = getDataApi('JVxMobileDemo/Con-CG/contacts#4'); FlatButton( child: Text("Set phone number"), onPressed: () { phone = dataApi.setValue("PHONE", '+43660123456'); } )