在颤动中,我想显示 .9 图像。我使用 DecorationImage's centerSlice.and 我有 3x 图像 156x48 px。但现在我想让小部件高度为 16px。如果我将图像大小更改为 52x16。图像会模糊。我该怎么做,谢谢。
Container(
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage('images/icon_vip_bg.png'),// 256x48 i want to sale to 1/3
centerSlice: Rect.fromLTWH(10, 8, 20, 0.5),
),
),
child: Container(
height: 48, // i want to make height to 16
width: 200,
padding: EdgeInsets.only(left: 10,right: 20),
child: Text('abcde',style: TextStyle(fontSize: 12,color: Colors.redAccent),),
),
)