-4

在此处输入图像描述

我的朋友...

我可以在颤动中得到这个代码吗?

我没有更多的解释。

马上给我代码!!

我对颤振很陌生,请帮助我。

Container(
          padding: EdgeInsets.fromLTRB(10, 10, 10, 0),
          height: 220,
          width: double.maxFinite,
          child: Card(
            elevation: 5,
            child: Stack(
              children: <Widget>[
                Image(
                  image: AssetImage("assets/images/background.png"),
                  color: Colors.black45,
                  colorBlendMode: BlendMode.darken,
                  width: MediaQuery.of(context).size.width,
                  height: MediaQuery.of(context).size.height,
                  fit: BoxFit.cover,
                ),
                Container(
                  
                  color: Colors.white,
                  child: Text('sdf'),
                )
              ],
            ),
          ),
        ),

到目前为止,这是我的进步。

4

1 回答 1

1

您可以使用以下代码并根据需要对其进行改进。谢谢我希望它会有所帮助

Container(
padding: EdgeInsets.fromLTRB(10, 10, 10, 10),
height: 220,
width: 300,
child: Card(
  elevation: 5,
  child: Column(
    children: <Widget>[
      Image(
        image: NetworkImage(
            "https://i.pinimg.com/236x/11/dc/43/11dc43c418eda8a1a7b74833be82ba64.jpg"),
        color: Colors.black45,
        colorBlendMode: BlendMode.darken,
        width: double.maxFinite,
        height: 110,
        fit: BoxFit.cover,
      ),
      Container(
        padding: EdgeInsets.only(left: 10, right: 10),
        color: Colors.white,
        child: Column(
            //      crossAxisAlignment: CrossAxisAlignment.start,
            mainAxisAlignment: MainAxisAlignment.start,
            children: [
              Row(
                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
                  children: [Text("hello"), Text("hello")]),
              SizedBox(height: 10),
              Row(mainAxisAlignment: MainAxisAlignment.start, children: [
                Text("hello"),
                SizedBox(width: 3),
                Text("hello")
              ]),
              SizedBox(height: 10),
              Row(mainAxisAlignment: MainAxisAlignment.start, children: [
                Text("hello"),
                SizedBox(width: 3),
                Text("hello")
              ]),
              SizedBox(height: 10),
            ]),
      )
    ],
  ),
),

);

于 2020-08-26T07:58:35.847 回答