adambard / adambard/learnxinyminutes-docs
[dart/en] Learn Dart broken
- Dominant language
- Markdown
- Stars
- 12.3k
- Forks
- 3.7k
- Avg merge
- 13h 10m
- Merged PRs (30d)
- 6
Description
Hi there, thanks for this awesome resource.
Attempting to run the current Learn Dart page in the latest version of dart throws several errors:
```
: Warning: Operand of null-aware operation '??' has type 'bool' which excludes null.
var hasString = isBool ?? "default String";
^
: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
Try adding the name of the type of the variable or the keyword 'var'.
CONSTANT_VALUE = "DID I?"; //Error
^^^^^^^^^^^^^^
: Error: 'CONSTANT_VALUE' is already declared in this scope.
CONSTANT_VALUE = "DID I?"; //Error
^^^^^^^^^^^^^^
: Context: Previous declaration of 'CONSTANT_VALUE'.
const CONSTANT_VALUE = "I CANNOT CHANGE";
^^^^^^^^^^^^^^
: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
Try adding the name of the type of the variable or the keyword 'var'.
finalValue = "Seems not"; //Error
^^^^^^^^^^
: Error: 'finalValue' is already declared in this scope.
finalValue = "Seems not"; //Error
^^^^^^^^^^
: Context: Previous declaration of 'finalValue'.
final finalValue = "value cannot be change once instantiated";
^^^^^^^^^^
: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
Try adding the name of the type of the variable or the keyword 'var'.
mutableValue = "this is valid";
^^^^^^^^^^^^
: Error: 'mutableValue' is already declared in this scope.
mutableValue = "this is valid";
^^^^^^^^^^^^
: Context: Previous declaration of 'mutableValue'.
var mutableValue = "Variable string";
^^^^^^^^^^^^
: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
Try adding the name of the type of the variable or the keyword 'var'.
mutableValue = false; // Error.
^^^^^^^^^^^^
Exited (254)
```
Contributor guide
Assessment
This issue has not been assessed yet.