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
Material designのWindow size classについて
Search
oyuk
June 20, 2023
Programming
1.5k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Material designのWindow size classについて
oyuk
June 20, 2023
More Decks by oyuk
See All by oyuk
Shorebird について
oyuk
0
490
Swiftでなんで[weak self]するのか?
oyuk
2
5.3k
LLVMについて調べた
oyuk
0
220
Swiftのmapからその次へ
oyuk
1
1.4k
Other Decks in Programming
See All in Programming
5分で問診!Composer セキュリティ健康診断
codmoninc
0
330
20260623_Loop Engineeringで自分の分身の問い合わせBotを作る
ryugen04
0
220
型も通る、synthも通る、それでも危ない 〜AIのCDKの権限とコストを機械で検証する〜 / It Passes Type Checks, It Passes Synth Checks, but It’s Still Risky — Automatically Verifying Permissions and Costs in AI’s CDK —
seike460
PRO
1
350
AIキャラアプリkaiwaの低遅延音声通話基盤をどう作ったか - AWS Gravitonで支える低遅延・低コストAI Agent基盤
mogamit
0
170
「正の参照」と 「負の導出」で組む ハーネスエンジニアリング
cottpan
1
140
これからAgentCoreを触る方へトレンドはGatewayです
har1101
6
500
才能?センス?知らん、 続けたもん勝ちだ。-- 結婚・出産・癌を越えてなお、私がプロダクトを創り続ける理由
16bitidol
2
860
【やさしく解説 設計編・中級 #1】一つの車に、運転手は一人 ~ある倉庫システムの事例から~
panda728
PRO
0
180
吝嗇家のためのAI活用 / AI development for miser - ChatGPT + Issue Driven Development
tooppoo
0
190
鹿野さんに聞く!『TypeScriptコードレシピ集』で磨く実践力
tonkotsuboy_com
4
1.1k
AI時代、エンジニアはどう育つのか -未経験エンジニアの成長を間近で見て考えたこと-
thasu0123
0
130
AWS CDK を「作」ってみた 〜フルスクラッチで見えた CDK の裏側〜 / aws-cdk-from-scratch
gotok365
3
430
Featured
See All Featured
Optimizing for Happiness
mojombo
378
71k
Facilitating Awesome Meetings
lara
57
7k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4.1k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.2k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
460
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
10k
The SEO identity crisis: Don't let AI make you average
varn
0
520
Paper Plane (Part 1)
katiecoart
PRO
1
9.7k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.4k
4 Signs Your Business is Dying
shpigford
187
22k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.5k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Transcript
Material designのWindow size classについて potatotips #82 2023/6/20 oyuk
自己紹介 oyuk(@oydku) プログラマ 株式会社RelicでFlutterやってます。
Window size classとは? 画面サイズ毎に分割した区分の事 [1] https://m3.material.io/foundations/layout/applying-layout/window-size-classes#6e960b82-eff3-4f1b-92d3- 5edb5e338f49
Window size classとは? [2] https://m3.material.io/foundations/layout/applying-layout/window-size-classes
Window size classの用途 Window classに応じてコンポーネントの配置、表示状態を変更する事でより良いユーザー体 験を提供できる。 [3] https://m3.material.io/foundations/layout/applying-layout/window-size-classes#6e960b82-eff3-4f1b-92d3- 5edb5e338f49
Window size classの用途 Window class毎のデザイン作成方法 1. まず一つWindow classのデザインを作成する。 2. 次の5つの質問に回答していき、次のWindow
class sizeを作っていく。 i. 何が表示されるべきか? ii. 画面をどのように分割するか? iii. 何のサイズを変える必要があるか? iv. 何の位置を変える必要があるか? v. 何を交換する必要があるか?
Window size classの用途 1 何が表示されるべきか? 小さい画面では表示されていないコンポーネントが大きい画面では表示したほうが良い場合 がある。 画像ではpaneが表示状態がcompact、expandedで違っている。 [4] https://m3.material.io/foundations/layout/applying-layout/window-size-classes
Window size classの用途 2 画面をどのように分割するか? 一つのpaneはcompact,medium、二つのpaneはexpandedで使用すると良い。 [5] https://m3.material.io/foundations/layout/applying-layout/window-size-classes#64506ae2-f4c1-4810-8ee9- d2434ab8616c
Window size classの用途 3 何のサイズを変える必要があるか? compactでのコンポーネントのサイズはmedium,expandedでは大きくする事が可能である。 [6] https://m3.material.io/foundations/layout/applying-layout/window-size-classes#69b87bd8-6ed7-4df5-a91d- 04247c47ebe1
Window size classの用途 4 何の位置を変える必要があるか? Window classが大きくなればよりスペースが大きくなる。これに合わせてコンポーネントの 位置を変える事を検討する。 例 Cardの位置を変更する
コンテンツに二つ目のカラムを追加する
Window size classの用途 5 何を交換する必要があるか? Window classが変わると同様の機能を持つコンポーネントを交換する事ができる場合があ る。図はnavigation barをnavigation railに置き換えた例。
[7] https://m3.material.io/foundations/layout/applying-layout/window-size-classes#9a45abd4-d1cf-4001-a63b- dd5c4e823bd5
実装方法 AdaptiveScaffoldとAdaptiveLayoutというAPIが提供されている。 AdaptiveLayoutの方がカスタマイズ性が高い。 https://github.com/flutter/packages/tree/main/packages/flutter_adaptive_scaffold
実装方法 これらのコンポーネントが画面サイズに応じて何を表示するかを指定する。 [8] https://github.com/flutter/packages/tree/main/packages/flutter_adaptive_scaffold#adaptivelayout
実装方法 bodyを指定する場合 AdaptiveLayout( body: SlotLayout( config: <Breakpoint, SlotLayoutConfig>{ Breakpoints.small: SlotLayout.from(
key: const Key('Body Small'), builder: (_) => ListView.builder( itemCount: children.length, itemBuilder: (BuildContext context, int index) => children[index], ), ), Breakpoints.medium: SlotLayout.from( key: const Key('Body Medium'), builder: (_) => GridView.count(crossAxisCount: 2, children: children), ) }, ),
実装方法 topNavigation等も設定可能。 const AdaptiveLayout({ super.key, this.topNavigation, this.primaryNavigation, this.secondaryNavigation, this.bottomNavigation, this.body,
this.secondaryBody, this.bodyRatio, this.internalAnimations = true, this.bodyOrientation = Axis.horizontal, });
実装方法 画面サイズに応じてコンポーネントの出し分けができている。 small medium
実装方法 large