Rannie / flui

A powerful UI framework for Google Flutter.

Home Page:https://www.flui.xin/en/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

使用 Toast 导致 文本框双击就报错

Exclusive-gfj opened this issue · comments

环境:
flutter SDK - 1.17.0
flui: ^0.9.1

错误

The following assertion was thrown building _OverlayEntryWidget-[LabeledGlobalKey<_OverlayEntryWidgetState>#802fc](dirty, state: _OverlayEntryWidgetState#171e5):
No MediaQuery widget found.

_OverlayEntryWidget widgets require a MediaQuery widget ancestor.
The specific widget that could not find a MediaQuery ancestor was: _OverlayEntryWidget-[LabeledGlobalKey<_OverlayEntryWidgetState>#802fc]
dirty
state: _OverlayEntryWidgetState#171e5
The ownership chain for the affected widget is: "_OverlayEntryWidget-[LabeledGlobalKey<_OverlayEntryWidgetState>#802fc] ← _Theatre ← Overlay ← Stack ← Directionality ← _FLToastDefaultsWidget ← FLToastProvider ← MyApp ← _InheritedProviderScope ← ChangeNotifierProvider ← ⋯"

Typically, the MediaQuery widget is introduced by the MaterialApp or WidgetsApp widget at the top of your application widget tree.

ok 我这边跟进下

hi @Exclusive-gfj , 我这边修改了 FLToastProvider 的使用方式 https://www.flui.xin/widgets/toast.html#fltoastdefaults,感谢指出~