don't annotate initializing formals
This commit is contained in:
parent
03cf34b779
commit
f479212675
5 changed files with 5 additions and 5 deletions
|
@ -4,6 +4,7 @@
|
|||
* Support pulling fields from parent classes and interfaces.
|
||||
* Only generate `const` constructors if *all*
|
||||
fields lack a setter.
|
||||
* Don't type-annotate initializing formals.
|
||||
|
||||
# 2.4.4
|
||||
* Remove unnecessary `new` and `const`.
|
||||
|
|
|
@ -141,7 +141,7 @@ class JsonModelGenerator extends GeneratorForAnnotation<Serializable> {
|
|||
|
||||
if (!isListOrMapType(field.type)) {
|
||||
b.toThis = true;
|
||||
} else {
|
||||
} else if (!b.toThis) {
|
||||
b.type = convertTypeReference(field.type);
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ part of 'goat.dart';
|
|||
|
||||
@generatedSerializable
|
||||
class Goat implements _Goat {
|
||||
const Goat({this.integer = 34, List<int> this.list = const [34, 35]});
|
||||
const Goat({this.integer = 34, this.list = const [34, 35]});
|
||||
|
||||
@override
|
||||
final int integer;
|
||||
|
|
|
@ -8,7 +8,7 @@ part of 'has_map.dart';
|
|||
|
||||
@generatedSerializable
|
||||
class HasMap implements _HasMap {
|
||||
const HasMap({@required Map<dynamic, dynamic> this.value});
|
||||
const HasMap({@required this.value});
|
||||
|
||||
@override
|
||||
final Map<dynamic, dynamic> value;
|
||||
|
|
|
@ -8,8 +8,7 @@ part of 'with_enum.dart';
|
|||
|
||||
@generatedSerializable
|
||||
class WithEnum implements _WithEnum {
|
||||
const WithEnum(
|
||||
{this.type = WithEnumType.b, List<int> this.finalList, this.imageBytes});
|
||||
const WithEnum({this.type = WithEnumType.b, this.finalList, this.imageBytes});
|
||||
|
||||
@override
|
||||
final WithEnumType type;
|
||||
|
|
Loading…
Reference in a new issue