Code Monkey home page Code Monkey logo

Comments (1)

eddynaka avatar eddynaka commented on September 13, 2024

When I try to debug and see whats happening, for this:

 _jupiterAuthSubscription = _jupiterAuthService.onAuthStateChanged.listen((User user) {

it goes to a method which returns:
Unhandled exception:\nBad state: Stream has already been listened to.\n#0 _StreamController._subscribe (dart:async/stream_controller.dart:668:7)\n#1 _ControllerStream._createSubscription (dart:async/stream_controller.dart:818:19)\n#2 _StreamImpl.listen (dart:async/stream_impl.dart:472:9)\n#3 Stream.isEmpty (dart:async/stream.dart:1015:25)\n#4 _ControllerStream.Eval ()\n#5 JupiterAuthService.onAuthStateChanged (package:jupiter/services/jupiter_auth_service.dart:18:42)\n#6 AuthServiceAdapter._setup (package:jupiter/services/auth_service_adapter.dart:25:52)\n#7 new AuthServiceAdapter (package:jupiter/services/auth_service_adapter.dart:11:5)\n#8 MyApp.build. (package:jupiter/main.dart:19:27)\n#9 BuilderStateDelegate.initDelegate (package:provider/src/delegate_widget.dart:244:14)\n#10 _DelegateWidgetState._initDelegate (package:provider/src/delegate_widget.dart:117:21)\n#11 _DelegateWidgetState.initState (package:provider/src/delegate_widget.dart:109:...

but, inside of the JupiterAuthService, i have the same as MockAuthService:

class JupiterAuthService implements AuthService {
  User _currentUser;

  final StreamController<User> _onAuthStateChangedController =
      StreamController<User>();

  @override
  Stream<User> get onAuthStateChanged => _onAuthStateChangedController.stream;

(in the last line, i got that exception)

from firebase_auth_demo_flutter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.