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
BLoC
Search
Shinnosuke Kugimiya
May 31, 2018
Programming
9
1.5k
BLoC
flutter meetup #2の資料です
Shinnosuke Kugimiya
May 31, 2018
Tweet
Share
More Decks by Shinnosuke Kugimiya
See All by Shinnosuke Kugimiya
UIテストはもうMaestroでいいのかもしれない話
kgmyshin
15
12k
新規開発を始めるときにやるべきこと
kgmyshin
18
8.6k
android app error handling
kgmyshin
1
1.3k
solid+cqs+dry
kgmyshin
35
9.7k
Paging Library ~ アイテムの更新 ~
kgmyshin
2
3.2k
KotlinでReact Native(expo) を使いたい
kgmyshin
2
1.1k
新規チームで新規開発を始める時にやること
kgmyshin
26
4.2k
android-multi-module-with-dagger
kgmyshin
10
5.8k
kotlin linter
kgmyshin
12
15k
Other Decks in Programming
See All in Programming
BasicBasic認証
sadnessojisan
5
2.5k
What we keep in mind when migrating from Serverless Framework to AWS CDK and AWS SAM
kasacchiful
1
130
Scala におけるコンパイラエラーとの付き合い方
chencmd
1
160
デザインシステムとコンポーネント指向によるフロントエンド開発プロセスの革新 / Innovation in Frontend Development Processes through Design Systems and Component-Oriented Architecture
nrslib
7
5k
1人で挑むSwiftコンパイラ 〜型システム入門編〜
s_shimotori
0
310
dotfiles について話したい #湘なんか
stefafafan
2
280
dRuby 入門者によるあなたの身近にあるdRuby 入門
makicamel
4
340
どうしてこうなった?から理解するActive Recordの関連の裏側
willnet
5
510
健康第一!MetricKitで始めるアプリの健康診断 / App Health Checkups Starting with MetricKit
nekowen
4
790
RAGの回答精度評価用のQAデータセットを生成AIに作らせた話
kurahara
0
210
ESLint Rule により事業, 技術ドメインに沿った制約と誓約を敷衍させるアプローチのすゝめ
shinyaigeek
1
2.7k
iOSDC 2024 SMBファイル共有をSwiftで実装する
kishikawakatsumi
1
110
Featured
See All Featured
Writing Fast Ruby
sferik
623
60k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
354
29k
Faster Mobile Websites
deanohume
304
30k
Documentation Writing (for coders)
carmenintech
65
4.3k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
34
1.9k
Typedesign – Prime Four
hannesfritz
38
2.3k
Practical Orchestrator
shlominoach
185
10k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
122
18k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
33
1.7k
Building Adaptive Systems
keathley
36
2.1k
Happy Clients
brianwarren
96
6.6k
Building Your Own Lightsaber
phodgson
101
5.9k
Transcript
© DMM.com !LHNZTIJO 'MVUUFS.FFUVQ5PLZP #-P$
© DMM.com w LHNZTIJOఝٶ ͗͘Έ w "OESPJEΤϯδχΞ w %..DPNϥϘ$50ࣨॴଐ
w ݄͔Β ࣗݾհ
© DMM.com BHFOEB
© DMM.com w #-P$ͱ w #-P$ͷΨΠυϥΠϯ w #-P$ͱ6* w #-P$ͷྫ
w 'MVUUFSͰͷ͍ํ w ·ͱΊ BHFOEB
© DMM.com #-P$ͱ
© DMM.com #-P$ͱ Business Logic Component
© DMM.com #-P$ͱ ͕ࣗͬͨͷ(PPHMF*0ͰͷԼهͷηογϣϯ Build reactive mobile apps with
Flutter IUUQTXXXZPVUVCFDPNXBUDI W34H#&Q0*
© DMM.com #-P$ͱ ࣮ࡍ݄ʹ%BSU$POGͷ ԼهͷηογϣϯͰൃද͞Ε͍ͯΔ Flutter / AngularDart –
Code sharing, better together IUUQTXXXZPVUVCFDPNXBUDI W1-)MOX)H1&
© DMM.com #-P$ͱ ϏδωεϩδοΫΛ UIϓϥοτϑΥʔϜ͔Β ͢ΔͨΊͷ ઃܭύλʔϯͷҰͭ ҰݴͰݴ͏ͱ Ͱ͋Δ
© DMM.com #-P$ͷϞνϕʔγϣϯ 6* .PEFM *OGSB ͜͏͍͏ঢ়ଶΛ .PEFM .PEFM
.PEFM
© DMM.com #-P$ͷϞνϕʔγϣϯ 6* .PEFM *OGSB ͜͏͍ͨ͠ 91MBUGPSN"EBQUFS
© DMM.com #-P$ͷΨΠυϥΠϯ
© DMM.com #-P$ͷΨΠυϥΠϯ JOQVUTBOEPVUQVUTBSFTJNQMF4USFBNT4JOLTPOMZ %FQFOEFODJFTNVTUCFJOKFDUBCMFBOEQMBUGPSN BHOPTUJD
/PQMBUGPSNCSBODIJOHBMMPXFE *NQMFNFOUBUJPODBOCFXIBUFWFSZPVXBOUJGZPV GPMMPXUIFQSFWJPVTSVMFT " #VUNBZ*TVHHFTUSFBDUJWFQSPHSBNNJOH
© DMM.com #-P$ͷΨΠυϥΠϯ JOQVU4JOLɺPVUQVU4USFBNͰ࣮͢Δ ґଘΦϒδΣΫτ֎͔ΒೖՄೳͰɺϓϥοτ ϑΥʔϜʹґଘ͠ͳ͍ͷͰ͋Δ͜ͱ
ϓϥοτϑΥʔϜͷذμϝ dΛकͬͯΕɺ࣮ͳΜͰ͍͍Α ͨͩ͠ɺ3FBDUJWF1SPHSBNNJOHͰΉͷ͕͓͢͢ΊͩΑ
© DMM.com #-P$ͱ6*ͷܨ͗
© DMM.com #-P$ͱ6*ͷܨ͗ &BDIDPNQMFYFOPVHIDPNQPOFOUIBTB DPSSFTQPOEJOH#-P$ $PNQPOFOUTTIPVMETFOEJOQVUTBTJTz
$PNQPOFOUTTIPVMETIPXPVUQVUTBTDMPTFBT QPTTJCMFUPBTJTz "MMCSBODIJOHTIPVMECFCBTFEPOTJNQMF#-P$ CPPMFBOPVUQVUT
© DMM.com #-P$ͷΨΠυϥΠϯ ͦΕͧΕͷzेʹෳࡶͳzίϯϙʔωϯτʹ#-P$ ͕Ұͭ͋Δʢzेʹෳࡶͳzͷ߹͍֤ࣗͰஅʣ JOQVUʹૹΔσʔλBTJTͰ
PVUQVUʹྲྀ͢ετϦʔϜͰ͖Δ͚ͩlBTJTzͰ ͯ͢ͷذ#-P$ʹΑΔ#PPMFBOͳΞτϓοτ ʹج͖ͮ͘Ͱ͋Δ
© DMM.com #-P$ͷྫ
© DMM.com #-P$ͷྫ class CartBLoC { Sink<Product> addition; Stream<int>
itemCount; Stream<String> totalCost; Stream<List<CartItem>> items; }
© DMM.com #-P$ͷྫ class CartBLoC { Sink<Product> addition; Stream<int>
itemCount; Stream<String> totalCost; Stream<List<CartItem>> items; } 1SPEVDU͕Ճ͞ΕΔͱ
© DMM.com #-P$ͷྫ class CartBLoC { Sink<Product> addition; Stream<int>
itemCount; Stream<String> totalCost; Stream<List<CartItem>> items; } ͦΕͧΕͷ4USFBN͔Β݁Ռ͕ྲྀΕΔ
© DMM.com 'MVUUFSͰͷ͍ํ
© DMM.com JOQVUͷܨ͛ํ TextField( onChanged: bloc.sink.add, decoration: InputDecoration( border:
OutlineInputBorder(), ɹɹɹ hintText: “hint"), )
© DMM.com JOQVUͷܨ͛ํ TextField( onChanged: bloc.sink.add, decoration: InputDecoration( border:
OutlineInputBorder(), ɹɹɹ hintText: “hint"), ) ΠϕϯτͱTJOLBEEΛόΠϯυ͢Δ͚ͩ
© DMM.com PVUQVUΛ6*ʹͭͳ͛Δํ๏ StreamBuilder<String>( stream: bloc.stream, builder: (context, snapshot)
=> Container( child: Text(snapshot?.data ?? ""), ), )
© DMM.com PVUQVUΛ6*ʹͭͳ͛Δํ๏ StreamBuilder<String>( stream: bloc.stream, builder: (context, snapshot)
=> Container( child: Text(snapshot?.data ?? ""), ), ) 4USFBN#VJMEFS͏͚ͩ
© DMM.com ·ͱΊ
© DMM.com w #-P$6*ͱ.PEFMͱ*OGSBΛ͚Δ͜ͱͱɺΫϩε ϓϥοτϑΥʔϜͷίʔυγΣΞΛϞνϕʔγϣϯ ʹੜ·Εͨ w कΔ͖ΨΠυϥΠϯ͕͋Δ w
'MVUUFSͰ w JOQVUΛૹΔͱ͜ΖͰTJOLBEEΛόΠϯυ͢Δ w PVUQVUΛTVCTDSJCF͢Δʹ4USFBN#VJMEFSΛ͏ ·ͱΊ