Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 97313

Flutter Exception caught by widgets library / Exception caught by animation library

$
0
0

So, I have this error showing in my debug console everytime i log out from my app. I mean it logged out the user just fine from Home to Login screen. I can log back in too. The app on emulator neither hang or freeze or crash etc. It just the error been buggin' me for me for a while. Anyone have any idea what causing this error? Thank you.

Auth for log out.

Future signOut() async {
    try{
      return await _auth.signOut();
    } catch(e){
      print(e.toString());
      return null;
    }

  }

Log out code. Scaffold > Drawer > ListView > CustomeListTile

        CustomListTile(Icons.person, 'Profile', ()=>{}),
        CustomListTile(Icons.assignment, 'Purchase History', ()=>{}),
        CustomListTile(Icons.build, 'Settings', ()=>{}),
        CustomListTile(Icons.directions_run, 'Log Out', () async {
          await _auth.signOut();

Error on debug console. No error on flutter doctor.

════════ Exception caught by widgets library ═══════════════════════════════════
    The following assertion was thrown while finalizing the widget tree:
    setState() or markNeedsBuild() called when widget tree was locked.

    This _ModalScope<dynamic> widget cannot be marked as needing to build because the framework is locked.
    The widget on which setState() or markNeedsBuild() was called was: _ModalScope<dynamic>-[LabeledGlobalKey<_ModalScopeState<dynamic>>#45d16]
        state: _ModalScopeState<dynamic>#c9408
    When the exception was thrown, this was the stack
#0      Element.markNeedsBuild.<anonymous closure> 
package:flutter/…/widgets/framework.dart:3901
#1      Element.markNeedsBuild 
package:flutter/…/widgets/framework.dart:3911
#2      State.setState 
package:flutter/…/widgets/framework.dart:1168
#3      _ModalScopeState._routeSetState 
package:flutter/…/widgets/routes.dart:664
#4      ModalRoute.setState 
package:flutter/…/widgets/routes.dart:784
...
════════════════════════════════════════════════════════════════════════════════
Exception caught by animation library 
'package:flutter/src/widgets/framework.dart': Failed assertion: line 3867 pos 12: '_debugLifecycleState != _ElementLifecycle.defunct': is not true.

Viewing all articles
Browse latest Browse all 97313

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>