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
Dartの引数を知る
Search
ponday
May 17, 2018
Programming
0
760
Dartの引数を知る
ponday
May 17, 2018
Tweet
Share
More Decks by ponday
See All by ponday
関数型でGoFのデザインパターンやってみる
honda
1
1.6k
TypeScriptの型表現
honda
10
3.1k
Web Componentsの今
honda
1
470
これまでのReact、これからのReact
honda
0
330
Gatsbyお試し
honda
0
130
styled-components or emotion?
honda
0
720
Web ComponentsとAngular
honda
0
150
Atomic Design周りについての私見
honda
1
780
え、まだWeb Componentsを未来の技術だと思ってるの?
honda
2
880
Other Decks in Programming
See All in Programming
CS教育のDX AIによる育成の効率化
niftycorp
PRO
0
160
存在論的プログラミング: 時間と存在を記述する
koriym
4
420
API Platformを活用したPHPによる本格的なWeb API開発 / api-platform-book-intro
ttskch
1
150
ロボットのための工場に灯りは要らない
watany
11
3.1k
社内規程RAGの精度を73.3% → 100%に改善した話
oharu121
13
8.3k
最初からAWS CDKで技術検証してもいいんじゃない?
akihisaikeda
4
170
SourceGeneratorのマーカー属性問題について
htkym
0
210
クライアントワークでSREをするということ。あるいは事業会社におけるSREと同じこと・違うこと
nnaka2992
1
360
maplibre-gl-layers - 地図に移動体たくさん表示したい
kekyo
PRO
0
410
ふつうのRubyist、ちいさなデバイス、大きな一年 / Ordinary Rubyists, Tiny Devices, Big Year
chobishiba
1
500
AWS×クラウドネイティブソフトウェア設計 / AWS x Cloud-Native Software Design
nrslib
16
3.3k
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
930
Featured
See All Featured
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
280
How STYLIGHT went responsive
nonsquared
100
6k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
110
The SEO Collaboration Effect
kristinabergwall1
0
400
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.5k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
480
How to train your dragon (web standard)
notwaldorf
97
6.6k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
0
460
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.4k
Prompt Engineering for Job Search
mfonobong
0
220
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.9k
Marketing to machines
jonoalderson
1
5k
Transcript
Dartの引数を知る Flutter勉強会 in 福岡 #0 / May 17, 2018 ponday
(@ponday_dev)
Profile Honda, Yusuke (@ponday_dev) 株式会社ベガコーポレーション エンジニア ng-fukuoka Like : TypeScript,
RxJS, Angular, Python, Kotlin 元々サーバサイド 趣味フロントエンドエンジニア 最近の仕事では画像処理とか機械学習とか (アプリエンジニアではない) お仕事あればお声掛けください
None
https://github.com/ponday-dev/flutter-sample-todo デモアプリ作ってみました
Flutter - Google製のモバイルアプリケーションフレームワーク - 2018年2月にベータ版がリリース - 1ソースでiOS/Androidどちらでも動く - iOS/Androidそれぞれ向けにネイティブにコンパイルされる -
WebViewなどは用いてない - マテリアルデザインが標準提供 - 簡単にマテリアル統一感のあるアプリが作成可能 - IntelliJ IDEA向けのプラグインが優秀 - IntelliJ IDEAだけでiOSもAndroidもテストできる - Xcodeのインストールは必要
この辺は他の人からも説明があった(はず)
今回のテーマ
None
Dart - Google製のプログラミング言語 - Flutterのベータ版リリースと同時にv2が発表 - 静的型付けで(比較的)シンプルな構文 - 元々はJavaScriptの置き換えを狙っていたが挫折してAltJSに -
AngularDartなどGoogleが関わる技術などで時折登場している - Google Adsenseなど重要なプロダクトで採用されている - 一方GoogleのWeb開発の社内標準言語はTypeScriptに - async / await が実装済など、モダン(?)な機能も提供
触って思ったこと
引数の書き方が独特
普通の書き方
型は省略可能 - この場合、x, y, zの型とadd関数の戻り値はdynamic型に - 公式は「少なくとも公開APIには型を付ける」ことを推奨
オプション引数 - [ ]で囲むことで引数の省略が可能 - 省略した場合、値はnullに
複数のオプション引数も可
名前付き引数 - { }で囲むことで名前付き引数に - Flutterで多用されている
引数のデフォルト値 - オプション引数内で定義する
名前付き引数のデフォルト値 - 変数名 = デフォルト値 で定義 - 引数が渡されなかった場合、デフォルト値を適用
引数の渡し方を確認しておくと、 ソースが読みやすくなる(かも)
詳しくは公式で
Thank you !!