Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
flutter_push
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
顾海波
2025-02-19 14:04:02 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
9820c6d4048744e4de2fb2ee49e1d6ca52d0aa38
9820c6d4
1 parent
6d96c41e
【修复】推送点击跳转
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
8 deletions
android/src/main/kotlin/com/ewin/flutter_push/FlutterPushPlugin.kt
lib/flutter_push.dart
lib/flutter_push_method_channel.dart
lib/flutter_push_platform_interface.dart
android/src/main/kotlin/com/ewin/flutter_push/FlutterPushPlugin.kt
View file @
9820c6d
...
...
@@ -25,7 +25,7 @@ import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import android.provider.Settings;
import android.util.Log
/** FlutterPushPlugin */
...
...
@@ -50,6 +50,10 @@ class FlutterPushPlugin: FlutterPlugin, MethodCallHandler {
}
override fun onMethodCall(call: MethodCall, result: Result) {
Log.d("onMethodCall", "${call.method}")
if (call.method == "getPlatformVersion") {
result.success("Android ${android.os.Build.VERSION.RELEASE}")
} else if (call.method == "init") {
...
...
lib/flutter_push.dart
View file @
9820c6d
...
...
@@ -8,7 +8,7 @@ class FlutterPush {
return
FlutterPushPlatform
.
instance
.
getPlatformVersion
();
}
Future
<
void
>
init
({
Future
<
bool
>
init
({
String
?
defaultPlatform
,
String
?
appId
,
String
?
appKey
,
...
...
lib/flutter_push_method_channel.dart
View file @
9820c6d
...
...
@@ -21,7 +21,7 @@ class MethodChannelFlutterPush extends FlutterPushPlatform {
/// 初始化,如果没有appId或appKey,请登录小米开发者中心申请
/// [appId] 应用appId
/// [appKey] 应用appKey
Future
<
void
>
init
({
Future
<
bool
>
init
({
String
?
defaultPlatform
,
String
?
appId
,
String
?
appKey
,
...
...
@@ -59,7 +59,7 @@ class MethodChannelFlutterPush extends FlutterPushPlatform {
}
/// 获取客户端的 RegId
Future
<
String
?
>
msgReceive
()
async
{
Future
<
bool
>
msgReceive
()
async
{
return
await
methodChannel
.
invokeMethod
(
'msgReceive'
);
}
}
...
...
lib/flutter_push_platform_interface.dart
View file @
9820c6d
...
...
@@ -28,12 +28,10 @@ abstract class FlutterPushPlatform extends PlatformInterface {
throw
UnimplementedError
(
'platformVersion() has not been implemented.'
);
}
/// 初始化,如果没有appId或appKey,请登录小米开发者中心申请
/// [appId] 应用appId
/// [appKey] 应用appKey
Future
<
void
>
init
({
Future
<
bool
>
init
({
String
?
defaultPlatform
,
String
?
appId
,
String
?
appKey
,
...
...
@@ -65,7 +63,7 @@ abstract class FlutterPushPlatform extends PlatformInterface {
}
/// 获取客户端的 RegId
Future
<
String
?
>
msgReceive
()
async
{
Future
<
bool
>
msgReceive
()
async
{
throw
UnimplementedError
(
'msgReceive() has not been implemented.'
);
}
}
...
...
Please
register
or
login
to post a comment