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
740
Dartの引数を知る
ponday
May 17, 2018
Tweet
Share
More Decks by ponday
See All by ponday
関数型でGoFのデザインパターンやってみる
honda
1
1.2k
TypeScriptの型表現
honda
10
3.1k
Web Componentsの今
honda
1
430
これまでのReact、これからのReact
honda
0
310
Gatsbyお試し
honda
0
120
styled-components or emotion?
honda
0
680
Web ComponentsとAngular
honda
0
130
Atomic Design周りについての私見
honda
1
700
え、まだWeb Componentsを未来の技術だと思ってるの?
honda
2
820
Other Decks in Programming
See All in Programming
初学者でも今すぐできる、Claude Codeの生産性を10倍上げるTips
s4yuba
14
8.9k
CursorはMCPを使った方が良いぞ
taigakono
1
220
A2A プロトコルを試してみる
azukiazusa1
2
1.3k
Discover Metal 4
rei315
2
110
Quand Symfony, ApiPlatform, OpenAI et LangChain s'allient pour exploiter vos PDF : de la théorie à la production…
ahmedbhs123
0
130
童醫院敏捷轉型的實踐經驗
cclai999
0
210
スタートアップの急成長を支えるプラットフォームエンジニアリングと組織戦略
sutochin26
0
2.3k
VS Code Update for GitHub Copilot
74th
2
600
エンジニア向け採用ピッチ資料
inusan
0
180
設計やレビューに悩んでいるPHPerに贈る、クリーンなオブジェクト設計の指針たち
panda_program
6
1.9k
すべてのコンテキストを、 ユーザー価値に変える
applism118
3
1.1k
来たるべき 8.0 に備えて React 19 新機能と React Router 固有機能の取捨選択とすり合わせを考える
oukayuka
2
890
Featured
See All Featured
Raft: Consensus for Rubyists
vanstee
140
7k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
46
9.6k
Embracing the Ebb and Flow
colly
86
4.7k
A Tale of Four Properties
chriscoyier
160
23k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
8
680
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
34
5.9k
Adopting Sorbet at Scale
ufuk
77
9.4k
[RailsConf 2023] Rails as a piece of cake
palkan
55
5.6k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
138
34k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
161
15k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.8k
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 !!