30 lines
685 B
Plaintext
30 lines
685 B
Plaintext
== Why is this an issue?
|
|
|
|
Shared naming conventions allow teams to collaborate efficiently. In Dart the convention is that all type names should be in camel-case starting with a capital letter (aka Pascal case).
|
|
|
|
This rule raises an issue when a class name does not comply with this convention.
|
|
|
|
== How to fix it
|
|
|
|
=== Code examples
|
|
|
|
==== Noncompliant code example
|
|
|
|
[source,dart]
|
|
----
|
|
class My_Class // Noncompliant,contains dash
|
|
class myClass // Noncompliant, starts with lovercase
|
|
class myclass // Noncompliant, all in lowercase
|
|
----
|
|
|
|
==== Compliant solution
|
|
|
|
[source,dart]
|
|
----
|
|
class MyClass
|
|
----
|
|
|
|
== Resources
|
|
|
|
* https://dart.dev/tools/linter-rules/camel_case_types[Dart Lint rule]
|