Commit 217701d6 authored by 李增强's avatar 李增强

移除空安全问号

parent cf0c76b3
...@@ -18,10 +18,10 @@ class Bugly { ...@@ -18,10 +18,10 @@ class Bugly {
/// @param appId appId /// @param appId appId
/// @param isDebug 是否打开debug开关 /// @param isDebug 是否打开debug开关
static Future<void> initAndroidCrashReport({ static Future<void> initAndroidCrashReport({
String? appId, String appId,
bool? isDebug, bool isDebug,
}) async { }) async {
Map<String, Object?> map = { Map<String, Object> map = {
"appId": appId, "appId": appId,
"isDebug": isDebug, "isDebug": isDebug,
}; };
...@@ -31,10 +31,10 @@ class Bugly { ...@@ -31,10 +31,10 @@ class Bugly {
/// 自定义上报域名. /// 自定义上报域名.
/// @param url 自定义域名 /// @param url 自定义域名
static Future<void> setAndroidServerUrl({ static Future<void> setAndroidServerUrl({
String? url, String url,
}) async { }) async {
if (Platform.isAndroid) { if (Platform.isAndroid) {
Map<String, Object?> map = { Map<String, Object> map = {
"url": url, "url": url,
}; };
_channel.invokeMethod("setServerUrl", map); _channel.invokeMethod("setServerUrl", map);
...@@ -44,10 +44,10 @@ class Bugly { ...@@ -44,10 +44,10 @@ class Bugly {
/// 设置App渠道. /// 设置App渠道.
/// @param appChannel App渠道 /// @param appChannel App渠道
static Future<void> setAndroidAppChannel({ static Future<void> setAndroidAppChannel({
String? appChannel, String appChannel,
}) async { }) async {
if (Platform.isAndroid) { if (Platform.isAndroid) {
Map<String, Object?> map = { Map<String, Object> map = {
"appChannel": appChannel, "appChannel": appChannel,
}; };
_channel.invokeMethod("setAppChannel", map); _channel.invokeMethod("setAppChannel", map);
...@@ -57,10 +57,10 @@ class Bugly { ...@@ -57,10 +57,10 @@ class Bugly {
/// 设置App包名 /// 设置App包名
/// @param appPackage App包名 /// @param appPackage App包名
static Future<void> setAndroidAppPackage({ static Future<void> setAndroidAppPackage({
String? appPackage, String appPackage,
}) async { }) async {
if (Platform.isAndroid) { if (Platform.isAndroid) {
Map<String, Object?> map = { Map<String, Object> map = {
"appPackage": appPackage, "appPackage": appPackage,
}; };
_channel.invokeMethod("setAppPackage", map); _channel.invokeMethod("setAppPackage", map);
...@@ -70,10 +70,10 @@ class Bugly { ...@@ -70,10 +70,10 @@ class Bugly {
/// 设置App 设备 id /// 设置App 设备 id
/// @param appPackage App包名 /// @param appPackage App包名
static Future<void> setAndroidDeviceId({ static Future<void> setAndroidDeviceId({
String? deviceId, String deviceId,
}) async { }) async {
if (Platform.isAndroid) { if (Platform.isAndroid) {
Map<String, Object?> map = { Map<String, Object> map = {
"deviceId": deviceId, "deviceId": deviceId,
}; };
_channel.invokeMethod("setDeviceId", map); _channel.invokeMethod("setDeviceId", map);
...@@ -83,11 +83,11 @@ class Bugly { ...@@ -83,11 +83,11 @@ class Bugly {
/// 初始化接口. /// 初始化接口.
/// @param appId appId /// @param appId appId
static Future<void> initIosCrashReport({ static Future<void> initIosCrashReport({
String? appId, String appId,
bool? debugMode, bool debugMode,
String? serverUrl, String serverUrl,
}) async { }) async {
Map<String, Object?> map = { Map<String, Object> map = {
"appId": appId, "appId": appId,
"debugMode": debugMode, "debugMode": debugMode,
"serverUrl": serverUrl "serverUrl": serverUrl
...@@ -101,12 +101,12 @@ class Bugly { ...@@ -101,12 +101,12 @@ class Bugly {
/// @param stackTrace 出错堆栈 /// @param stackTrace 出错堆栈
/// @param extraInfo 额外信息 /// @param extraInfo 额外信息
static Future<void> postException({ static Future<void> postException({
String? type, String type,
String? error, String error,
String? stackTrace, String stackTrace,
Map<String, String>? extraInfo, Map<String, String> extraInfo,
}) async { }) async {
Map<String, Object?> map = { Map<String, Object> map = {
"type": type, "type": type,
"error": error, "error": error,
"stackTrace": stackTrace, "stackTrace": stackTrace,
...@@ -118,9 +118,9 @@ class Bugly { ...@@ -118,9 +118,9 @@ class Bugly {
/// 设置App版本 /// 设置App版本
/// @param appVersion App版本 /// @param appVersion App版本
static Future<void> setAppVersion({ static Future<void> setAppVersion({
String? appVersion, String appVersion,
}) async { }) async {
Map<String, Object?> map = { Map<String, Object> map = {
"appVersion": appVersion, "appVersion": appVersion,
}; };
_channel.invokeMethod("setAppVersion", map); _channel.invokeMethod("setAppVersion", map);
...@@ -129,9 +129,9 @@ class Bugly { ...@@ -129,9 +129,9 @@ class Bugly {
/// 设置用户场景 ,可以在初始化前执行. /// 设置用户场景 ,可以在初始化前执行.
/// @param userSceneTag 唯一标识一种场景,必须大于0 /// @param userSceneTag 唯一标识一种场景,必须大于0
static Future<void> setUserSceneTag({ static Future<void> setUserSceneTag({
int? userSceneTag, int userSceneTag,
}) async { }) async {
Map<String, Object?> map = { Map<String, Object> map = {
"userSceneTag": userSceneTag, "userSceneTag": userSceneTag,
}; };
_channel.invokeMethod("setUserSceneTag", map); _channel.invokeMethod("setUserSceneTag", map);
...@@ -140,9 +140,9 @@ class Bugly { ...@@ -140,9 +140,9 @@ class Bugly {
/// 设置用户id /// 设置用户id
/// @param userSceneTag 唯一标识一种场景,必须大于0 /// @param userSceneTag 唯一标识一种场景,必须大于0
static Future<void> setUserId({ static Future<void> setUserId({
String? userId, String userId,
}) async { }) async {
Map<String, Object?> map = { Map<String, Object> map = {
"userId": userId, "userId": userId,
}; };
_channel.invokeMethod("setUserId", map); _channel.invokeMethod("setUserId", map);
...@@ -152,10 +152,10 @@ class Bugly { ...@@ -152,10 +152,10 @@ class Bugly {
/// @param userKey 用户数据key /// @param userKey 用户数据key
/// @param userValue 用户数据value /// @param userValue 用户数据value
static Future<void> putUserData({ static Future<void> putUserData({
String? userKey, String userKey,
String? userValue, String userValue,
}) async { }) async {
Map<String, Object?> map = { Map<String, Object> map = {
"userKey": userKey, "userKey": userKey,
"userValue": userValue, "userValue": userValue,
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment