class StackWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
// TODO: implement build
return Stack(
children: <Widget>[
Container(color: Colors.purple,width: 200,height: 200,),
Positioned(
left: 20,
top: 20,
child: Icon(Icons.pets,size: 50,color: Colors.red,),
),
Positioned(
bottom: 20,
right: 20,
child: Text("你好 Roy",style: TextStyle(fontSize: 20,color: Colors.blue),),
),
],
);
}
}
网友评论