Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Flutterレイアウト入門
Search
jalemy
November 28, 2019
Programming
280
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Flutterレイアウト入門
jalemy
November 28, 2019
More Decks by jalemy
See All by jalemy
AWS LightsailでHTTPS対応WordPress構築 & ShifterでサーバーレスWordPress
jalemy
0
450
モダンGASプログラミング
jalemy
1
1.3k
Other Decks in Programming
See All in Programming
JRuby: Past, Present, and Future
headius
0
230
SalesForceを内製化!? ~ HR事業を支える顧客管理基盤のインフラを大公開 ~
oku053
0
160
コードで差別化できない時代の ソフトウェアエンジニアリング / Software Engineering in an Era Where Code Doesn’t Differentiate
kishida
2
130
Apple Intelligence を用いた個人情報誤送信防止、及びユーザーリクエスト体験の改善について
yukiny
0
320
[ハンズオン]AIへの指示だけで「五目並べ」を作ってみよう
satoshi256kbyte
1
360
wkhtmltopdfの次どうするか問題2026
willnet
2
1.9k
Androidだけじゃない、DroidKaigiで広がった私の技術スタック
akkeylab
0
120
Unity6 URPによる海底をテーマにしたVJシステムの解説 | Unity Shader 完全に理解した 勉強会
gam0022
0
340
R8 の設定見直しでアプリサイズ削減
andpad
0
190
iOS 27でニュースアプリはどう変わる!? 〜日経電子版の新機能対応と、開発事例から〜
lynnswap
7
13k
APNsからLive Activityを開始する話
yumnumm
0
160
パーソナライズPodcastを作った話
repunit11
0
130
Featured
See All Featured
Build your cross-platform service in a week with App Engine
jlugia
234
19k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
8.1k
Done Done
chrislema
187
17k
Claude Code のすすめ
schroneko
67
230k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
Building AI with AI
inesmontani
PRO
1
1.3k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
12k
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
Building Adaptive Systems
keathley
44
3.2k
It's Worth the Effort
3n
188
29k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
3
3.9k
Transcript
Flutterレイアウト入門 ゆるはち.it(2019/11/28) @jalemy
自己紹介 • 佐野友亮(@jalemy) ◦ じゃれみーって呼んでください • Unity/C#→なんやかんや→Laravel+Vue.js(今 •
Flutter良さそうだなと思って勉強中
Flutterとは
Flutterとは • Googleが開発しているモバイルアプリケーションフレームワーク • クロスプラットフォーム開発 ◦ iOS, Android向けにアプリケーションを作れる
◦ Webアプリも(https://flutter.dev/web) ◦ デスクトップアプリも!( https://github.com/flutter/flutter/wiki/Desktop-shells) ◦ 将来的にIoTデバイスなど組み込み環境でも実行できるようになるらしい • 言語はDart
Dart言語 • Googleが開発している プログラミング言語 • 初出は2011年 • JavaScriptの問題点を解決すると
言われていた • しかし、TypeScriptなどの台頭により 一時断念…… Flutterのfizzbuzz
Dart言語 • 2018年にDart2が発表 • 続けてFlutterが発表されることで盛り上がる
ちなみにFlutterの動向は?
Flutterの実績 • https://flutter.dev/showcase • Google Ads • Alibaba
Group • etc……
Instagram っぽいUIをつくる
Widget • FlutterはWidgetと呼ばれるUI部品を組み合わせてレイアウトを作る • 例えば→図だと……
Scaffold • Scaffoldは “足場” という意味 • Material Componentの1つ
◦ (https://api.flutter.dev/flutter/material/Scaffold-class.html) • Scaffoldの上にWidgetを重ねることでレイアウトを作るのが基本
Scaffold
Scaffold
Scaffold • appBar ◦ 画面上部にあるタイトルバー • body ◦ 文字通りbodyとなる部分
◦ ここにコンテンツを配置する • bottomNavigationBar ◦ 画面下部にあるナビゲーションバー ◦ 各画面への遷移用ボタンを配置したりする • floatingActionButton ◦ 独立したボタン ◦ 頻繁に利用する操作のショートカットにしたりする • 他にもプロパティいろいろ……
Row / Column • RowはX方向、ColumnはY方向にWidgetを並べるためのWidget
Material Widgetいろいろ (https://flutter.dev/docs/development/ui/widgets/material)
iOSっぽい見た目を作りたい
Cupertino Widget (https://flutter.dev/docs/development/ui/widgets/cupertino)
Cupertino Widgetサンプル
Cupertino Widget
iOSとAndroid処理を分けるには?
Platform class • dart.io パッケージに Platform class が実装されている (https://api.dartlang.org/stable/2.6.1/dart-io/Platform-class.html) •
このclassを利用すれば端末のPlatform判定が可能 • プロジェクトごとにラップした処理を作って 共通化できれば良さそうだが…… まだ考え中
Flutter Studio • ブラウザ上でFlutterのレイアウトを組める 便利ツール • まだMaterialComponentしか対応してない •
ついでに公式のサービスではない • レイアウトを組んだ上でソースコードを 生成できる (https://flutterstudio.app/)
Flutter Studio
• Dart ◦ JavaScriptとJavaの良いとこ取りした 感じ ◦ Flutterと同時に盛り上がっていきそう
• Flutter ◦ HotReloadめちゃくちゃ便利 ◦ 提供されているWidgetUIならすぐ作 れる ◦ React/Fluxインスパイア 慣れている人ならすぐ書けそう
◦ iOS/Androidが1つのコードで書ける のは強い