Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Linter vs Human (By: Noor Ali Butt) - Flutter F...

Linter vs Human (By: Noor Ali Butt) - Flutter Forward Extended 2023

Talk by Noor Ali Butt (https://www.linkedin.com/in/nooralibutt/) at Flutter Forward Extended 2023 by GDG Lahore.

GDG Lahore

March 11, 2023
Tweet

More Decks by GDG Lahore

Other Decks in Programming

Transcript

  1. Agenda Bad coding examples What is Linter How to install

    Linter Enabling/Disabling Rules Adding all the rules Conclusion 9:00am 9:15am 9:30am 10:00am 12:30pm 4:00pm Only your code is bad I am the best
  2. The Dart linter is a static analyzer for identifying possible

    problems in your Dart source code. There are over two hundred code linting rules available, checking anything from: What is Linter potential type issues Code Style Proper Flutter Widget Usage Formatting + + + +
  3. Code Sample 1
 
 
 
 
 
 Code Sample

    2
 Let’s solve this using linter
  4. dev_dependencies:
 flutter_lints: ^2.0.1
 
 How to install Linter All the

    pre defined flutter recommended lints will be imported In a file called analysis_options.yaml
  5. I have a friend named Ameer Hamza. He is the

    best programmer i recommend you guys learn from him BTW Fun Fact:
  6. What happens when I added all the rules to my

    existing repo?: - Performance issue - Some lints are incompatible with other lints
  7. Either hire a very good code reviewer or implement lints

    Optimized Code and less prone to error In Package publishing, flutter award pub points based on lints Improves your coding style + + + + Conclusion