- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在构建navigationDrawer 时遇到错误,其中tootlip 小部件需要materialApp 作为祖先。
这是错误所说的:
I/flutter ( 5780): _TooltipState#bc79e(ticker inactive)):
I/flutter ( 5780): No Overlay widget found.
I/flutter ( 5780): Tooltip widgets require an Overlay widget ancestor for correct operation.
I/flutter ( 5780): The most common way to add an Overlay to an application is to include a MaterialApp or Navigator
I/flutter ( 5780): widget in the runApp() call.
I/flutter ( 5780): The specific widget that failed to find an overlay was:
I/flutter ( 5780): Tooltip
I/flutter ( 5780):
I/flutter ( 5780): The relevant error-causing widget was:
I/flutter ( 5780): AppBar
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
... //basic info title & theme
builder: (context, child) => LayoutTemplate(child: child),
initialRoute:"/home",
... //Routing stuff like generate route & navigator key
);
}
}
class LayoutTemplate extends StatelessWidget {
final Widget child;
const LayoutTemplate({Key key, this.child}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text("home"))
drawer: NavDrawer()
body: Column(
children: <Widget>[
//NavigationBar(),
Expanded(
child: child,
)
],
),
);
}
}
builder
来自
MaterialApp
导致它。
最佳答案
在您的构建器中,只需返回一个带有 LayoutTemplate 作为 OverlayEntry 的 Overlay 小部件。
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
... //basic info title & theme
builder: (context, child) {
return Overlay(
initialEntries: [
OverlayEntry(
builder: (context) => LayoutTemplate(child: child),
),
],
);
},
initialRoute:"/home",
... //Routing stuff like generate route & navigator key
);
}
}
关于flutter - MaterialApp 构建器错误 : No Overlay widget found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61087158/
我有一个带有用于覆盖的 css 类的面板,其中包含一个不应该透明的 div
我已经尝试了 2 天不让 openldap 的 memberof overlay 工作并给出一些实际结果。我的数据库配置: database bdb suffix "dc=exampl
我想使用 jquery ui 弹出一个模式对话框,其中覆盖层是全黑的。我知道我可以在主题中设置它,但我不希望所有对话框都有黑色覆盖。只是其中之一。 有没有办法在每个对话框的基础上配置对话框的背景(覆盖
我是新来的,所以如果我问错了问题或忘记了什么,我先道歉。我尝试了其他问题/答案中的内容,但无法解决我的问题。 我在 div1 上有一个简单的叠加 div2。 div1 里面有一个 svg。 svg 向
我正在使用 npm overlay-navbar 模块创建一个 overlay-navbar https://www.npmjs.com/package/overlay-navbar但是我收到一个错误
我只想为我在 nix 的叠加层中定义的构建应用配置点。 也就是我要设置 permittedInsecurePackages = [ "webkitgtk-2.4.11" ]; 在叠加层中。我
我需要有关如何正确使用 Google Maps API v3 自定义叠加层的 onRemove() 方法的帮助。我在 Google map 上有一个标记,单击该标记时,将显示一个 d3 圆环图,该图将
首先这是我正在使用和尝试做的事情: 此效果的最小设置:flowplayer.org/tools/demos/overlay/index.html 然后是 Apple Leopard 预览效果:flow
我的问题真的很简单...... 想象一张代表您家周围的街道和建筑物的背景图片,请注意这是专门制作的图片。此图像( View )是可缩放的,到目前为止一切都很好。类似于 map ,但使用图像代替。 现在
我正在使用花式框在行内 div 中打开各种编辑功能。我使用ajax获取div内容,将其移动到div中,然后在Fancybox中打开div。大多数情况下效果很好。一些编辑 block 中包含 ckedi
在应用程序中扩展 OSMdroid Overlay 类时 import org.osmdroid.views.overlay.Overlay; ... public class MapOverlayA
我的应用程序有问题,其中包括 osmdroid。每次我尝试在我的设备上运行该应用程序并触摸 map 时,该应用程序都会崩溃,并且出现此错误: 2018-10-02 14:11:45.191 1
我如何在UWP应用程序中实现这样的功能?使用案例:静态图像包含蓝点(覆盖),使用户有机会在蓝点上单击/悬停以了解更多信息。当用户悬停/单击蓝点时,会弹出一个文本来描述图像中的内容。。1)如何在静态图像
仅适用于 iOS:当您将叠加层添加到 Web HTML 用户界面时,您无法通过设置 overflow: hidden on the body 或 html 来阻止底层页面滚动到叠加层之外。这在桌面和
我是 HTML/CSS 新手。我创建了这个侧边栏,当单击时,它会从左侧滑动,滑动时会显示不透明背景。不幸的是,图像显示在不透明覆盖层的顶部,我找不到让它停止在不透明覆盖层上如此明亮地显示的问题。我正在
是否可以创建一个窗口作为另一个窗口的叠加层,例如,您可以在窗口的标题栏或状态栏中显示一个图标? 为了这个问题的目的假设: 该窗口是一个外部窗口(不属于我的应用程序) 叠加层为 16x16 像素并具有透
在 bokeh Holoviews 画廊中,有一个名为“Scatter economic”的示例。 http://holoviews.org/gallery/demos/bokeh/scatter_e
制作 gwt 覆盖类型的深拷贝的最佳方法是什么? 我正在寻找一个函数或库来检查 GWT 覆盖并克隆它。它必须能够克隆包含的数组或对象。 谢谢 最佳答案 我会考虑两种方式。大多数时候覆盖对象与 JSON
最近,我尝试创建一个 Ionic 侧边菜单。我想让侧面菜单覆盖联系人。 但是,我不想推送内容。 --> fu
我正在尝试在另一个正在运行的应用程序上方创建一个覆盖窗口。 让我们说火狐。我通过使用实现 创建窗口 win = XCreateWindow( display, *firefoxwindow,
我是一名优秀的程序员,十分优秀!