flutter-Container

Container(
          constraints: BoxConstraints.expand(
            height: Theme.of(context).textTheme.display1.fontSize * 1.1 + 200.0,
          ),
          decoration: BoxDecoration(
            border: Border.all(width: 2.0,color: Colors.red),
            color: Colors.grey,
            borderRadius: BorderRadius.all(Radius.circular(20.0)),
            image: DecorationImage(
              image: NetworkImage('http://h.hiphotos.baidu.com/zhidao/wh%3D450%2C600/sign=0d023672312ac65c67506e77cec29e27/9f2f070828381f30dea167bbad014c086e06f06c.jpg'),
              centerSlice: Rect.fromLTRB(270.0, 180.0, 1360.0, 730.0),//用于图片拉伸区域
            ),
          ),
          padding: const EdgeInsets.all(8.0),
          alignment: Alignment.center,
          child: Text('Hello World',style: Theme.of(context).textTheme.display1.copyWith(color: Colors.black),),
          transform: Matrix4.rotationZ(0.3),
        )

你可能感兴趣的:(flutter-Container)