Slide 1

Slide 1 text


 Setting Lint rules in Flutter Maureen Josephine
 Software engineer - CarePay
 Twitter: @J_Akello

Slide 2

Slide 2 text

● What’s Linting ● Common Programming Errors ● Implementing Lint Rules in Flutter ● Sample Demo ● Q/A Agenda

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

What’s Linting

Slide 6

Slide 6 text

Linting is the process of checking source code for Programmatic as well as Stylistic errors and unformatted Code

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

How do we set Lint Rules in Dart?

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

Set Lint Rules Create Enable Add package Create “analysis_options.yaml” file Customize Rules

Slide 11

Slide 11 text

Set Lint Rules Create Enable Add package Enable default Google rules: pedantic https://pub.dev/packages/pedantic Customize Rules e

Slide 12

Slide 12 text

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

Slide 13

Slide 13 text

Set Lint Rules Create Enable Add package Add linter : to the analysis-options file, followed by rules : Save Customize Rules

Slide 14

Slide 14 text

https://dart.dev/guides/language/analysis-options https://dart.dev/guides/language/effective-dart/style https://pub.dev/packages/pedantic https://dart-lang.github.io/linter/lints/

Slide 15

Slide 15 text

Sample Code Demo

Slide 16

Slide 16 text

Q/A

Slide 17

Slide 17 text

@J_Akello