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
1k
Flutter List View 概要
najeira
May 31, 2018
Tweet
Share
More Decks by najeira
See All by najeira
Flutter with Platform
najeira
4
1.3k
Google I/O 2019 Extended Tokyo - Flutter
najeira
1
160
Flutter APP DOJO 2019-04
najeira
1
170
Flutterとの1年
najeira
4
1.4k
Flutter / Google I/O 2018 報告会 信州
najeira
0
260
仕組みを知れば怖くない! Flutter入門
najeira
16
7.7k
FlutterでAndroid/iOS両対応のアプリ開発
najeira
0
4.4k
Google I/O 2017 報告会 Firebase/Cloud
najeira
1
150
Google I/O 2017 報告会 Flutter/Dart
najeira
1
290
Other Decks in Technology
See All in Technology
SOLID - Architecture and Architectural Decisions - Devfest Goa 2024
rivuchk
0
160
マルチテナントのサービスインフラに大きなテナントを受け入れるまで
7474
0
720
Japan AWS Jr. Championsがお届けする、アウトプットのすすめ
hamijay_cloud
0
200
寒冷地稲作の歴史にみるコミュニティ
miu_crescent
2
140
KongによるAPIライフサイクル マネジメント
hashitokyo
1
160
生成AI入門
shukob
0
150
Azure AI servicesと歯のおはなし/AzureTravelers_Fukuoka2024_baba
nina01
1
110
複数の外部サービスデータの統合と変換を実現する Railsのインポートアーキテクチャ / Rails import architecture for integration and transformation of multiple external service data
aiandrox
0
290
いまいまMySQL2024 @ OSC Nagaoka
sakaik
3
290
AWS Lambda と Amazon SQS で「わかった気になれる」FreeRTOS 入門
soracom
PRO
2
140
Bluesky 2019〜2022
yamarten
1
120
入社半年(合計1年)でGoogle Cloud 認定を全冠した秘訣🤫
risatube
1
270
Featured
See All Featured
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
Building an army of robots
kneath
302
42k
Bash Introduction
62gerente
608
210k
Mobile First: as difficult as doing things right
swwweet
222
8.9k
How to train your dragon (web standard)
notwaldorf
87
5.6k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
40
2.1k
Art, The Web, and Tiny UX
lynnandtonic
296
20k
Docker and Python
trallard
40
3k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
46
4.9k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
105
48k
Designing for humans not robots
tammielis
249
25k
Fireside Chat
paigeccino
32
3k
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