You might want to look into Firebase's Realtime Database (also Google) instead of Cloud Datastore.
If you want to do this in Cloud Datastore, you'll need to wrap the client libraries with your own methods for local caching and synchronization (not easy, but possible).
If you use Cloud Datastore's auto-generation ID's for entities it will be much harder since there isn't a great client way to do it. How you would do it was pre-allocate keys in advanced per client and store in a cache to use while offline. alternatively, if you use Names in the keys instead of IDs it will be somewhat easier, although you'll need to make sure there isn't conflicts between clients.