Hi
This will be partially useful ! in that I have tested offline working but at present only viewing !! - however I know how I think it will work but have not tesetd yet!
So I have a sharepoint list that holds details of quotations called 'Quoteclient'
To view the quotations for a praticular enquiry ( indexed by 'quoteno) I create a collection 'Quotes' like this
ClearCollect(Quotes,Filter(Quoteclient,Quoteno=CQno));
the gallery is like this

Interestingly the data source is 'Quotes'

But I believe this only works in galleries and not forms
So to the edit screen for an item from the gallery - here the datasource is the sharepoint list 'Quoteclient' and its Item property is gallery.selected
However if you are working offline, the datasource should be changed to Quotes ( using a conditional in the property)
So when the record is edited, or a new record is created the code is as follows where CQid is a context variable carrying the ID of the Quote record selected
SubmitForm(EditForm2);
Patch(Quoteclient,First(Filter(Quoteclient,ID=Cqid )),EditForm2.LastSubmit);
Patch(Quotes,First(Filter(Quotes,ID=Cqid )),EditForm2.LastSubmit)
So for offline work, there would be a conditional
If(connection.connected
followed by code above
if offline then the only code at this point would be
Patch(Quotes,First(Filter(Quotes,ID=Cqid )),EditForm2.Updates)
if it was a new record it would be
Patch(Quotes,Defaults(quotes),EditForm2.Updates)
(I have changed to Udates from lastsubmit as I guess the submitform will error if off line)
I think you could also use a Collect statement to the same effect.
There then needs to be code to save data when back on line. The Twitter example given sets it all out very clearly about the start and finish of the process.
As mentioned above I have yet to test my off line code ! - so no doubt the above will be corrected along the way !
Cheers
Richard