diff --git a/angel_serialize/example/main.dart b/angel_serialize/example/main.dart index 8aebb4cc..c1131cdc 100644 --- a/angel_serialize/example/main.dart +++ b/angel_serialize/example/main.dart @@ -1,3 +1,4 @@ +// ignore_for_file: unused_element import 'package:angel_serialize/angel_serialize.dart'; @serializable diff --git a/angel_serialize_generator/example/main.dart b/angel_serialize_generator/example/main.dart index 8aebb4cc..c1131cdc 100644 --- a/angel_serialize_generator/example/main.dart +++ b/angel_serialize_generator/example/main.dart @@ -1,3 +1,4 @@ +// ignore_for_file: unused_element import 'package:angel_serialize/angel_serialize.dart'; @serializable diff --git a/angel_serialize_generator/test/models/author.g.dart b/angel_serialize_generator/test/models/author.g.dart index 2a634a59..8dc8f0dd 100644 --- a/angel_serialize_generator/test/models/author.g.dart +++ b/angel_serialize_generator/test/models/author.g.dart @@ -260,7 +260,7 @@ abstract class AuthorSerializer { : null); } - static Map toMap(Author model) { + static Map toMap(_Author model) { if (model == null) { return null; } @@ -276,7 +276,7 @@ abstract class AuthorSerializer { 'id': model.id, 'name': model.name, 'age': model.age, - 'books': model.books?.map((m) => m.toJson())?.toList(), + 'books': model.books?.map((m) => BookSerializer.toMap(m))?.toList(), 'newest_book': BookSerializer.toMap(model.newestBook), 'created_at': model.createdAt?.toIso8601String(), 'updated_at': model.updatedAt?.toIso8601String() @@ -340,7 +340,7 @@ abstract class LibrarySerializer { : null); } - static Map toMap(Library model) { + static Map toMap(_Library model) { if (model == null) { return null; } @@ -397,7 +397,7 @@ abstract class BookmarkSerializer { : null); } - static Map toMap(Bookmark model) { + static Map toMap(_Bookmark model) { if (model == null) { return null; } diff --git a/angel_serialize_generator/test/models/book.g.dart b/angel_serialize_generator/test/models/book.g.dart index 464cd4ec..52fb099c 100644 --- a/angel_serialize_generator/test/models/book.g.dart +++ b/angel_serialize_generator/test/models/book.g.dart @@ -131,7 +131,7 @@ abstract class BookSerializer { : null); } - static Map toMap(Book model) { + static Map toMap(_Book model) { if (model == null) { return null; } diff --git a/angel_serialize_generator/test/models/game_pad.dart b/angel_serialize_generator/test/models/game_pad.dart index dbc70c39..91af7ace 100644 --- a/angel_serialize_generator/test/models/game_pad.dart +++ b/angel_serialize_generator/test/models/game_pad.dart @@ -10,5 +10,6 @@ class _Gamepad { Map dynamicMap; + // ignore: unused_field String _somethingPrivate; } diff --git a/angel_serialize_generator/test/models/game_pad.g.dart b/angel_serialize_generator/test/models/game_pad.g.dart index 264a009e..10f78ac6 100644 --- a/angel_serialize_generator/test/models/game_pad.g.dart +++ b/angel_serialize_generator/test/models/game_pad.g.dart @@ -63,12 +63,13 @@ abstract class GamepadSerializer { : null); } - static Map toMap(Gamepad model) { + static Map toMap(_Gamepad model) { if (model == null) { return null; } return { - 'buttons': model.buttons?.map((m) => m.toJson())?.toList(), + 'buttons': + model.buttons?.map((m) => GamepadButtonSerializer.toMap(m))?.toList(), 'dynamic_map': model.dynamicMap }; } diff --git a/angel_serialize_generator/test/models/game_pad_button.g.dart b/angel_serialize_generator/test/models/game_pad_button.g.dart index 37b94445..1ff31659 100644 --- a/angel_serialize_generator/test/models/game_pad_button.g.dart +++ b/angel_serialize_generator/test/models/game_pad_button.g.dart @@ -47,7 +47,7 @@ abstract class GamepadButtonSerializer { name: map['name'] as String, radius: map['radius'] as int); } - static Map toMap(GamepadButton model) { + static Map toMap(_GamepadButton model) { if (model == null) { return null; } diff --git a/angel_serialize_generator/test/models/with_enum.g.dart b/angel_serialize_generator/test/models/with_enum.g.dart index 5eb07319..053e514f 100644 --- a/angel_serialize_generator/test/models/with_enum.g.dart +++ b/angel_serialize_generator/test/models/with_enum.g.dart @@ -71,7 +71,7 @@ abstract class WithEnumSerializer { : null))); } - static Map toMap(WithEnum model) { + static Map toMap(_WithEnum model) { if (model == null) { return null; }