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
Dartの引数を知る
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
ponday
May 17, 2018
Programming
780
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Dartの引数を知る
ponday
May 17, 2018
Transcript
21 slides
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 !!
More Decks by ponday
See All by ponday
関数型でGoFのデザインパターンやってみる
honda
1
1.7k
TypeScriptの型表現
honda
10
3.2k
Web Componentsの今
honda
1
490
これまでのReact、これからのReact
honda
0
350
Gatsbyお試し
honda
0
150
styled-components or emotion?
honda
0
730
Web ComponentsとAngular
honda
0
170
Atomic Design周りについての私見
honda
1
830
え、まだWeb Componentsを未来の技術だと思ってるの?
honda
2
900
Other Decks in Programming
See All in Programming
AIが実装を担う時代の「技術設計」と「チームマネジメント」
kamina_zzz
2
300
将来の標準フォーマッター?ktfmtを深堀る
t45k
0
230
私なりのハーネスエンジニアリング ~独自の言語処理系の開発を通して~
seosoft
0
230
Spec-Driven Development - Why Vaadin Is the Perfect Fit
simas
PRO
0
260
動画プレイヤーはなぜカクつくのか 〜Flutterのレンダリングとネイティブの境界を解剖する〜
naruogram
0
340
우리의 Nitro Modules는 당신의 Turbo Modules보다 아름답다
l2hyunwoo
0
270
React Native経験者が Flutterを30⽇間触って驚いたこと
3saito
0
200
Claude Code ハーネスDeep Dive – 君はどこまで制御する? -
takateeen_knj
6
6.2k
Distance field of Julia set
kinakomoti321
0
330
Debian JP Projectのサーバー構成
uwabami
1
150
TS 7.0 で baseUrl が使えなくなった今、パスエイリアスをどうするか
bicstone
2
760
Spec-driven Development with AI
simas
PRO
0
2.3k
Featured
See All Featured
We Have a Design System, Now What?
morganepeng
55
8.4k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
2
550
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
360
The Curious Case for Waylosing
cassininazir
1
620
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
310
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
70
69k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.6k
Music & Morning Musume
bryan
48
7.5k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.4k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
960
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.3k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
630