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),
        )
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容