51
loading...
This website collects cookies to deliver better user experience
missing_return:
Produce an error every time there’s a function that does not return its type.
dead_code
This is a mistake we overlook especially when writing if statements with multiple else if. This rule will produce an error for unreachable code.
always_declare_return_types
Will check for return types on all functions. In case of new updates it will prevent a miss in case of a change.
avoid_web_libraries_in_flutter
Prevent installs of libraries that are meant for the web. Only allow libraries and plugins that are meant for android and IOS.
missing_required_param
Ensure that all function and method parameters are added otherwise pop error.
file_names
Dart has a preferred naming system called the snake case system. This rule will give an error if a file created does not follow this naming system. The files are named with underscores as separators and all letters in lowercase.
Other naming systems include Kebab, Pascal case and Camel Case. You can read more here
empty_statements
View the following code to get a better understanding.
iterable_contains_unrelated_type
Invoke an error if a list or any class that extends the iterable to accept only a certain type any other unrelated to fail.
list_remove_unrelated_type
This checks for type before removing an item. Works on iterable.
no_duplicate_case_values
This means if there are more than one return which would lead to dead code, the analyzer shows it as an error.
unrelated_type_equality_checks
This will show an error when trying to compare two values of different type.
lines_longer_than_80_chars
This rule ensures that there isn’t a line of code that is longer than 80 characters long. The code will need to be wrapped to the next line.
prefer_single_quotes:
Ensures that only single quotes are used from importing files to initializing String properties.
51