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
420
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
[potatotips #87]UX Improvements on Flutter Apps Part 3
korodroid
0
11
[YUMEMI.grow Mobile #12]UX Improvements on Flutter Apps Part 2
korodroid
0
24
[potatotips #86]UX Improvements on Flutter Apps Part 1
korodroid
0
33
Supporting RTL on Flutter Apps 7 Development Tips
korodroid
0
35
[DevFestKC]Go Global with Flutter Apps 101
korodroid
0
38
[ABC2023A]Go Global with Flutter Apps
korodroid
0
27
[potatotips #85]Deep Dive into RTL on Flutter Apps (Short ver.)
korodroid
0
40
Supporting RTL on Flutter Apps
korodroid
0
38
[potatotips #84]Supporting Large Screen on Flutter
korodroid
0
86
Other Decks in Technology
See All in Technology
MapLibreとAmazon Location Service
dayjournal
1
160
プラットフォームってつくることより計測することが重要なんじゃないかという話 / Platform Engineering Meetup #8
taishin
1
370
一生覚えておきたい「システム開発=コミュニケーション」〜初めての実務案件振り返りLT〜
maimyyym
1
150
データベース02: データベースの概念
trycycle
0
160
Azureの基本的な権限管理の勉強会
yhana
0
580
よく聞くけど使ったことないソフトウェアNo.1 KafkaとSnowflake
foursue
4
360
プロンプトエンジニアリングでがんばらない-Agentic Workflow へ-近藤憲児
kenjikondobai
3
810
DMM.com アルファ室採用案内資料
hsugita
1
160
いつか使うかも貯金してたらめちゃめちゃ機能が増えてた話
riyaamemiya
0
270
GraphQL 成熟度モデルの紹介と、プロダクトに当てはめた事例 / GraphQL maturity model
mh4gf
7
1.3k
On Your Data を超えていく!
hirotomotaguchi
2
690
Terraformあれやこれ/terraform-this-and-that
emiki
8
1.4k
Featured
See All Featured
Art, The Web, and Tiny UX
lynnandtonic
289
19k
A Tale of Four Properties
chriscoyier
151
22k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
2
3.4k
It's Worth the Effort
3n
180
27k
Design by the Numbers
sachag
274
18k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
121
39k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
659
120k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
7
1k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
14
1.5k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
18
6.9k
5 minutes of I Can Smell Your CMS
philhawksworth
199
19k
Building Flexible Design Systems
yeseniaperezcruz
319
37k
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