Skip to content

Instantly share code, notes, and snippets.

@masterwok
Last active December 15, 2021 05:08
Show Gist options
  • Save masterwok/393d4c51bc2770cefae6cc5bedfc4047 to your computer and use it in GitHub Desktop.
Save masterwok/393d4c51bc2770cefae6cc5bedfc4047 to your computer and use it in GitHub Desktop.
import 'package:json_annotation/json_annotation.dart';
part 'proxy_config.g.dart';
@JsonSerializable()
class ProxyConfig {
final bool isEnabled;
final String host;
final int port;
ProxyConfig(this.isEnabled, this.host, this.port);
factory ProxyConfig.fromJson(Map<String, dynamic> json) => _$ProxyConfigFromJson(json);
Map<String, dynamic> toJson() => _$ProxyConfigToJson(this);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment