diff --git a/lib/src/data/models/api_models.dart b/lib/src/data/models/api_models.dart index a48e302..494393f 100644 --- a/lib/src/data/models/api_models.dart +++ b/lib/src/data/models/api_models.dart @@ -166,7 +166,7 @@ abstract class _Envelop { @JsonSerializable() class DataEnvelop extends _Envelop { - @_GenericListConverter() + @_GenericConverter() T data; DataEnvelop({ @@ -183,7 +183,7 @@ class DataEnvelop extends _Envelop { @JsonSerializable() class DataArrayEnvelop extends _Envelop { - @_GenericListConverter() + @_GenericConverter() List data; int total; @@ -203,8 +203,8 @@ class DataArrayEnvelop extends _Envelop { /// Example of model with GenericCollection /// https://github.com/dart-lang/json_serializable/blob/ee2c5c788279af01860624303abe16811850b82c/example/lib/json_converter_example.dart -class _GenericListConverter implements JsonConverter { - const _GenericListConverter(); +class _GenericConverter implements JsonConverter { + const _GenericConverter(); @override T fromJson(Object json) { diff --git a/lib/src/data/models/api_models.g.dart b/lib/src/data/models/api_models.g.dart index a312f22..b165a7f 100644 --- a/lib/src/data/models/api_models.g.dart +++ b/lib/src/data/models/api_models.g.dart @@ -87,7 +87,7 @@ DataEnvelop _$DataEnvelopFromJson(Map json) { message: json['message'] as String, data: json['data'] == null ? null - : _GenericListConverter().fromJson(json['data'])); + : _GenericConverter().fromJson(json['data'])); } Map _$DataEnvelopToJson(DataEnvelop instance) => @@ -96,7 +96,7 @@ Map _$DataEnvelopToJson(DataEnvelop instance) => 'message': instance.message, 'data': instance.data == null ? null - : _GenericListConverter().toJson(instance.data) + : _GenericConverter().toJson(instance.data) }; DataArrayEnvelop _$DataArrayEnvelopFromJson(Map json) { @@ -105,7 +105,7 @@ DataArrayEnvelop _$DataArrayEnvelopFromJson(Map json) { message: json['message'] as String, data: (json['data'] as List) ?.map( - (e) => e == null ? null : _GenericListConverter().fromJson(e)) + (e) => e == null ? null : _GenericConverter().fromJson(e)) ?.toList(), total: json['total'] as int); } @@ -116,7 +116,7 @@ Map _$DataArrayEnvelopToJson( 'error': instance.error, 'message': instance.message, 'data': instance.data - ?.map((e) => e == null ? null : _GenericListConverter().toJson(e)) + ?.map((e) => e == null ? null : _GenericConverter().toJson(e)) ?.toList(), 'total': instance.total }; diff --git a/secrets.json.dist b/secrets.json.dist deleted file mode 100644 index 5e97524..0000000 --- a/secrets.json.dist +++ /dev/null @@ -1,4 +0,0 @@ -{ - "clientId": "", - "clientSecret": "" -} \ No newline at end of file