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
560
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
[FlutterAlliance]Designing Borderless UX in Flutter: Insights from 50 Countries
korodroid
0
11
[Codex Meetup Japan #1] Codex-Powered Mobile Apps Development
korodroid
2
1.2k
[AgentConHelsinki2025]From Assistant to Agent: How Developer Agents Reshape Mobile Workflows
korodroid
0
12
[FlutterTokyo#10]In-App Language Switching in Flutter
korodroid
0
27
[potatotips #92]Integrating Quick Settings Tiles into Your Android App
korodroid
1
140
[ABC2025Spring]Code Less, Build More: A Practical Guide to Mobile Apps with Generative AI
korodroid
0
210
[DevTalksRomania]Building Augmented Reality Experiences with Flutter and AI-Powered Development
korodroid
0
20
[FlutterNinjas]Adapting Flutter App UX for Users Across the World
korodroid
0
54
[FlutterTokyo#6]Navigating Flutter Upgrades
korodroid
0
74
Other Decks in Technology
See All in Technology
日本のソブリンAIを支えるエヌビディアの生成AIエコシステム
acceleratedmu3n
0
120
Data Engineering Guide 2025 #data_summit_findy by @Kazaneya_PR / 20251106
kazaneya
PRO
7
770
SOTA競争から人間を超える画像認識へ
shinya7y
0
670
プロファイルとAIエージェントによる効率的なデバッグ / Effective debugging with profiler and AI assistant
ymotongpoo
1
790
文字列操作の達人になる ~ Kotlinの文字列の便利な世界 ~ - Kotlin fest 2025
tomorrowkey
2
440
SREのキャリアから経営に近づく - Enterprise Risk Managementを基に -
shonansurvivors
1
710
ストレージエンジニアの仕事と、近年の計算機について / 第58回 情報科学若手の会
pfn
PRO
4
960
DMMの検索システムをSolrからElasticCloudに移行した話
hmaa_ryo
0
350
OpenCensusと歩んだ7年間
bgpat
0
320
可観測性は開発環境から、開発環境にもオブザーバビリティ導入のススメ
layerx
PRO
4
2.6k
InsightX 会社説明資料/ Company deck
insightx
0
190
kotlin-lsp の開発開始に触発されて、Emacs で Kotlin 開発に挑戦した記録 / kotlin‑lsp as a Catalyst: My Journey to Kotlin Development in Emacs
nabeo
2
280
Featured
See All Featured
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
9
950
Navigating Team Friction
lara
190
15k
Why Our Code Smells
bkeepers
PRO
340
57k
How to Ace a Technical Interview
jacobian
280
24k
Rails Girls Zürich Keynote
gr2m
95
14k
Testing 201, or: Great Expectations
jmmastey
46
7.7k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
A better future with KSS
kneath
239
18k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.7k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.8k
Documentation Writing (for coders)
carmenintech
76
5.1k
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