从iOS开发与正在添加快捷我能够提出具有跨期模态溶解的动画和清晰的背景显示是什么当前视图后面,将其模糊化,仿佛像一个弹出窗口,我怎么能在颤振实现这一目标?我使用Fluro导航到下一个视图,淡入过渡效果,但当我将容器和材质小部件颜色更改为透明时,背景为黑色.
我如何导航到下一页:
__PRE__
过滤页面代码:
__PRE__
**更新**
我得到了我的目标,但是有一个很大的问题.我将过滤器小部件和主容器小部件放在一个__CODE__
小部件中,将过滤器小部件置于顶部,但最初的不透明度为0.我想要的效果完美但现在我无法与它下面的小部件进行交互,因为它完全覆盖了另一个小部件......
码:
__PRE__
我有两个容器,两个容器都有GestureDetector。第一个容器的OnTap工作正常,但不能与另一个容器一起使用。第一个容器是图像,第二个容器是部分在第一个容器上对齐的绿色背景。
new Stack(
alignment: Alignment(0.0, 1.44),
children: <Widget>[
GestureDetector(
onTap: () => _openImage(context),
child: Container(
width: 340.0,
foregroundDecoration: new BoxDecoration(
color: Color.fromRGBO(155, 85, 250, 0.55)),
height: 240.0,
child: FadeInImage.assetNetwork(
placeholder: 'assets/dimlight.png',
image: post.imageUrl,
fit: BoxFit.cover,
),
),
),
new GestureDetector(
child: new Container(
color: Colors.green,
child: Row(
mainAxisSize: MainAxisSize.max,
children: <Widget>[
SizedBox(width: 7.0),
CircleAvatar(
backgroundImage:
new AssetImage("assets/boy.png")
radius: 30.0,
),
SizedBox(
width: 7.0,
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
new SizedBox(
height: 20.0,
),
Text(
post.user.name,
style: TextStyle(fontWeight: FontWeight.bold),
), …
Run Code Online (Sandbox Code Playgroud) 在我的应用程序树中,我有两个小部件:
GestureDetector(
onTap: () => print('Outer'),
child: IconButton(
icon: Icon(Icons.add),
onPressed: () => print('Inner')),
),
)
Run Code Online (Sandbox Code Playgroud)
他们都试图对触摸事件做出反应,但只有孩子的回调被调用(这是默认行为)。是否可以以阻止祖先将触摸事件传播给其子级的方式定义小部件?或者也许唯一的方法是自己实现这种行为,例如通过使用GestureArena
?