server.g.dart 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. // GENERATED CODE - DO NOT MODIFY BY HAND
  2. part of 'server.dart';
  3. // **************************************************************************
  4. // JsonSerializableGenerator
  5. // **************************************************************************
  6. TrojanServer _$TrojanServerFromJson(Map<String, dynamic> json) => TrojanServer(
  7. protocol: json['protocol'] as String,
  8. address: json['address'] as String,
  9. port: json['port'] as int,
  10. remark: json['remark'] as String,
  11. password: json['password'] as String,
  12. serverName: json['serverName'] as String?,
  13. fingerPrint: json['fingerPrint'] as String?,
  14. allowInsecure: json['allowInsecure'] as bool,
  15. )
  16. ..uplink = json['uplink'] as int?
  17. ..downlink = json['downlink'] as int?;
  18. Map<String, dynamic> _$TrojanServerToJson(TrojanServer instance) {
  19. final val = <String, dynamic>{
  20. 'protocol': instance.protocol,
  21. 'address': instance.address,
  22. 'port': instance.port,
  23. 'remark': instance.remark,
  24. };
  25. void writeNotNull(String key, dynamic value) {
  26. if (value != null) {
  27. val[key] = value;
  28. }
  29. }
  30. writeNotNull('uplink', instance.uplink);
  31. writeNotNull('downlink', instance.downlink);
  32. val['password'] = instance.password;
  33. writeNotNull('serverName', instance.serverName);
  34. writeNotNull('fingerPrint', instance.fingerPrint);
  35. val['allowInsecure'] = instance.allowInsecure;
  36. return val;
  37. }