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
Kenichi Kambara
April 21, 2023
Technology
0
490
Writing better Flutter Code with Flutter Lint / Part2
#flutter
#flutterjp
#flutterdev
##shibuya_apk
Kenichi Kambara
April 21, 2023
Tweet
Share
More Decks by Kenichi Kambara
See All by Kenichi Kambara
[Codex Meetup Japan #1] Codex-Powered Mobile Apps Development
korodroid
0
6
[AgentConHelsinki2025]From Assistant to Agent: How Developer Agents Reshape Mobile Workflows
korodroid
0
9
[FlutterTokyo#10]In-App Language Switching in Flutter
korodroid
0
22
[potatotips #92]Integrating Quick Settings Tiles into Your Android App
korodroid
1
130
[ABC2025Spring]Code Less, Build More: A Practical Guide to Mobile Apps with Generative AI
korodroid
0
200
[DevTalksRomania]Building Augmented Reality Experiences with Flutter and AI-Powered Development
korodroid
0
17
[FlutterNinjas]Adapting Flutter App UX for Users Across the World
korodroid
0
51
[FlutterTokyo#6]Navigating Flutter Upgrades
korodroid
0
69
[DevFestTokyo]Accelerating Flutter App Development Using Generative AI
korodroid
2
920
Other Decks in Technology
See All in Technology
AI ReadyなData PlatformとしてのAutonomous Databaseアップデート
oracle4engineer
PRO
0
230
Reflections of AI: A Trilogy in Four Parts (GOTO; Copenhagen 2025)
ondfisk
0
100
The Cake Is a Lie... And So Is Your Login’s Accessibility
leichteckig
0
100
【Kaigi on Rails 事後勉強会LT】MeはどうしてGirlsに? 私とRubyを繋いだRail(s)
joyfrommasara
0
210
AWS 잘하는 개발자 되기 - AWS 시작하기: 클라우드 개념부터 IAM까지
kimjaewook
0
120
業務効率化をさらに加速させる、ノーコードツールとStep Functionsのハイブリッド化
smt7174
2
110
実装で解き明かす並行処理の歴史
zozotech
PRO
1
650
許しとアジャイル
jnuank
1
140
生成AIとM5Stack / M5 Japan Tour 2025 Autumn 東京
you
PRO
0
240
能登半島地震で見えた災害対応の課題と組織変革の重要性
ditccsugii
0
240
"プロポーザルってなんか怖そう"という境界を超えてみた@TSUDOI by giftee Tech #1
shilo113
0
170
Optuna DashboardにおけるPLaMo2連携機能の紹介 / PFN LLM セミナー
pfn
PRO
2
940
Featured
See All Featured
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
358
30k
The Cult of Friendly URLs
andyhume
79
6.6k
Side Projects
sachag
455
43k
Become a Pro
speakerdeck
PRO
29
5.5k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
23
1.5k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
9
860
Git: the NoSQL Database
bkeepers
PRO
431
66k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
2.7k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
The Language of Interfaces
destraynor
162
25k
How GitHub (no longer) Works
holman
315
140k
Context Engineering - Making Every Token Count
addyosmani
5
220
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