Skip to content
This repository has been archived by the owner on Sep 7, 2022. It is now read-only.

firestore listener not working as expected #336

Closed
suvarna84 opened this issue Sep 1, 2020 · 2 comments
Closed

firestore listener not working as expected #336

suvarna84 opened this issue Sep 1, 2020 · 2 comments
Labels
More information needed Waiting for information from the person who files the issue

Comments

@suvarna84
Copy link

suvarna84 commented Sep 1, 2020

My web application requires me to use firestore listener for a document 'jkl. Instead of printing the updated value once, it is repeatedly printing the value even though there is no update in the document 'jkl.

 void switchListener() async {
      _listener = Firestore.instance
       .collection('abc')
      .document('def')
      .collection('ghi')
     .document('jkl')
     .snapshots()
 .listen((data) => listenerUpdate(data));
 }

 void listenerUpdate(data) {
   String number = data['URL'];
  setState(() {
  _totalDocs = number;
     });
   }

[✓] Flutter (Channel unknown, 1.20.1, on Mac OS X 10.15.1 19B88, locale en-IN)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[✗] Xcode - develop for iOS and macOS
✗ Xcode installation is incomplete; a full installation is necessary for iOS development.
Download at: https://developer.apple.com/xcode/download/
Or install Xcode via the App Store.
Once installed, run:
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
sudo xcodebuild -runFirstLaunch
✗ CocoaPods not installed.
CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to
your plugin usage on the Dart side.
Without CocoaPods, plugins will not work on iOS or macOS.
For more info, see https://flutter.dev/platform-plugins
To install:
sudo gem install cocoapods
[✓] Chrome - develop for the web
[✓] Android Studio (version 3.4)
[!] VS Code (version 1.37.1)
✗ Flutter extension not installed; install from
https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[✓] Connected device (2 available)

! Doctor found issues in 2 categories.

@kevmoo
Copy link
Contributor

kevmoo commented Dec 16, 2020

What version of this package are you using?
Which version of the firebase JS libraries are you using?
What is the event data?

@kevmoo kevmoo added the More information needed Waiting for information from the person who files the issue label Dec 16, 2020
@no-response
Copy link

no-response bot commented Dec 30, 2020

Without additional information we're not able to resolve this issue, so it will be closed at this time. You're still free to add more info and respond to any questions above, though. We'll reopen the case if you do. Thanks for your contribution!

@no-response no-response bot closed this as completed Dec 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
More information needed Waiting for information from the person who files the issue
Projects
None yet
Development

No branches or pull requests

2 participants