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

移除空安全问号

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