Closed gongqinjing closed 4 years ago
Issue-Label Bot is automatically applying the label bug
to this issue, with a confidence of 0.57. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!
Links: app homepage, dashboard and code for this bot.
请贴一下具体报错信息
═══════ Exception caught by scheduler library ═════════════════════════════════ The following assertion was thrown during a scheduler callback: setState() called after dispose(): KeyboardPageState#836dd(lifecycle state: defunct, not mounted)
This error happens if you call setState() on a State object for a widget that no longer appears in the widget tree (e.g., whose parent widget no longer includes the widget in its build). This error can occur when code calls setState() from a timer or an animation callback.
The preferred solution is to cancel the timer or stop listening to the animation in the dispose() callback. Another solution is to check the "mounted" property of this object before calling setState() to ensure the object is still in the tree. This error might indicate a memory leak if setState() is being called because another object is retaining a reference to this State object after it has been removed from the tree. To avoid memory leaks, consider breaking the reference to this object during dispose().
When the exception was thrown, this was the stack
package:flutter/…/widgets/framework.dart:1112
package:flutter/…/widgets/framework.dart:1147
package:cool_ui/keyboards/keyboard_manager.dart:424
package:flutter/…/scheduler/binding.dart:1102
package:flutter/…/scheduler/binding.dart:1049 ... ═══════════════════════════════════════════════ 用的代码是example ,没有改动
请查看最新版本
导致有两个键盘切换的时候有一系列报错,github上的代码没有问题