单击第一张图像,然后切换第二张图像。并且第二张图片也应该显示在背面
Stack(
children: <Widget>[
Positioned(
child: GestureDetector(
child: Container(
height: 100,
width: 100,
color: Colors.red,
),
onTap: () {
setState(() {
showMessage = true;
});
},
)),
AnimatedPositioned(
child: Container(
height: 50,
width: 50,
color: showMessage? Colors.green:Colors.blue,
),
duration: Duration(seconds: 5),
bottom: showMessage ? 70 : 10,
right: 10,
)
],
)
切换时图像应该旋转