|
@@ -9,6 +9,7 @@ import 'package:keyboard/module/store/store_page.dart';
|
|
|
import 'package:keyboard/utils/default_keyboard_helper.dart';
|
|
import 'package:keyboard/utils/default_keyboard_helper.dart';
|
|
|
|
|
|
|
|
import '../module/intimacy_scale/intimacy_scale_page.dart';
|
|
import '../module/intimacy_scale/intimacy_scale_page.dart';
|
|
|
|
|
+import '../widget/platform_util.dart';
|
|
|
|
|
|
|
|
class MethodChanelIOSUtil {
|
|
class MethodChanelIOSUtil {
|
|
|
static final MethodChanelIOSUtil _instance = MethodChanelIOSUtil._internal();
|
|
static final MethodChanelIOSUtil _instance = MethodChanelIOSUtil._internal();
|
|
@@ -53,7 +54,7 @@ class MethodChanelIOSUtil {
|
|
|
// 保存token到ios端
|
|
// 保存token到ios端
|
|
|
static Future<void> saveAuthToken(String token) async {
|
|
static Future<void> saveAuthToken(String token) async {
|
|
|
// 通知iOS键盘扩展
|
|
// 通知iOS键盘扩展
|
|
|
- if (Platform.isIOS) {
|
|
|
|
|
|
|
+ if (PlatformUtil.isIOS) {
|
|
|
_channel.invokeMethod('saveAuthToken', {'token': token});
|
|
_channel.invokeMethod('saveAuthToken', {'token': token});
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -61,7 +62,7 @@ class MethodChanelIOSUtil {
|
|
|
// 保存idfv到ios端
|
|
// 保存idfv到ios端
|
|
|
static Future<void> saveIDFV(String? idfv) async {
|
|
static Future<void> saveIDFV(String? idfv) async {
|
|
|
// 通知iOS键盘扩展
|
|
// 通知iOS键盘扩展
|
|
|
- if (Platform.isIOS) {
|
|
|
|
|
|
|
+ if (PlatformUtil.isIOS) {
|
|
|
_channel.invokeMethod('saveIDFV', {'idfv': idfv});
|
|
_channel.invokeMethod('saveIDFV', {'idfv': idfv});
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -69,7 +70,7 @@ class MethodChanelIOSUtil {
|
|
|
// 保存idfa到ios端
|
|
// 保存idfa到ios端
|
|
|
static Future<void> saveIDFA(String? idfa) async {
|
|
static Future<void> saveIDFA(String? idfa) async {
|
|
|
// 通知iOS键盘扩展
|
|
// 通知iOS键盘扩展
|
|
|
- if (Platform.isIOS) {
|
|
|
|
|
|
|
+ if (PlatformUtil.isIOS) {
|
|
|
_channel.invokeMethod('saveIDFA', {'idfa': idfa});
|
|
_channel.invokeMethod('saveIDFA', {'idfa': idfa});
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -77,7 +78,7 @@ class MethodChanelIOSUtil {
|
|
|
// 保存token到ios端
|
|
// 保存token到ios端
|
|
|
static Future<void> clearAuthToken() async {
|
|
static Future<void> clearAuthToken() async {
|
|
|
// 通知iOS键盘扩展
|
|
// 通知iOS键盘扩展
|
|
|
- if (Platform.isIOS) {
|
|
|
|
|
|
|
+ if (PlatformUtil.isIOS) {
|
|
|
_channel.invokeMethod('clearAuthToken');
|
|
_channel.invokeMethod('clearAuthToken');
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -108,7 +109,7 @@ class MethodChanelIOSUtil {
|
|
|
|
|
|
|
|
static Future<void> openKeyboardGuide() async {
|
|
static Future<void> openKeyboardGuide() async {
|
|
|
// 通知iOS键盘扩展
|
|
// 通知iOS键盘扩展
|
|
|
- if (Platform.isIOS) {
|
|
|
|
|
|
|
+ if (PlatformUtil.isIOS) {
|
|
|
_channel.invokeMethod('openKeyboardGuide');
|
|
_channel.invokeMethod('openKeyboardGuide');
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|