Code snippet:
Widget _ getRowWidget2 () {
return new Row(children: <Widget>[
new Flexible(
flex: 1,
fit: FlexFit.tight, //androidweight=1
child: new Stack(children: <Widget>[
new Column(children: <Widget>[
new Text("title".trim(),
style: new TextStyle(color: Colors.black, fontSize: 20.0,),
textAlign: TextAlign.left),
new Text("desc", maxLines: 3,)
],)
],)
),
new ClipRect(child: new FadeInImage.assetNetwork(
placeholder: "images/ic_shop_normal.png",
image: "images/ic_shop_normal.png",
width: 50.0,
height: 50.0,
fit: BoxFit.fitWidth,),),
],);
}
effect:
question:
1, according to my understanding is an one-line two-column layout, but the code is written in two lines, why?
2. I don"t quite understand the usage of Flexible and Stack.