change ffi flutter_config to flutter_option

Signed-off-by: dignow <linlong1265@gmail.com>
This commit is contained in:
dignow
2023-08-10 22:27:35 +08:00
parent 7921be45f5
commit 7f6b18fc9c
10 changed files with 42 additions and 42 deletions

View File

@@ -168,14 +168,14 @@ pub fn set_local_option(key: String, value: String) {
#[cfg(any(target_os = "android", target_os = "ios", feature = "flutter"))]
#[inline]
pub fn get_local_flutter_config(key: String) -> String {
LocalConfig::get_flutter_config(&key)
pub fn get_local_flutter_option(key: String) -> String {
LocalConfig::get_flutter_option(&key)
}
#[cfg(any(target_os = "android", target_os = "ios", feature = "flutter"))]
#[inline]
pub fn set_local_flutter_config(key: String, value: String) {
LocalConfig::set_flutter_config(key, value);
pub fn set_local_flutter_option(key: String, value: String) {
LocalConfig::set_flutter_option(key, value);
}
#[cfg(feature = "flutter")]
@@ -210,14 +210,14 @@ pub fn get_peer_option(id: String, name: String) -> String {
#[inline]
#[cfg(feature = "flutter")]
pub fn get_peer_flutter_config(id: String, name: String) -> String {
pub fn get_peer_flutter_option(id: String, name: String) -> String {
let c = PeerConfig::load(&id);
c.ui_flutter.get(&name).unwrap_or(&"".to_owned()).to_owned()
}
#[inline]
#[cfg(feature = "flutter")]
pub fn set_peer_flutter_config(id: String, name: String, value: String) {
pub fn set_peer_flutter_option(id: String, name: String, value: String) {
let mut c = PeerConfig::load(&id);
if value.is_empty() {
c.ui_flutter.remove(&name);