medyas / flutter_zoom_drawer

A Flutter package with custom implementation of Drawer
MIT License
457 stars 102 forks source link

getting Unhandled Exception: Bad state: You cannot close the subject while items are being added from addStream #8

Closed kw2019ltd closed 4 years ago

kw2019ltd commented 4 years ago

hi i copied the example you provided , i am getting below error in logs while trying to press back button.

see below

image

  @override
  void dispose() {
    _locationStreamController.close();
    FlutterQiblah().dispose();
    super.dispose();
  }

Performing hot reload... Syncing files to device HD1903... Reloaded 3 of 1365 libraries in 529ms. E/flutter ( 4181): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: Bad state: You cannot close the subject while items are being added from addStream E/flutter ( 4181): #0 Subject.close (package:rxdart/src/subjects/subject.dart:152:7) E/flutter ( 4181): #1 FlutterCompass.dispose (package:flutter_compass/flutter_compass.dart:35:21) E/flutter ( 4181): #2 FlutterQiblah.dispose (package:flutter_qiblah/flutter_qiblah.dart:87:22) E/flutter ( 4181): #3 _QiblahCompassState.dispose (package:salatkapp/ui/prayer/qibla/qiblah_compass.dart:89:21) E/flutter ( 4181): #4 StatefulElement.unmount (package:flutter/src/widgets/framework.dart:4729:12) E/flutter ( 4181): #5 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1922:13) E/flutter ( 4181): #6 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1920:7) E/flutter ( 4181): #7 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4556:14) E/flutter ( 4181): #8 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1918:13) E/flutter ( 4181): #9 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1920:7) E/flutter ( 4181): #10 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4556:14) E/flutter ( 4181): #11 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1918:13) E/flutter ( 4181): #12 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1920:7) E/flutter ( 4181): #13 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4556:14) E/flutter ( 4181): #14 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1918:13) E/flutter ( 4181): #15 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1920:7) E/flutter ( 4181): #16 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4556:14) E/flutter ( 4181): #17 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1918:13) E/flutter ( 4181): #18 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1920:7) E/flutter ( 4181): #19 MultiChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:5929:16) E/flutter ( 4181): #20 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1918:13) E/flutter ( 4181): #21 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1920:7) E/flutter ( 4181): #22 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4556:14) E/flutter ( 4181): #23 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1918:13) E/flutter ( 4181): #24 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1920:7) E/flutter ( 4181): #25 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4556:14) E/flutter ( 4181): #26 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1918:13) E/flutter ( 4181): #27 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1920:7) E/flutter ( 4181): #28 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4556:14) E/flutter ( 4181): #29 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1918:13) E/flutter ( 4181): #30 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1920:7) E/flutter ( 4181): #31 SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:5817:14) E/flutter ( 4181): #32 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1918:13) E/flutter ( 4181): #33 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1920:7) E/flutter ( 4181): #34 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4556:14) E/flutter ( 4181): #35 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1918:13) E/flutter ( 4181): #36 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1920:7) E/flutter ( 4181): #37 SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:5817:14) E/flutter ( 4181): #38 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1918:13) E/flutter ( 4181): #39 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1920:7) E/flutter ( 4181): #40 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4556:14) E/flutter ( 4181): #41
W/IInputConnectionWrapper( 4181): getExtractedText on inactive InputConnection W/IInputConnectionWrapper( 4181): getTextBeforeCursor on inactive InputConnection D/OnePlusJankManager( 4181): Chor uploadMDM JANK_TYPE_ONCE mViewTitle = kw.ltd.salatkapp/kw.ltd.salatkapp.MainActivity--- jank level = 1

medyas commented 4 years ago

This is the wrong repo, please move the issue to the flutter_qiblah repo

Chiida commented 4 years ago

Hi @kw2019ltd Did you solve your problem related to "Stateful Element.unmount (package:flutter/src/widgets/framework.dart:4729:12)"? I'm also having that problem on another app, and I coudn't find a solution for that.

kw2019ltd commented 4 years ago

Hi issue moved to other plugin and issue opened on flutter compass plugin

On Tue, Jul 21, 2020, 13:16 Faruk Ćidić notifications@github.com wrote:

Hi @kw2019ltd https://github.com/kw2019ltd Did you solve your problem related to "Stateful Element.unmount (package:flutter/src/widgets/framework.dart:4729:12)"? I'm also having that problem on another app, and I coudn't find a solution for that.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/medyas/flutter_zoom_drawer/issues/8#issuecomment-661769106, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALJEI6TVSNIALJLYADCEBWTR4VTIZANCNFSM4NZQELZA .