flutter image boxfit
contain → const BoxFit
As large as possible while still containing the source entirely within the target box.
const BoxFit(1)cover → const BoxFitAs small as possible while still covering the entire target box.
const BoxFit(2)fill → const BoxFitFill the target box by distorting the source's aspect ratio.
const BoxFit(0)fitHeight → const BoxFitMake sure the full height of the source is shown, regardless of whether this means the source overflows the target box horizontally.
const BoxFit(4)fitWidth → const BoxFitMake sure the full width of the source is shown, regardless of whether this means the source overflows the target box vertically.
const BoxFit(3)none → const BoxFitAlign the source within the target box (by default, centering) and discard any portions of the source that lie outside the box.
The source image is not resized.
const BoxFit(5)scaleDown → const BoxFitAlign the source within the target box (by default, centering) and, if necessary, scale the source down to ensure that the source fits within the box.
This is the same as contain if that would shrink the image, otherwise it is the same as none.
const BoxFit(6)總結(jié)
以上是生活随笔為你收集整理的flutter image boxfit的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 计算机cad论文参考文献,autocad
- 下一篇: ps用计算机,教你用photoshop绘