mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 23:34:24 +01:00
opt.: use json_serializable
This commit is contained in:
@@ -42,3 +42,19 @@ class PrivateKeyInfoAdapter extends TypeAdapter<PrivateKeyInfo> {
|
||||
runtimeType == other.runtimeType &&
|
||||
typeId == other.typeId;
|
||||
}
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
PrivateKeyInfo _$PrivateKeyInfoFromJson(Map<String, dynamic> json) =>
|
||||
PrivateKeyInfo(
|
||||
id: json['id'] as String,
|
||||
key: json['private_key'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$PrivateKeyInfoToJson(PrivateKeyInfo instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'private_key': instance.key,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user