杏聆荟Flutter客户端 JSON-RPC Client库
guanxinyi 2a45e13b8d 1、rpc更新 | 4 months ago | |
---|---|---|
.vs | 9 months ago | |
.vscode | 9 months ago | |
lib | 4 months ago | |
test | 3 years ago | |
.gitignore | 3 years ago | |
.metadata | 3 years ago | |
CHANGELOG.md | 3 years ago | |
LICENSE | 3 years ago | |
README.md | 3 years ago | |
pubspec.yaml | 9 months ago |
A JSON-RPC client package project for Flyinsono application.
// Create a proxy instance
final rpc = JsonRpcProxy();
// Fetch a api
try {
final String result = await rpc.config.getConfigAsync("service", "section", "settingNode", "defaultValue");
print(result);
} on JsonRpcException catch (e) {
print("Fetch fail. code: ${e.code}, msg: ${e.message}");
} catch (e) {
logger.e("Fetch error.", e);
}