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
530
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#6]Navigating Flutter Upgrades
korodroid
0
49
[DevFestTokyo]Accelerating Flutter App Development Using Generative AI
korodroid
2
820
[DevFestMilano]Enhancing Flutter Apps UX for Global Users
korodroid
0
31
[mobile #15]UX Improvements on Flutter Apps Part 5
korodroid
0
43
[ABC2024Summer]Flutter UX Improvements + α
korodroid
0
520
[YUMEMI.grow Mobile #14]Wear OS Recap from I/O 2024 [short version]
korodroid
0
56
[mobile #14]UX Improvements on Flutter Apps Part 4
korodroid
0
62
[potatotips #87]UX Improvements on Flutter Apps Part 3
korodroid
0
52
[YUMEMI.grow Mobile #12]UX Improvements on Flutter Apps Part 2
korodroid
0
110
Other Decks in Technology
See All in Technology
AIエージェント開発手法と業務導入のプラクティス
ykosaka
9
2.7k
Global Azure2025(GitHub Copilot ハンズオン)
tomokusaba
1
360
PagerDuty×ポストモーテムで築く障害対応文化/Building a culture of incident response with PagerDuty and postmortems
aeonpeople
3
540
Serverlessだからこそコードと設計にはこだわろう
kenichirokimura
1
190
Previewでもここまで追える! Azure AI Foundryで始めるLLMトレース
tomodo_ysys
2
250
Aspire をカスタマイズしよう & Aspire 9.2
nenonaninu
0
370
MySQL Indexes and Histograms – How they really speed up your queries
lefred
0
150
Microsoft Fabric vs Databricks vs (Snowflake) -若手エンジニアがそれぞれの強みと違いを比較してみた- "A Young Engineer's Comparison of Their Strengths and Differences"
reireireijinjin6
1
130
コードや知識を組み込む / Incorporating Codes and Knowledge
ks91
PRO
0
170
AIにおけるソフトウェアテスト_ver1.00
fumisuke
1
350
時間がないなら、つくればいい 〜数十人規模のチームが自律性を発揮するために試しているいくつかのこと〜
kakehashi
PRO
19
3.3k
Oracle Cloud Infrastructure:2025年4月度サービス・アップデート
oracle4engineer
PRO
0
350
Featured
See All Featured
The Art of Programming - Codeland 2020
erikaheidi
54
13k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.4k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
331
21k
RailsConf 2023
tenderlove
30
1.1k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
52
2.4k
YesSQL, Process and Tooling at Scale
rocio
172
14k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
2.9k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
34
2.2k
KATA
mclloyd
29
14k
Code Review Best Practice
trishagee
67
18k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
129
19k
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