@@ -914,7 +914,7 @@ class CompileTimeErrorCode extends ErrorCode {
914
914
'DEFAULT_LIST_CONSTRUCTOR_MISMATCH' ,
915
915
"A list whose values cannot be 'null' cannot be given an initial length "
916
916
"because the initial values would all be 'null'." ,
917
- correction: "Try removing the argument." );
917
+ correction: "Try removing the argument or using 'List.filled' ." );
918
918
919
919
/**
920
920
* 6.2.1 Required Formals: By means of a function signature that names the
@@ -1591,11 +1591,11 @@ class CompileTimeErrorCode extends ErrorCode {
1591
1591
const CompileTimeErrorCode (
1592
1592
'INTEGER_LITERAL_IMPRECISE_AS_DOUBLE' ,
1593
1593
"The integer literal is being used as a double, but can't be "
1594
- ' represented as a 64 bit double without overflow and/or loss of '
1595
- ' precision: {0}' ,
1594
+ " represented as a 64 bit double without overflow and/or loss of "
1595
+ " precision: {0}" ,
1596
1596
correction:
1597
- ' Try using the BigInt class, or switch to the closest valid '
1598
- ' double: {1}' );
1597
+ " Try using the BigInt class, or switch to the closest valid "
1598
+ " double: {1}" );
1599
1599
1600
1600
/**
1601
1601
* 15 Metadata: Metadata consists of a series of annotations, each of which
@@ -1698,7 +1698,8 @@ class CompileTimeErrorCode extends ErrorCode {
1698
1698
"The parameter '{0}' cannot have a value of 'null' because of its "
1699
1699
"type, but no default value it valid, so it must be a required "
1700
1700
"parameter." ,
1701
- correction: "Try making this nullable (by adding a '?') or "
1701
+ correction: "Try making this nullable (by adding a '?'), "
1702
+ "adding a default value, or "
1702
1703
"making this a required parameter." );
1703
1704
1704
1705
/**
@@ -2985,9 +2986,9 @@ class CompileTimeErrorCode extends ErrorCode {
2985
2986
*/
2986
2987
static const CompileTimeErrorCode GENERIC_FUNCTION_TYPE_CANNOT_BE_BOUND =
2987
2988
const CompileTimeErrorCode ('GENERIC_FUNCTION_TYPE_CANNOT_BE_BOUND' ,
2988
- ' Generic function types may not be used as type parameter bounds' ,
2989
- correction: ' Try making the free variable in the function type part'
2990
- ' of the larger declaration signature' );
2989
+ " Generic function types may not be used as type parameter bounds" ,
2990
+ correction: " Try making the free variable in the function type part"
2991
+ " of the larger declaration signature" );
2991
2992
2992
2993
static const CompileTimeErrorCode FOR_IN_WITH_CONST_VARIABLE =
2993
2994
const CompileTimeErrorCode ('FOR_IN_WITH_CONST_VARIABLE' ,
@@ -4882,10 +4883,10 @@ class StaticWarningCode extends ErrorCode {
4882
4883
static const StaticWarningCode UNCHECKED_USE_OF_NULLABLE_VALUE =
4883
4884
const StaticWarningCode (
4884
4885
'UNCHECKED_USE_OF_NULLABLE_VALUE' ,
4885
- ' The expression is nullable and must be null-checked before it can be'
4886
- ' used.' ,
4886
+ " The expression is nullable and must be null-checked before it can be"
4887
+ " used." ,
4887
4888
correction:
4888
- ' Try casting or check the value is not null before using it.' );
4889
+ " Try casting or check the value is not null before using it." );
4889
4890
4890
4891
/**
4891
4892
* It is a static warning to assign void to any non-void type in dart.
@@ -4898,9 +4899,9 @@ class StaticWarningCode extends ErrorCode {
4898
4899
'USE_OF_VOID_RESULT' ,
4899
4900
"The expression here has a type of 'void', and therefore cannot be used." ,
4900
4901
correction:
4901
- ' Check if you are using the correct API; there may be a function or'
4902
+ " Check if you are using the correct API; there may be a function or"
4902
4903
" call that returns void you didn't expect. Also check type parameters"
4903
- ' and variables which, in rare cases, may be void as well.' );
4904
+ " and variables which, in rare cases, may be void as well." );
4904
4905
4905
4906
@override
4906
4907
final ErrorSeverity errorSeverity;
0 commit comments