[cloud_firestore] Make Futures work in offline-mode #7002
              
                Unanswered
              
          
                  
                    
                      oodavid
                    
                  
                
                  asked this question in
                Feature request
              
            Replies: 1 comment
-
| 
         Hello @oodavid , I've encountered the same problem recently, and I haven't found a solution, either by searching here or on the android sdk directly. Thanks  | 
  
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
-
The docs and examples recommend making use of
Futures, but they remain uncompleted when offline. This will be unexpected for most users.Offline behaviour is described as using a local database, with server sync happening in the background:
I know this is described as intended behaviour, however it makes using the Futures unusable for apps that use offline behaviour with
writeoperations.Proposal
Allow us to decide how Futures are completed. On a global, or per-query basis. The
Sourceenum springs to mind:That way we can cater for existing behaviour with defaults, and also improve the offline functionality.
Video
I originally thought this was a bug. It's since change to a feature request. Here's my original:
https://www.loom.com/share/30f4f0fa6d184ebe8df1751c526b2f4e
Beta Was this translation helpful? Give feedback.
All reactions