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
TechCon Official App on Flutter
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Katsumi Onishi
January 30, 2019
Technology
1k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
TechCon Official App on Flutter
Katsumi Onishi
January 30, 2019
More Decks by Katsumi Onishi
See All by Katsumi Onishi
Material Design と Product UI Design
katsummy
2
870
Flutter at Google I/O 2019
katsummy
8
1.5k
How to handle 3rd-Party Apps in a plugin packages in Flutter
katsummy
2
1.1k
Other Decks in Technology
See All in Technology
Claude Code の Sandbox 機能を Anthropic Sandbox Runtime(srt) で試そう!/lets-play-anthropic-sandbox-runtime
tomoki10
1
480
2026TECHFRESH畢業分享會 - AI 時代的人生存檔點
line_developers_tw
PRO
0
550
非定型業務をAI slackbotで自動化する ~ 社内要望を自動壁打ちするbotを作った ~/automating-ad-hoc-work-with-ai-slackbot
shibayu36
0
550
DevOps Agentで始めるAWS運用 〜フロンティアエージェントが変える運用の現場〜
nyankotaro
1
360
チームで進めるAI駆動アジャイル×ウォーターフォール
kumaiu
0
140
「気づいたら仕事が終わっている」バクラクAIエージェント本番運用の裏側 / layerx-bakuraku-aie2026
yuya4
19
11k
非エンジニアがClaudeと挑んだ「1ヶ月間プロダクト30本ノック」
askokc
0
180
Kubernetesにおける学習基盤とLLMOpsの概要
ry
1
200
Oracle AI Database@Google Cloud:サービス概要のご紹介
oracle4engineer
PRO
6
1.5k
LLMと共に進化するプロセスを目指して
ymatsuwitter
12
3.8k
Rancherの紹介&Update情報(RancherJP Online Meetup #09)
yoshiyuki_kono
0
140
実装は速くなった、レビューはどうする? ― 自身のレビューをAIで再現させるサーヴァントエンジニアリングのすゝめ / Implementation got faster. So what about reviews? — An invitation to Servant Engineering: Recreating your own code reviews with AI
nrslib
8
4.5k
Featured
See All Featured
Documentation Writing (for coders)
carmenintech
77
5.4k
A Soul's Torment
seathinner
6
2.9k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
210
First, design no harm
axbom
PRO
2
1.2k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
How to make the Groovebox
asonas
2
2.2k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
160
Docker and Python
trallard
47
3.9k
The SEO Collaboration Effect
kristinabergwall1
1
480
Balancing Empowerment & Direction
lara
6
1.2k
A Tale of Four Properties
chriscoyier
163
24k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
360
Transcript
TechCon Official App on Flutter Katsumi Onishi Android Engineer 株式会社ディー・エヌ・エー
@katsummy
目次 2 DeNA TechCon 2019 Why Flutter ? What New
Challenged? Review 1 3 Appendix 4 2
3
4 DeNAでは、ゲームやエンタメだけでなく、 Eコマース、ソーシャルLIVE、ヘルスケア、オートモーティブ、 そして横浜DeNAベイスターズのようなスポーツなど、様々な事業を行っています。 また、技術の力で事業の未来をリードするため、様々なチャレンジも行っています。 DeNA TechCon はこれらのチャレンジの中から、 技術的に特に面白いものを厳選して皆さんにお披露目するお祭りです。
5 今年のテーマは「SHIFT UP」です。 『面白かったー!』と思っていただく工夫を凝らしてお待ちしてますので、 みなさまぜひお越しください!
6 12月中旬... Why Flutter ?
Why Flutter ? • 12月中旬... • DeNA TechApp 2019 2.6
開催にあたりオフィシャルアプリを作成した い • iOS / Android 両方でリリースしたい • 短納期なのでハイブリッド? • 先日、Flutter 1.0 リリースされた!! • Flutter Live '18 at 4.Nov in London • 新しい技術にチャレンジ! 7
What New Challenged? • DeNA の Flutter アプリは初めて • どうせなら普段のアプリできないことをやりたい
• マテリアルデザインの新しいコンポーネントを使用 • Backdrop • Flareでアニメーション • PlatformView で Google Map を表示 • 新しいソフトウェアアーキテクチャ • Redux 8
What New Challenged? • マテリアルデザインの新しいコンポーネントを使用 • Backdrop - Material Design
9 Back layer Front layer Subheader
Backdrop 10
Timetable with Fixed Header 11
Timetable with Fixed Header 12 Stack Custom ScrollView Custom ScrollView
SliverAppBar SliverFixedExtentList ListView ListView タイムテーブルのViewの縦スク ロールを時間のViewにSync
FLARE • 2Dimensions社無償公開の2Dのベクターアニメーションツール • エクスポートしたアニメーションをそのままFlutterで再生が可能 13
FLARE • Splash 14 2D - denaxtech - Logo
FLARE child: Center( child: FlareActor( "assets/animations/Logo.flr", animation: _animationName, fit: BoxFit.contain,
callback: (string) { Navigator.of(context) .pushReplacementNamed(AppRoutes.home); }, ), ), 15
PlatformView で Google Map • 組み込みは簡単 • google_maps_flutter を使用 •
Android のみ実装 • iOS 挙動不安定... • Backdropの影響? 16
TechCon Official App 17 16:9
What New Challenged? • アーキテクチャー • MultiModule • Flutterでもできる •
Redux (Flux) 18 App Architecture (Redux) Repository Common Repository Impl
MultiModule 19
MultiModule <pubspec.yaml> dependencies: flutter: sdk: flutter commons: path: ../commons architecture:
path: ../architecture repository: path: ../repository repository_cache: path: ../repository_cache 20
Redux • 採用箇所 • Backdrop / TimeTable 21 isLoading activeTab
Store Redux 22 Action Widget Middleware Repository State Reducer State
ViewModel Dispatch
Redux class App extends StatelessWidget { /// Store final Store<AppState>
store = Store<AppState>( appReducer, initialState: AppState.initial(), middleware: createStoreMiddleware(RepositoryCache()), ); @override Widget build(BuildContext context) { return StoreProvider<AppState>( store: store, child: MaterialApp( 23
Redux /// Reducer final appReducer = combineReducers<AppState>([ TypedReducer<AppState, LoadingAction>(_onLoading), TypedReducer<AppState,
ErrorAction>(_onError), TypedReducer<AppState, SessionsLoadAction>(_onLoadSessions), TypedReducer<AppState, SessionsLoadedAction>(_onLoadedSessions), TypedReducer<AppState, UpdateTabAction>(_onUpdateTab), ]); 24
Redux @immutable class AppState { final bool isLoading; final bool
hasError; final AppTab activeTab; final List<Session> sessions; 25
Redux /// Middleware List<Middleware<AppState>> createStoreMiddleware(Repository repository) { _repository = repository;
return [ TypedMiddleware<AppState, SessionsLoadAction>(_load), ]; } 26
Redux /// Sessions Load Future _load(Store<AppState> store, action, NextDispatcher next)
async { // Dispatch a LoadingAction to show a loading spinner store.dispatch(LoadingAction()); // Get session var sessions = await _repository.getSessionList(); store.dispatch(SessionsLoadedAction(sessions)); next(action); } 27
Redux class TimeTablePage extends StatelessWidget { @override Widget build(BuildContext context)
{ return StoreConnector<AppState, _ViewModel>( onInit: (store) => store.dispatch(SessionsLoadAction()), distinct: true, converter: _ViewModel.fromStore, builder: (context, vm) { if (vm.isLoading) { return Center(child: LoadingIndicator()); } else { return TimeTable( sessions: vm.sessions, ); } }, 28
• TimeTableWidget は力技感.... • Redux • View と Logicの分離 •
State は Storeで一元管理 • View毎に StoreからViewModelを作成が若干手間 • Middleware内でdispatchさせるとnextのactionは...? • 小規模アプリでは... Review 29
• 課題 • FCM • 通知 の アプリ内表示 • LicensePage
• 内容に重複が多く法務確認が手間 • Flutter Engineのライセンスまで表示される... • skia で使用している gif ライブラリが MPL 1.1/GPL 2.0/LGPL 2.1 トリプルライセンスであるが、LGPL 2.1 のみ表示される。 • CI • [Jan 23, 2019] Flutter CI v.1.0.0 がBitriseに登場! • もっとはやくに... Review 30
Appendix 31 ソースコードは公開します! will soon 詳しくはGitHubで!
32 テックコン 検索 ブースも出 します!