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

Setting Lint Rules in Flutter

Setting Lint Rules in Flutter

There's nothing as difficult as deciphering someone else's code. It is usually very hard to understand especially when no particular format is followed unless the person wrote clear readable lines of code. Here is where lint rules come in. Linting is the process of checking the source code for programmatic as well as stylistic errors and unformatted code. In this session, we are going to learn how to set the lint rules in Flutter

Maureen Josephine

December 02, 2020
Tweet

More Decks by Maureen Josephine

Other Decks in Programming

Transcript

  1. • What’s Linting • Common Programming Errors • Implementing Lint

    Rules in Flutter • Sample Demo • Q/A Agenda
  2. Linting is the process of checking source code for Programmatic

    as well as Stylistic errors and unformatted Code
  3. Set Lint Rules Create Enable Add package Enable default Google

    rules: pedantic https://pub.dev/packages/pedantic Customize Rules e
  4. Set Lint Rules Create Enable Add package //If you use

    `package:pedantic/pedantic.dart`, add a normal dependency. dependencies: pedantic: ^1.9.0 // Or, if you just want `analysis_options.yaml`, it can be a dev dependency. dev_dependencies: pedantic: ^1.9.0 Save Customize Rules
  5. Set Lint Rules Create Enable Add package Add linter :

    to the analysis-options file, followed by rules : Save Customize Rules
  6. Q/A