Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
umeng-crash
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
flutter-plugin
umeng-crash
Commits
d700618d
Commit
d700618d
authored
Oct 15, 2021
by
汪林玲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加null-safety,和引入说明
parent
07671352
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
63 additions
and
90 deletions
+63
-90
CHANGELOG.md
CHANGELOG.md
+0
-3
LICENSE
LICENSE
+0
-1
example/pubspec.lock
example/pubspec.lock
+19
-19
lib/umeng_crash.dart
lib/umeng_crash.dart
+24
-24
pubspec.lock
pubspec.lock
+19
-19
pubspec.yaml
pubspec.yaml
+1
-1
test/umeng_crash_test.dart
test/umeng_crash_test.dart
+0
-23
No files found.
CHANGELOG.md
deleted
100644 → 0
View file @
07671352
## 0.0.1
*
TODO: Describe initial release.
LICENSE
deleted
100644 → 0
View file @
07671352
TODO: Add your license here.
example/pubspec.lock
View file @
d700618d
...
@@ -7,49 +7,49 @@ packages:
...
@@ -7,49 +7,49 @@ packages:
name: async
name: async
url: "https://pub.flutter-io.cn"
url: "https://pub.flutter-io.cn"
source: hosted
source: hosted
version: "2.
5.0-nullsafety
.1"
version: "2.
8
.1"
boolean_selector:
boolean_selector:
dependency: transitive
dependency: transitive
description:
description:
name: boolean_selector
name: boolean_selector
url: "https://pub.flutter-io.cn"
url: "https://pub.flutter-io.cn"
source: hosted
source: hosted
version: "2.1.0
-nullsafety.1
"
version: "2.1.0"
characters:
characters:
dependency: transitive
dependency: transitive
description:
description:
name: characters
name: characters
url: "https://pub.flutter-io.cn"
url: "https://pub.flutter-io.cn"
source: hosted
source: hosted
version: "1.1.0
-nullsafety.3
"
version: "1.1.0"
charcode:
charcode:
dependency: transitive
dependency: transitive
description:
description:
name: charcode
name: charcode
url: "https://pub.flutter-io.cn"
url: "https://pub.flutter-io.cn"
source: hosted
source: hosted
version: "1.
2.0-nullsafety
.1"
version: "1.
3
.1"
clock:
clock:
dependency: transitive
dependency: transitive
description:
description:
name: clock
name: clock
url: "https://pub.flutter-io.cn"
url: "https://pub.flutter-io.cn"
source: hosted
source: hosted
version: "1.1.0
-nullsafety.1
"
version: "1.1.0"
collection:
collection:
dependency: transitive
dependency: transitive
description:
description:
name: collection
name: collection
url: "https://pub.flutter-io.cn"
url: "https://pub.flutter-io.cn"
source: hosted
source: hosted
version: "1.15.0
-nullsafety.3
"
version: "1.15.0"
fake_async:
fake_async:
dependency: transitive
dependency: transitive
description:
description:
name: fake_async
name: fake_async
url: "https://pub.flutter-io.cn"
url: "https://pub.flutter-io.cn"
source: hosted
source: hosted
version: "1.2.0
-nullsafety.1
"
version: "1.2.0"
flutter:
flutter:
dependency: "direct main"
dependency: "direct main"
description: flutter
description: flutter
...
@@ -66,21 +66,21 @@ packages:
...
@@ -66,21 +66,21 @@ packages:
name: matcher
name: matcher
url: "https://pub.flutter-io.cn"
url: "https://pub.flutter-io.cn"
source: hosted
source: hosted
version: "0.12.10
-nullsafety.1
"
version: "0.12.10"
meta:
meta:
dependency: transitive
dependency: transitive
description:
description:
name: meta
name: meta
url: "https://pub.flutter-io.cn"
url: "https://pub.flutter-io.cn"
source: hosted
source: hosted
version: "1.
3.0-nullsafety.3
"
version: "1.
7.0
"
path:
path:
dependency: transitive
dependency: transitive
description:
description:
name: path
name: path
url: "https://pub.flutter-io.cn"
url: "https://pub.flutter-io.cn"
source: hosted
source: hosted
version: "1.8.0
-nullsafety.1
"
version: "1.8.0"
sky_engine:
sky_engine:
dependency: transitive
dependency: transitive
description: flutter
description: flutter
...
@@ -92,49 +92,49 @@ packages:
...
@@ -92,49 +92,49 @@ packages:
name: source_span
name: source_span
url: "https://pub.flutter-io.cn"
url: "https://pub.flutter-io.cn"
source: hosted
source: hosted
version: "1.8.
0-nullsafety.2
"
version: "1.8.
1
"
stack_trace:
stack_trace:
dependency: transitive
dependency: transitive
description:
description:
name: stack_trace
name: stack_trace
url: "https://pub.flutter-io.cn"
url: "https://pub.flutter-io.cn"
source: hosted
source: hosted
version: "1.10.0
-nullsafety.1
"
version: "1.10.0"
stream_channel:
stream_channel:
dependency: transitive
dependency: transitive
description:
description:
name: stream_channel
name: stream_channel
url: "https://pub.flutter-io.cn"
url: "https://pub.flutter-io.cn"
source: hosted
source: hosted
version: "2.1.0
-nullsafety.1
"
version: "2.1.0"
string_scanner:
string_scanner:
dependency: transitive
dependency: transitive
description:
description:
name: string_scanner
name: string_scanner
url: "https://pub.flutter-io.cn"
url: "https://pub.flutter-io.cn"
source: hosted
source: hosted
version: "1.1.0
-nullsafety.1
"
version: "1.1.0"
term_glyph:
term_glyph:
dependency: transitive
dependency: transitive
description:
description:
name: term_glyph
name: term_glyph
url: "https://pub.flutter-io.cn"
url: "https://pub.flutter-io.cn"
source: hosted
source: hosted
version: "1.2.0
-nullsafety.1
"
version: "1.2.0"
test_api:
test_api:
dependency: transitive
dependency: transitive
description:
description:
name: test_api
name: test_api
url: "https://pub.flutter-io.cn"
url: "https://pub.flutter-io.cn"
source: hosted
source: hosted
version: "0.
2.19-nullsafety
.2"
version: "0.
4
.2"
typed_data:
typed_data:
dependency: transitive
dependency: transitive
description:
description:
name: typed_data
name: typed_data
url: "https://pub.flutter-io.cn"
url: "https://pub.flutter-io.cn"
source: hosted
source: hosted
version: "1.3.0
-nullsafety.3
"
version: "1.3.0"
umeng_crash:
umeng_crash:
dependency: "direct main"
dependency: "direct main"
description:
description:
...
@@ -148,7 +148,7 @@ packages:
...
@@ -148,7 +148,7 @@ packages:
name: vector_math
name: vector_math
url: "https://pub.flutter-io.cn"
url: "https://pub.flutter-io.cn"
source: hosted
source: hosted
version: "2.1.0
-nullsafety.3
"
version: "2.1.0"
sdks:
sdks:
dart: ">=2.1
0.0-110 <2.11
.0"
dart: ">=2.1
2.0 <3.0
.0"
flutter: ">=1.22.0"
flutter: ">=1.22.0"
lib/umeng_crash.dart
View file @
d700618d
...
@@ -12,11 +12,11 @@ class UmengCrash {
...
@@ -12,11 +12,11 @@ class UmengCrash {
/// [appKey] 友盟控制台的appKey
/// [appKey] 友盟控制台的appKey
/// [channel] 渠道:应用宝、小米应用商店、appstore等
/// [channel] 渠道:应用宝、小米应用商店、appstore等
///
///
static
Future
<
bool
>
preInit
({
static
Future
<
bool
?
>
preInit
({
@
required
String
appKey
,
required
String
appKey
,
@
required
String
channel
,
required
String
channel
,
})
async
{
})
async
{
final
bool
result
=
await
_channel
final
bool
?
result
=
await
_channel
.
invokeMethod
(
'preInit'
,
{
'appKey'
:
appKey
,
'channel'
:
channel
});
.
invokeMethod
(
'preInit'
,
{
'appKey'
:
appKey
,
'channel'
:
channel
});
return
result
;
return
result
;
}
}
...
@@ -28,13 +28,13 @@ class UmengCrash {
...
@@ -28,13 +28,13 @@ class UmengCrash {
/// [deviceType] 设备类型 1、手机 2、android机顶盒等
/// [deviceType] 设备类型 1、手机 2、android机顶盒等
/// [pushSecret] 推送密钥
/// [pushSecret] 推送密钥
///
///
static
Future
<
bool
>
init
({
static
Future
<
bool
?
>
init
({
@
required
String
appKey
,
required
String
appKey
,
@
required
String
channel
,
required
String
channel
,
int
deviceType
=
1
,
int
deviceType
=
1
,
String
pushSecret
,
String
?
pushSecret
,
})
async
{
})
async
{
final
bool
result
=
await
_channel
.
invokeMethod
(
'init'
,
{
final
bool
?
result
=
await
_channel
.
invokeMethod
(
'init'
,
{
'appKey'
:
appKey
,
'appKey'
:
appKey
,
'channel'
:
channel
,
'channel'
:
channel
,
'deviceType'
:
deviceType
,
'deviceType'
:
deviceType
,
...
@@ -49,12 +49,12 @@ class UmengCrash {
...
@@ -49,12 +49,12 @@ class UmengCrash {
/// [subVersion] 发布类型, "release",
/// [subVersion] 发布类型, "release",
/// [buildId] 版本id, "0001"
/// [buildId] 版本id, "0001"
///
///
static
Future
<
bool
>
setAppVersion
({
static
Future
<
bool
?
>
setAppVersion
({
@
required
String
version
,
required
String
version
,
@
required
String
subVersion
,
required
String
subVersion
,
@
required
String
buildId
,
required
String
buildId
,
})
async
{
})
async
{
final
bool
result
=
await
_channel
.
invokeMethod
(
'setAppVersion'
,
{
final
bool
?
result
=
await
_channel
.
invokeMethod
(
'setAppVersion'
,
{
'version'
:
version
,
'version'
:
version
,
'subVersion'
:
subVersion
,
'subVersion'
:
subVersion
,
'buildId'
:
buildId
,
'buildId'
:
buildId
,
...
@@ -67,11 +67,11 @@ class UmengCrash {
...
@@ -67,11 +67,11 @@ class UmengCrash {
/// [e] 异常信息
/// [e] 异常信息
/// [type] 异常类型
/// [type] 异常类型
///
///
static
Future
<
bool
>
generateCustomLog
({
static
Future
<
bool
?
>
generateCustomLog
({
@
required
String
e
,
required
String
e
,
@
required
String
type
,
required
String
type
,
})
async
{
})
async
{
final
bool
result
=
await
_channel
.
invokeMethod
(
'generateCustomLog'
,
{
final
bool
?
result
=
await
_channel
.
invokeMethod
(
'generateCustomLog'
,
{
'e'
:
e
,
'e'
:
e
,
'type'
:
type
,
'type'
:
type
,
});
});
...
@@ -82,21 +82,21 @@ class UmengCrash {
...
@@ -82,21 +82,21 @@ class UmengCrash {
/// 程序退出时,用于保存统计数据的API。
/// 程序退出时,用于保存统计数据的API。
/// 如果开发者调用kill或者exit之类的方法杀死进程,或者双击back键会杀死进程,请务必在此之前调用onKillProcess方法,用来保存统计数据。
/// 如果开发者调用kill或者exit之类的方法杀死进程,或者双击back键会杀死进程,请务必在此之前调用onKillProcess方法,用来保存统计数据。
///
///
static
Future
<
bool
>
onKillProcess
()
async
{
static
Future
<
bool
?
>
onKillProcess
()
async
{
final
bool
result
=
await
_channel
.
invokeMethod
(
'onKillProcess'
);
final
bool
?
result
=
await
_channel
.
invokeMethod
(
'onKillProcess'
);
return
result
;
return
result
;
}
}
///
///
/// 可选
/// 可选
///
///
static
Future
<
String
>
get
getOaid
async
{
static
Future
<
String
?
>
get
getOaid
async
{
final
String
version
=
await
_channel
.
invokeMethod
(
'getOaid'
);
final
String
?
version
=
await
_channel
.
invokeMethod
(
'getOaid'
);
return
version
;
return
version
;
}
}
static
Future
<
String
>
get
platformVersion
async
{
static
Future
<
String
?
>
get
platformVersion
async
{
final
String
version
=
await
_channel
.
invokeMethod
(
'getPlatformVersion'
);
final
String
?
version
=
await
_channel
.
invokeMethod
(
'getPlatformVersion'
);
return
version
;
return
version
;
}
}
}
}
pubspec.lock
View file @
d700618d
...
@@ -7,49 +7,49 @@ packages:
...
@@ -7,49 +7,49 @@ packages:
name: async
name: async
url: "https://pub.flutter-io.cn"
url: "https://pub.flutter-io.cn"
source: hosted
source: hosted
version: "2.
5.0-nullsafety
.1"
version: "2.
8
.1"
boolean_selector:
boolean_selector:
dependency: transitive
dependency: transitive
description:
description:
name: boolean_selector
name: boolean_selector
url: "https://pub.flutter-io.cn"
url: "https://pub.flutter-io.cn"
source: hosted
source: hosted
version: "2.1.0
-nullsafety.1
"
version: "2.1.0"
characters:
characters:
dependency: transitive
dependency: transitive
description:
description:
name: characters
name: characters
url: "https://pub.flutter-io.cn"
url: "https://pub.flutter-io.cn"
source: hosted
source: hosted
version: "1.1.0
-nullsafety.3
"
version: "1.1.0"
charcode:
charcode:
dependency: transitive
dependency: transitive
description:
description:
name: charcode
name: charcode
url: "https://pub.flutter-io.cn"
url: "https://pub.flutter-io.cn"
source: hosted
source: hosted
version: "1.
2.0-nullsafety
.1"
version: "1.
3
.1"
clock:
clock:
dependency: transitive
dependency: transitive
description:
description:
name: clock
name: clock
url: "https://pub.flutter-io.cn"
url: "https://pub.flutter-io.cn"
source: hosted
source: hosted
version: "1.1.0
-nullsafety.1
"
version: "1.1.0"
collection:
collection:
dependency: transitive
dependency: transitive
description:
description:
name: collection
name: collection
url: "https://pub.flutter-io.cn"
url: "https://pub.flutter-io.cn"
source: hosted
source: hosted
version: "1.15.0
-nullsafety.3
"
version: "1.15.0"
fake_async:
fake_async:
dependency: transitive
dependency: transitive
description:
description:
name: fake_async
name: fake_async
url: "https://pub.flutter-io.cn"
url: "https://pub.flutter-io.cn"
source: hosted
source: hosted
version: "1.2.0
-nullsafety.1
"
version: "1.2.0"
flutter:
flutter:
dependency: "direct main"
dependency: "direct main"
description: flutter
description: flutter
...
@@ -66,21 +66,21 @@ packages:
...
@@ -66,21 +66,21 @@ packages:
name: matcher
name: matcher
url: "https://pub.flutter-io.cn"
url: "https://pub.flutter-io.cn"
source: hosted
source: hosted
version: "0.12.10
-nullsafety.1
"
version: "0.12.10"
meta:
meta:
dependency: transitive
dependency: transitive
description:
description:
name: meta
name: meta
url: "https://pub.flutter-io.cn"
url: "https://pub.flutter-io.cn"
source: hosted
source: hosted
version: "1.
3.0-nullsafety.3
"
version: "1.
7.0
"
path:
path:
dependency: transitive
dependency: transitive
description:
description:
name: path
name: path
url: "https://pub.flutter-io.cn"
url: "https://pub.flutter-io.cn"
source: hosted
source: hosted
version: "1.8.0
-nullsafety.1
"
version: "1.8.0"
sky_engine:
sky_engine:
dependency: transitive
dependency: transitive
description: flutter
description: flutter
...
@@ -92,56 +92,56 @@ packages:
...
@@ -92,56 +92,56 @@ packages:
name: source_span
name: source_span
url: "https://pub.flutter-io.cn"
url: "https://pub.flutter-io.cn"
source: hosted
source: hosted
version: "1.8.
0-nullsafety.2
"
version: "1.8.
1
"
stack_trace:
stack_trace:
dependency: transitive
dependency: transitive
description:
description:
name: stack_trace
name: stack_trace
url: "https://pub.flutter-io.cn"
url: "https://pub.flutter-io.cn"
source: hosted
source: hosted
version: "1.10.0
-nullsafety.1
"
version: "1.10.0"
stream_channel:
stream_channel:
dependency: transitive
dependency: transitive
description:
description:
name: stream_channel
name: stream_channel
url: "https://pub.flutter-io.cn"
url: "https://pub.flutter-io.cn"
source: hosted
source: hosted
version: "2.1.0
-nullsafety.1
"
version: "2.1.0"
string_scanner:
string_scanner:
dependency: transitive
dependency: transitive
description:
description:
name: string_scanner
name: string_scanner
url: "https://pub.flutter-io.cn"
url: "https://pub.flutter-io.cn"
source: hosted
source: hosted
version: "1.1.0
-nullsafety.1
"
version: "1.1.0"
term_glyph:
term_glyph:
dependency: transitive
dependency: transitive
description:
description:
name: term_glyph
name: term_glyph
url: "https://pub.flutter-io.cn"
url: "https://pub.flutter-io.cn"
source: hosted
source: hosted
version: "1.2.0
-nullsafety.1
"
version: "1.2.0"
test_api:
test_api:
dependency: transitive
dependency: transitive
description:
description:
name: test_api
name: test_api
url: "https://pub.flutter-io.cn"
url: "https://pub.flutter-io.cn"
source: hosted
source: hosted
version: "0.
2.19-nullsafety
.2"
version: "0.
4
.2"
typed_data:
typed_data:
dependency: transitive
dependency: transitive
description:
description:
name: typed_data
name: typed_data
url: "https://pub.flutter-io.cn"
url: "https://pub.flutter-io.cn"
source: hosted
source: hosted
version: "1.3.0
-nullsafety.3
"
version: "1.3.0"
vector_math:
vector_math:
dependency: transitive
dependency: transitive
description:
description:
name: vector_math
name: vector_math
url: "https://pub.flutter-io.cn"
url: "https://pub.flutter-io.cn"
source: hosted
source: hosted
version: "2.1.0
-nullsafety.3
"
version: "2.1.0"
sdks:
sdks:
dart: ">=2.1
0.0-110 <2.11
.0"
dart: ">=2.1
2.0 <3.0
.0"
flutter: ">=1.22.0"
flutter: ">=1.22.0"
pubspec.yaml
View file @
d700618d
...
@@ -4,7 +4,7 @@ version: 2.0.1
...
@@ -4,7 +4,7 @@ version: 2.0.1
homepage
:
A new Flutter umeng.
homepage
:
A new Flutter umeng.
environment
:
environment
:
sdk
:
"
>=2.8.0
<3.0.0"
sdk
:
'
>=2.12.0
<3.0.0'
flutter
:
"
>=1.22.0"
flutter
:
"
>=1.22.0"
dependencies
:
dependencies
:
...
...
test/umeng_crash_test.dart
deleted
100644 → 0
View file @
07671352
import
'package:flutter/services.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
import
'package:umeng_crash/umeng_crash.dart'
;
void
main
(
)
{
const
MethodChannel
channel
=
MethodChannel
(
'umeng_crash'
);
TestWidgetsFlutterBinding
.
ensureInitialized
();
setUp
(()
{
channel
.
setMockMethodCallHandler
((
MethodCall
methodCall
)
async
{
return
'42'
;
});
});
tearDown
(()
{
channel
.
setMockMethodCallHandler
(
null
);
});
test
(
'getPlatformVersion'
,
()
async
{
expect
(
await
UmengCrash
.
platformVersion
,
'42'
);
});
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment