diff --git a/lib/src/lints/named_parameters_ordering/models/parameter_type.dart b/lib/src/lints/named_parameters_ordering/models/parameter_type.dart index 8f560db3..0ba8cd6e 100644 --- a/lib/src/lints/named_parameters_ordering/models/parameter_type.dart +++ b/lib/src/lints/named_parameters_ordering/models/parameter_type.dart @@ -23,8 +23,8 @@ enum ParameterType { /// The default ordering of parameter types. static const defaultOrder = [ ParameterType.requiredInherited, - ParameterType.inherited, ParameterType.required, + ParameterType.inherited, ParameterType.nullable, ParameterType.defaultValue, ]; diff --git a/test/src/lints/named_parameters_ordering/named_parameters_ordering_rule_test.dart b/test/src/lints/named_parameters_ordering/named_parameters_ordering_rule_test.dart index ecc896c4..36e8a831 100644 --- a/test/src/lints/named_parameters_ordering/named_parameters_ordering_rule_test.dart +++ b/test/src/lints/named_parameters_ordering/named_parameters_ordering_rule_test.dart @@ -67,9 +67,9 @@ class User extends Base { User({ required super.accountType, - super.userId, required this.name, required this.email, + super.userId, this.age, this.country, this.isActive = true, @@ -113,8 +113,8 @@ class User extends Base { User({ required super.accountType, this.age, - ${expectLint('super.userId')}, - required this.name, + ${expectLint('required this.name')}, + super.userId, this.isActive = true, ${expectLint('required this.email')}, });