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
Writing better Flutter Code with Flutter Lint /...
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Kenichi Kambara
April 21, 2023
Technology
540
0
Share
Writing better Flutter Code with Flutter Lint / Part2
#flutter
#flutterjp
#flutterdev
##shibuya_apk
Kenichi Kambara
April 21, 2023
More Decks by Kenichi Kambara
See All by Kenichi Kambara
n個のアプリ開発系 Skills を 作り育てて気づいたこと
korodroid
0
1.1k
[爆速開発LT #2] Codex-Powered Mobile Apps Development - Deep Dive Edition -
korodroid
0
52
[DevFest Singapore] Getting Started with Mobile Development Using Generative AI
korodroid
0
63
[FlutterAlliance]Designing Borderless UX in Flutter: Insights from 50 Countries
korodroid
0
40
[Codex Meetup Japan #1] Codex-Powered Mobile Apps Development
korodroid
2
1.5k
[AgentConHelsinki2025]From Assistant to Agent: How Developer Agents Reshape Mobile Workflows
korodroid
0
34
[FlutterTokyo#10]In-App Language Switching in Flutter
korodroid
0
48
[potatotips #92]Integrating Quick Settings Tiles into Your Android App
korodroid
1
190
[ABC2025Spring]Code Less, Build More: A Practical Guide to Mobile Apps with Generative AI
korodroid
0
250
Other Decks in Technology
See All in Technology
類似画像検索モデルの開発ノウハウ
lycorptech_jp
PRO
4
1k
AI時代から振り返るTerraform drift運用の歴史 / AI Age Reflections on the History of Terraform Drift Operations
aeonpeople
0
600
最低限これだけ押さえれ大丈夫_Claude Enterprise/Team企業展開ガバナンス入門
tkikuchi
1
550
Datadog 認定試験の概要と対策
uechishingo
0
200
NFLコンペ2026 解法
lycorptech_jp
PRO
0
130
Amazon Bedrock 経由の Claude Cowork を試してみよう・MCP にも繋いでみよう
sugimomoto
0
260
地元にいないローカルオーガナイザーの立ち回り
uvb_76
1
370
脅威をエンジニアリングの糧にして:恐怖を乗り越えた先にあったもの / Turn threats into fuel for engineering: what lay beyond overcoming fear
nrslib
1
350
AIガバナンス実践 - 生成AIコネクタのデータ漏洩リスクと実務対策
knishioka
0
140
電子辞書Brainをネットに繋げてみた(自力編)
raspython3
0
320
oracle-to-databricks-migration-with-llm-and-dbt
casek
1
370
Cloud Run のアップデート 触ってみる&紹介
gre212
0
240
Featured
See All Featured
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.5k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.1k
Navigating Team Friction
lara
192
16k
A designer walks into a library…
pauljervisheath
211
24k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
190
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
410
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
260
WCS-LA-2024
lcolladotor
0
610
Producing Creativity
orderedlist
PRO
348
40k
Leo the Paperboy
mayatellez
7
1.8k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
350
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
760
Transcript
2023.04.21 ਆݪ ݈Ұ (@korodroid) Writing better Flutter Code with
Flutter Lint / Part2 shibuya.apk #41
ࣗݾհ •ۀɿϞόΠϧΞϓϦ։ൃ/ٕज़ࢧԉ/จԽৢ׆ಈ •ߨԋɿΠϕϯτొஃ(ւ֎14ճɺࠃ100ճ+) •ࣥචɿ7 •झຯɿϥϯχϯά/ӳձ/ΞϓϦ։ൃ ਆݪ ݈Ұ (NTTςΫϊΫϩε/ΤόϯδΣϦετ) @korodroid
ॳΊͯͷshibuya.apkొஃ(8લ…)
About my Flutter product (Private works) Sekaiphone Pro(Flutter/Kotlin/Swift) MyToDo(Flutter)
Part1ͷ͓͞Β͍
Lintπʔϧ(੩తղੳ)Λ׆༻͢ΔϝϦοτྫ 1. જࡏతͳόάͷݕग़ 2. ϨϏϡʔ࡞ۀͷෛՙܰݮ 3. ΞϓϦͷύϑΥʔϚϯεվળ
Flutter͚Lintπʔϧ( fl utter_lints) https://pub.dev/packages/ fl utter_lints
Walking through “ fl utter_lints” ↑ඞཁʹԠͯ͡ɺ࠷৽൛ʹߋ৽
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 “Linter for Dart” https://dart-lang.github.io/linter/lints/ productionίʔυʹ͓͚Δprint੍
Example: “avoid_print”
͔͜͜ΒPart2
Customizing Rules https://github.com/ fl utter/samples
Walking through “Sample Rules” include: package: fl utter_lints/ fl
utter.yaml analyzer: language: strict-casts: true strict-inference: true 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 include: package:analysis_defaults/ fl utter.yaml ֤sampleͷanalysis_options.yaml
include: package: fl utter_lints/ fl utter.yaml analyzer: language: strict-casts:
true strict-inference: true 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 include: package:analysis_defaults/ fl utter.yaml ֤sampleͷanalysis_options.yaml Walking through “Sample Rules”
Customizing static analysis https://dart.dev/guides/language/analysis-options
Customizing Rules ↑ඞཁʹԠͯ͡ɺΧελϚΠζ
Example1 analyzer: errors: avoid_print: error ྫ.avoid_printҧΛΤϥʔʹ
Example2 linter: rules: avoid_print: false ྫ.avoid_printҧΛνΣοΫର֎
Example3 analyzer: exclude: - “**/*.g.dart" - "**/*.freezed.dart" - test/*.dart
ྫ.ରύεͷϑΝΠϧΛνΣοΫର֎
·ͱΊ •ެࣜϦϑΝϨϯεͷϓϥΫςΟεΛࢀߟʹʂ •Linter for DartɺݴޠֶशͷಡΈͱ͓ͯ͢͢͠Ίʂ •ඞཁʹԠͯ͡ɺϧʔϧΛదٓΧελϚΠζ
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