-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Description
Steps to Reproduce
-
follow to write the code of flutter gallery card example
https://github.com/flutter/flutter/blob/master/examples/flutter_gallery/lib/demo/material/cards_demo.dart

-
I don't know the logic with stack combine with fittedbox. Why there is a height ? I just follow the tutorial of setting bottom, left, right to 16.0,16.0,16.0. If i do not have any misunderstanding, it's a margin between parent and size-box. Why would have height existing ? Is there any black magic code of that? I just want to understand the logic of that.
var titleImage2 = new SizedBox(
height: 200.0,
child: new Stack(
children : <Widget> [
//new Text("First element" , style: new TextStyle(color: Colors.red),),
new Positioned(
//top: 0.0,
left : 16.0,
right : 16.0,
bottom: 16.0,
//width: 100.0,
child: new FittedBox(
fit : BoxFit.scaleDown,
alignment: Alignment.topLeft,
child : new Container(
child: new Text(
"Hello world"
),
)
),
)],
),
); Summary : Why only set left ,right, bottom to margin 16.0, it will appear an existing height? I'm a newbie of flutter
left : 16.0,
right : 16.0,
bottom: 16.0,Metadata
Metadata
Assignees
Labels
No labels

