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
Flutter Lintツールを完全に理解した
Search
Kenichi Kambara
August 25, 2022
Technology
0
550
Flutter Lintツールを完全に理解した
Flutter Lintツールを完全に理解した
完全に理解したTalkの32回目開催回のトーク資料です。
#flutter
#flutterjp
#完全に理解したTalk
Kenichi Kambara
August 25, 2022
Tweet
Share
More Decks by Kenichi Kambara
See All by Kenichi Kambara
[FlutterTokyo#10]In-App Language Switching in Flutter
korodroid
0
17
[potatotips #92]Integrating Quick Settings Tiles into Your Android App
korodroid
1
120
[ABC2025Spring]Code Less, Build More: A Practical Guide to Mobile Apps with Generative AI
korodroid
0
190
[DevTalksRomania]Building Augmented Reality Experiences with Flutter and AI-Powered Development
korodroid
0
14
[FlutterNinjas]Adapting Flutter App UX for Users Across the World
korodroid
0
44
[FlutterTokyo#6]Navigating Flutter Upgrades
korodroid
0
68
[DevFestTokyo]Accelerating Flutter App Development Using Generative AI
korodroid
2
900
[DevFestMilano]Enhancing Flutter Apps UX for Global Users
korodroid
0
48
[mobile #15]UX Improvements on Flutter Apps Part 5
korodroid
0
61
Other Decks in Technology
See All in Technology
Vault meets Kubernetes
mochizuki875
0
140
AWSで推進するデータマネジメント
kawanago
0
240
プロダクトの成長に合わせたアーキテクチャの段階的進化と成長痛、そして、ユニットエコノミクスの最適化
kakehashi
PRO
1
110
モバイルアプリ研修
recruitengineers
PRO
5
1.5k
認知戦の理解と、市民としての対抗策
hogehuga
0
420
7月のガバクラ利用料が高かったので調べてみた
techniczna
3
780
AIエージェントの活用に重要な「MCP (Model Context Protocol)」とは何か
masayamoriofficial
0
230
コスト削減の基本の「キ」~ コスト消費3大リソースへの対策 ~
smt7174
2
290
退屈なことはDevinにやらせよう〜〜Devin APIを使ったVisual Regression Testの自動追加〜
kawamataryo
4
930
Goss: New Production-Ready Go Binding for Faiss #coefl_go_jp
bengo4com
1
1.1k
ヘブンバーンズレッドにおける、世界観を活かしたミニゲーム企画の作り方
gree_tech
PRO
0
300
TypeScript入門
recruitengineers
PRO
33
11k
Featured
See All Featured
How to train your dragon (web standard)
notwaldorf
96
6.2k
The Cult of Friendly URLs
andyhume
79
6.6k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
31
2.2k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
36
2.5k
A Modern Web Designer's Workflow
chriscoyier
696
190k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
Raft: Consensus for Rubyists
vanstee
140
7.1k
Reflections from 52 weeks, 52 projects
jeffersonlam
351
21k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3k
Typedesign – Prime Four
hannesfritz
42
2.8k
Large-scale JavaScript Application Architecture
addyosmani
512
110k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
44
2.5k
Transcript
2022.08.25 ਆݪ ݈Ұ (@korodroid) Flutter LintπʔϧΛશʹཧղͨ͠ ʮʓʓશʹཧղͨ͠ʯTalkɹ#32
About me •Mobile App Development •Speeches (e.g. 9 International confs.)
•Writings (e.g. 6 Dev Books) •[Of fi cial] Evangelist at NTT TechnoCross •[Private] iplatform.org ਆݪɹ݈Ұ (@korodroid)
About my Flutter product (Private works) Sekaiphone Pro(Flutter/Kotlin/Swift) MyToDo(Flutter)
Lintπʔϧ(੩తղੳ)Λ׆༻͢ΔϝϦοτ(ྫ) 1. જࡏతͳόάͷݕग़ 2. ϨϏϡʔ࡞ۀͷෛՙܰݮ 3. ΞϓϦͷύϑΥʔϚϯεվળ
Flutter͚Lintπʔϧ( fl utter_lints) https://pub.dev/packages/ fl utter_lints
Walking through “ fl utter_lints” ↑ඞཁʹԠͯ͡ɺ࠷৽൛ʹߋ৽
Walking through “analysis_options.yaml”
Walking through “ fl utter.yaml” # Recommended lints for
Flutter apps, packages, and plugins. include: package:lints/recommended.yaml linter: rules: - avoid_print - avoid_unnecessary_containers - avoid_web_libraries_in_ fl utter - no_logic_in_create_state - prefer_const_constructors - prefer_const_constructors_in_immutables - prefer_const_declarations - prefer_const_literals_to_create_immutables - sized_box_for_whitespace - sort_child_properties_last - use_build_context_synchronously - use_full_hex_values_for_ fl utter_colors - use_key_in_widget_constructors
# Recommended lints for Flutter apps, packages, and plugins.
include: package:lints/recommended.yaml linter: rules: - avoid_print - avoid_unnecessary_containers - avoid_web_libraries_in_ fl utter - no_logic_in_create_state - prefer_const_constructors - prefer_const_constructors_in_immutables - prefer_const_declarations - prefer_const_literals_to_create_immutables - sized_box_for_whitespace - sort_child_properties_last - use_build_context_synchronously - use_full_hex_values_for_ fl utter_colors - use_key_in_widget_constructors Walking through “ fl utter.yaml”
Walking through “Linter for Dart” https://dart-lang.github.io/linter/lints/ productionίʔυʹ͓͚Δprint੍
Walking through “ fl utter.yaml” # Recommended lints for
Flutter apps, packages, and plugins. include: package:lints/recommended.yaml linter: rules: - avoid_print - avoid_unnecessary_containers - avoid_web_libraries_in_ fl utter - no_logic_in_create_state - prefer_const_constructors - prefer_const_constructors_in_immutables - prefer_const_declarations - prefer_const_literals_to_create_immutables - sized_box_for_whitespace - sort_child_properties_last - use_build_context_synchronously - use_full_hex_values_for_ fl utter_colors - use_key_in_widget_constructors
Walking through “recommended.yaml”
Walking through “Linter for Dart” ྫ.Collection͕ಛఆཁૉΛؚΉ͔൱͔ͷఆ ྫ.ΠϯελϯεੜͷͨΊͷnewར༻੍
Walking through “recommended.yaml”
Walking through “core.yaml”
Adding Custom Rules https://github.com/ fl utter/samples
Walking through “samples/analysis_options.yaml” include: package: fl utter_lints/ fl utter.yaml
analyzer: strong-mode: implicit-casts: false implicit-dynamic: false linter: rules: avoid_types_on_closure_parameters: true avoid_void_async: true cancel_subscriptions: true close_sinks: true directives_ordering: true package_api_docs: true package_pre fi xed_library_names: true test_types_in_equals: true throw_in_ fi nally: true unawaited_futures: true unnecessary_statements: true use_super_parameters: true
Walking through “samples/analysis_options.yaml” include: package: fl utter_lints/ fl utter.yaml
analyzer: strong-mode: implicit-casts: false implicit-dynamic: false linter: rules: avoid_types_on_closure_parameters: true avoid_void_async: true cancel_subscriptions: true close_sinks: true directives_ordering: true package_api_docs: true package_pre fi xed_library_names: true test_types_in_equals: true throw_in_ fi nally: true unawaited_futures: true unnecessary_statements: true use_super_parameters: true
Customizing static analysis https://dart.dev/guides/language/analysis-options
One more examples… analyzer: errors: avoid_print: error ྫ.avoid_printҧΛΤϥʔʹ analyzer:
exclude: - “**/*.g.dart" - "**/*.freezed.dart" - test/*.dart ྫ.ରύεͷϑΝΠϧΛνΣοΫର֎
·ͱΊ •FlutterΞϓϦ։ൃͰੵۃతʹLint׆༻ʂ •ެࣜϦϑΝϨϯεͷϓϥΫςΟεࢀߟʹʂ •ඞཁʹԠͯ͡ɺϧʔϧΛదٓΧελϚΠζ
Please let me know if you have any requests
such as technical speeches, technical writings and so on. Facebook:http://fb.com/kanbara.kenichi Twitter:@korodroid LinkedIn:http://www.linkedin.com/in/korodroid Thank you so much