ptwcode_lints 1.0.6 copy "ptwcode_lints: ^1.0.6" to clipboard
ptwcode_lints: ^1.0.6 copied to clipboard

outdated

This package contains a set of lints for Flutter to encourage good coding practices.

example/lib/main.dart

// ignore_for_file: unused_local_variable

import 'package:example/models.dart';

class Dumb {
  void fun1() => print(user.name); // no warning
  void fun2() => print(user.name); // no warning
}

void fun6() {
  final age = user2.man.age; // no warning
  final name = user2.man.name; // no warning
}

void fun5() {
  final time = DateTime.now();
  final items = [];

  final groupByTime1 = {time: items, time: items};
  final groupByTime2 = {time: items, time: items};

  final yeap = [
    ...groupByTime1.entries.map((el) => User(el.key)).toList(), // no warning
    ...groupByTime2.entries.map((el) => User(el.key)).toList(), // no warning
  ];
}

void fun4() {
  list.map((el) => el.name); // no warning
  list.map((el) => el.name); // no warning
}

void fun3() {
  list.map((el) => user.name); // warning
  list.map((el) => user.name); // warning
}

void fun2() {
  final name = user.name; // warning
  print(user.name);
}

void fun1() {
  final name = user.name; // no warning
  print(name);
}
2
likes
0
points
159
downloads

Publisher

unverified uploader

Weekly Downloads

This package contains a set of lints for Flutter to encourage good coding practices.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

analyzer, analyzer_plugin, custom_lint_builder

More

Packages that depend on ptwcode_lints