Created
September 29, 2020 20:48
-
-
Save kirshiyin89/11fb4b8e4ff9d5d63e59e47a0e34fcd7 to your computer and use it in GitHub Desktop.
the config data for etcd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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