mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-18 22:33:42 +00:00
feat: new ui (#1455)
This commit is contained in:
742 files changed
+59951
-5934
No files matched your search
@@ -10,9 +10,7 @@ class LibgopeedChannel implements LibgopeedInterface {
|
||||
|
||||
@override
|
||||
Future<int> start(StartConfig cfg) async {
|
||||
final port = await _channel.invokeMethod('start', {
|
||||
'cfg': jsonEncode(cfg),
|
||||
});
|
||||
final port = await _channel.invokeMethod('start', {'cfg': jsonEncode(cfg)});
|
||||
return port as int;
|
||||
}
|
||||
|
||||
|
||||
@@ -10,8 +10,7 @@ class WebViewRpcConfig {
|
||||
|
||||
WebViewRpcConfig();
|
||||
|
||||
factory WebViewRpcConfig.fromJson(Map<String, dynamic> json) =>
|
||||
_$WebViewRpcConfigFromJson(json);
|
||||
factory WebViewRpcConfig.fromJson(Map<String, dynamic> json) => _$WebViewRpcConfigFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$WebViewRpcConfigToJson(this);
|
||||
}
|
||||
@@ -28,8 +27,7 @@ class StartConfig {
|
||||
|
||||
StartConfig();
|
||||
|
||||
factory StartConfig.fromJson(Map<String, dynamic> json) =>
|
||||
_$StartConfigFromJson(json);
|
||||
factory StartConfig.fromJson(Map<String, dynamic> json) => _$StartConfigFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$StartConfigToJson(this);
|
||||
}
|
||||
@@ -16,7 +16,7 @@ Map<String, dynamic> _$WebViewRpcConfigToJson(WebViewRpcConfig instance) =>
|
||||
<String, dynamic>{
|
||||
'network': instance.network,
|
||||
'address': instance.address,
|
||||
'token': instance.token,
|
||||
'token': ?instance.token,
|
||||
};
|
||||
|
||||
StartConfig _$StartConfigFromJson(Map<String, dynamic> json) => StartConfig()
|
||||
@@ -29,7 +29,8 @@ StartConfig _$StartConfigFromJson(Map<String, dynamic> json) => StartConfig()
|
||||
..webViewRpcConfig = json['webViewRpcConfig'] == null
|
||||
? null
|
||||
: WebViewRpcConfig.fromJson(
|
||||
json['webViewRpcConfig'] as Map<String, dynamic>);
|
||||
json['webViewRpcConfig'] as Map<String, dynamic>,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$StartConfigToJson(StartConfig instance) =>
|
||||
<String, dynamic>{
|
||||
@@ -39,5 +40,5 @@ Map<String, dynamic> _$StartConfigToJson(StartConfig instance) =>
|
||||
'storageDir': instance.storageDir,
|
||||
'refreshInterval': instance.refreshInterval,
|
||||
'apiToken': instance.apiToken,
|
||||
'webViewRpcConfig': instance.webViewRpcConfig,
|
||||
'webViewRpcConfig': ?instance.webViewRpcConfig,
|
||||
};
|
||||
Reference in new issue
Block a user