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.2k
Flutter List View 概要
najeira
May 31, 2018
Tweet
Share
More Decks by najeira
See All by najeira
Flutter with Platform
najeira
4
1.5k
Google I/O 2019 Extended Tokyo - Flutter
najeira
1
200
Flutter APP DOJO 2019-04
najeira
1
190
Flutterとの1年
najeira
4
1.6k
Flutter / Google I/O 2018 報告会 信州
najeira
0
320
仕組みを知れば怖くない! Flutter入門
najeira
16
8k
FlutterでAndroid/iOS両対応のアプリ開発
najeira
0
4.6k
Google I/O 2017 報告会 Firebase/Cloud
najeira
1
180
Google I/O 2017 報告会 Flutter/Dart
najeira
1
340
Other Decks in Technology
See All in Technology
データの整合性を保ちたいだけなんだ
shoheimitani
8
3.2k
What happened to RubyGems and what can we learn?
mikemcquaid
0
300
Ruby版 JSXのRuxが気になる
sansantech
PRO
0
160
AWS Network Firewall Proxyを触ってみた
nagisa53
1
240
配列に見る bash と zsh の違い
kazzpapa3
3
160
AIエージェントを開発しよう!-AgentCore活用の勘所-
yukiogawa
0
170
予期せぬコストの急増を障害のように扱う――「コスト版ポストモーテム」の導入とその後の改善
muziyoshiz
1
2k
外部キー制約の知っておいて欲しいこと - RDBMSを正しく使うために必要なこと / FOREIGN KEY Night
soudai
PRO
12
5.6k
日本の85%が使う公共SaaSは、どう育ったのか
taketakekaho
1
230
顧客との商談議事録をみんなで読んで顧客解像度を上げよう
shibayu36
0
260
レガシー共有バッチ基盤への挑戦 - SREドリブンなリアーキテクチャリングの取り組み
tatsukoni
0
220
20260204_Midosuji_Tech
takuyay0ne
1
160
Featured
See All Featured
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
280
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
0
3.4k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.3k
The SEO Collaboration Effect
kristinabergwall1
0
350
Why Our Code Smells
bkeepers
PRO
340
58k
Typedesign – Prime Four
hannesfritz
42
2.9k
KATA
mclloyd
PRO
34
15k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
590
The Curious Case for Waylosing
cassininazir
0
240
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