Skip to content

Instantly share code, notes, and snippets.

@kirshiyin89
Created September 29, 2020 20:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kirshiyin89/11fb4b8e4ff9d5d63e59e47a0e34fcd7 to your computer and use it in GitHub Desktop.
Save kirshiyin89/11fb4b8e4ff9d5d63e59e47a0e34fcd7 to your computer and use it in GitHub Desktop.
the config data for etcd
import 'dart:convert';
class ConfigData {
ConfigData({this.prefix, this.name, this.value});
String prefix;
String name;
String value;
factory ConfigData.fromJson(
String _prefix,
Map<String, dynamic> json,
) {
var key = utf8.decode(base64.decode(json['key']));
return ConfigData(
name: key,
value: utf8.decode(base64.decode(json['value'])),
prefix: _prefix);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment