小编zhe*_*ang的帖子

颤振卡的顶部半径被图像覆盖

当我向卡中添加图像时,卡顶部的半径被覆盖。我该如何解决?

当我向卡中添加图像时,卡顶部的半径被覆盖。我该如何解决?

class App extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(primarySwatch: Colors.yellow),
      home: Scaffold(
          backgroundColor: Colors.grey[200],
          appBar: AppBar(title: Text('Demo'),),
          body: SizedBox(
              height: 310.0,
              child: Card(
                elevation: 3.0,
                color: Colors.white,
                margin: EdgeInsets.all(8.0),
                child: Column(
                  crossAxisAlignment: CrossAxisAlignment.start,
                  children: <Widget>[
                    SizedBox(height: 0.0,),
                    Image.network('https://img.zcool.cn/community/012157578c405f0000012e7e69e7cd.jpg@1280w_1l_2o_100sh.jpg'),
                    SizedBox(height: 16.0,),
                    Row(
                      children: <Widget>[
                        SizedBox(width: 16.0,),
                        Text('??', style: Theme.of(context).textTheme.headline,),
                        SizedBox(width: 16.0,),
                        Text('????', style: Theme.of(context).textTheme.subhead,),
                      ],
                    ),
                    SizedBox(height: 16.0,),
                  ],
                ),
              ))),
    );
  }
}
Run Code Online (Sandbox Code Playgroud)

这是渲染

在此处输入图片说明

flutter flutter-layout

5
推荐指数
3
解决办法
2104
查看次数

标签 统计

flutter ×1

flutter-layout ×1