「Flutter/画像/url」の版間の差分
提供: 初心者エンジニアの簡易メモ
(→画像サイズ) |
(→これだけ) |
||
| (同じ利用者による、間の1版が非表示) | |||
| 行1: | 行1: | ||
| − | == | + | ==サンプル== |
| − | Image.network('https://example.com/hogehoge.png') | + | Image.network('https://example.com/hogehoge.png'); |
| + | これだけで、asyncで処理して画面にfit表示までしてくれる。 | ||
==画像サイズ== | ==画像サイズ== | ||
| 行19: | 行20: | ||
BoxFit.scaleDown | BoxFit.scaleDown | ||
</pre> | </pre> | ||
| + | |||
| + | ==参考== | ||
| + | http://soudan.hatenablog.jp/entry/flutter-image-boxfit | ||
2019年12月18日 (水) 12:36時点における最新版
サンプル
Image.network('https://example.com/hogehoge.png');
これだけで、asyncで処理して画面にfit表示までしてくれる。
画像サイズ
Image.network(threads[index].thumbnail,
height: 40.0,
width: 40.0,
fit: BoxFit.fill);
FitType
BoxFit.fill BoxFit.contain BoxFit.cover BoxFit.fitWidth BoxFit.fitHeight BoxFit.none BoxFit.scaleDown
