Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Flutter List View 概要
Search
najeira
May 31, 2018
Technology
0
1.1k
Flutter List View 概要
najeira
May 31, 2018
Tweet
Share
More Decks by najeira
See All by najeira
Flutter with Platform
najeira
4
1.4k
Google I/O 2019 Extended Tokyo - Flutter
najeira
1
190
Flutter APP DOJO 2019-04
najeira
1
190
Flutterとの1年
najeira
4
1.5k
Flutter / Google I/O 2018 報告会 信州
najeira
0
310
仕組みを知れば怖くない! Flutter入門
najeira
16
8k
FlutterでAndroid/iOS両対応のアプリ開発
najeira
0
4.5k
Google I/O 2017 報告会 Firebase/Cloud
najeira
1
170
Google I/O 2017 報告会 Flutter/Dart
najeira
1
320
Other Decks in Technology
See All in Technology
使いやすいプラットフォームの作り方 ー LINEヤフーのKubernetes基盤に学ぶ理論と実践
lycorptech_jp
PRO
0
120
共有と分離 - Compose Multiplatform "本番導入" の設計指針
error96num
2
1.1k
品質視点から考える組織デザイン/Organizational Design from Quality
mii3king
0
210
5分でカオスエンジニアリングを分かった気になろう
pandayumi
0
260
AWSで始める実践Dagster入門
kitagawaz
1
740
RSCの時代にReactとフレームワークの境界を探る
uhyo
10
3.5k
Apache Spark もくもく会
taka_aki
0
130
LLM時代のパフォーマンスチューニング:MongoDB運用で試したコンテキスト活用の工夫
ishikawa_pro
0
170
5年目から始める Vue3 サイト改善 #frontendo
tacck
PRO
3
230
slog.Handlerのよくある実装ミス
sakiengineer
4
470
新規プロダクトでプロトタイプから正式リリースまでNext.jsで開発したリアル
kawanoriku0
1
200
下手な強制、ダメ!絶対! 「ガードレール」を「檻」にさせない"ガバナンス"の取り方とは?
tsukaman
2
460
Featured
See All Featured
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
44
2.5k
Music & Morning Musume
bryan
46
6.8k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.9k
Build your cross-platform service in a week with App Engine
jlugia
231
18k
Imperfection Machines: The Place of Print at Facebook
scottboms
268
13k
How to train your dragon (web standard)
notwaldorf
96
6.2k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
33
2.4k
Build The Right Thing And Hit Your Dates
maggiecrowley
37
2.9k
Raft: Consensus for Rubyists
vanstee
140
7.1k
The Cult of Friendly URLs
andyhume
79
6.6k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.6k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
53
2.9k
Transcript
Flutter List View Flutter Meetup Tokyo 2018/05/29 @najeira Flutter List
View 1
Row, Column Flutter List View 2
Column 縦方向のリスト ※Row は横方向 Flutter List View 3
Column new Column( children: <Widget>[ new ListTile( leading: new Icon(Icons.map),
title: new Text('Map'), ), ... ], ), Flutter List View 4
ListView 単純なリスト Flutter List View 5
ListView new ListView( children: <Widget>[ new ListTile( leading: new Icon(Icons.map),
title: new Text('Map'), ), ... ], ), ※child は ListTile でなくとも何でもよい Flutter List View 6
Column or ListView 画面に収まる場合はColumn スクロー ルが必要な場合はListView Flutter List View 7
ListView 数が多い場合は children を生成せず builder を使う new ListView.builder( itemCount: 100,
itemBuilder: (BuildContext context, int index) { return new ListTile( title: new Text('$index'), ); }, ), ※ 必要になったときに itemBuilder が呼ばれるので child の生成を lazy にできる Flutter List View 8
GridView Flutter List View 9
GridView new GridView( gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(cros children: <Widget>[ new Container(
color: Colors.red, alignment: Alignment.center, child: new Text('red', style: style), ), ], ... ), Flutter List View 10
GridView デフォルトだと正方形のグリッドになる gridDelegate に渡している SliverGridDelegateWithFixedCrossAxisCount の childAspectRatio で縦横比率は変えられる Flutter List
View 11
GridView SliverGridDelegate と SliverGridLayout を実装すれば より細かいコントロー ルが可能 Flutter List View
12
独自GridView の例 Flutter List View 13
Sliver Flutter List View 14
Sliver 日本語だと「 小片」 とか「 細片」 とか「 一部」? ListView やGridView より、
いろいろ出来る 低レイヤの機能 ListView やGridView も内部ではSliver を使っている Flutter List View 15
SliverList new CustomScrollView( slivers: <Widget>[ new SliverList( delegate: new SliverChildListDelegate(
<Widget>[ new ListTile( leading: new Icon(Icons.map), title: new Text('Map'), ), .... ※ 最初のListView と同等のUI Flutter List View 16
Header 例えば見出しなど Flutter List View 17
Header CustomScrollView は sliver のリストを受け取る new CustomScrollView( slivers: <Widget>[ new
SliverToBoxAdapter( child: new Text(" リストの見出し"), ), new SliverList( delegate: new SliverChildListDelegate( <Widget>[ new ListTile( leading: new Icon(Icons.map), title: new Text('Map'), ), .... Flutter List View 18
SliverAppBar new CustomScrollView( slivers: <Widget>[ new SliverAppBar( title: new Text('SliverAppBar'),
floating: true, ), new SliverList( delegate: new SliverChildBuilderDelegate( (BuildContext context, int index) { return new MyRow( ... ); }, childCount: 1000, ... Flutter List View 19
リスト関連のWidget Column ListView GridView CustomScrollView Sliver Sliver**Delegate Flutter List View
20