nzigen_lints 1.0.0 copy "nzigen_lints: ^1.0.0" to clipboard
nzigen_lints: ^1.0.0 copied to clipboard

Lint rules in mobile developer team in Nzigen Inc.

example/lib/main.dart

/// TODO WRITE DOCUMENTATION
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// The code in this file (and all other dart files in the package) is
// analyzed using the rules activated in `analysis_options.yaml`.

// The following syntax deactivates a lint for the entire file:
// ignore_for_file: avoid_renaming_method_parameters

void main() {
  const String partOne = 'Hello';
  const String partTwo = 'World';

  // The following syntax deactivates a lint on a per-line bases:
  print('$partOne $partTwo'); // ignore: avoid_print
}

// You can see some warnings in the following code.
// Other lints are described in recommended.yaml.
class TestClass {
  void testAnalysisIsWorking(Color color) {
    // Show a warning cause of no_default_cases from IDE.
    switch (color) {
      case Color.red:
        print('Red');
        break;
      default:
        break;
    }
    // Unnesasary brace in string interps.
    final str = 'Hello';
    print("str: ${str}");

    // Use if-null operators to covert nulls to bools.
    final bool? isTrue = true;
    if (isTrue == true) {
      print('true');
    }
  }
}

enum Color { red, green, blue }
copied to clipboard
2
likes
0
points
23
downloads

Publisher

unverified uploader

Weekly Downloads

2024.06.30 - 2025.01.12

Lint rules in mobile developer team in Nzigen Inc.

Repository (GitHub)
View/report issues

Topics

#lints

License

unknown (license)

Dependencies

flutter_lints

More

Packages that depend on nzigen_lints