-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[双端一致性] Android端setup与push的参数形式与iOS对齐
- Loading branch information
1 parent
d2d1fdc
commit 4767623
Showing
7 changed files
with
105 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 2 additions & 4 deletions
6
android/src/main/java/com/idlefish/flutterboost/FlutterBoostDelegate.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
package com.idlefish.flutterboost; | ||
|
||
import java.util.Map; | ||
|
||
public interface FlutterBoostDelegate { | ||
void pushNativeRoute(String pageName, Map<String, Object> arguments,int requestCode); | ||
void pushFlutterRoute(String pageName, String uniqueId, Map<String, Object> arguments); | ||
void pushNativeRoute(FlutterBoostRouteOptions options); | ||
void pushFlutterRoute(FlutterBoostRouteOptions options); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
android/src/main/java/com/idlefish/flutterboost/FlutterBoostRouteOptions.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
package com.idlefish.flutterboost; | ||
|
||
import java.util.Map; | ||
|
||
public class FlutterBoostRouteOptions { | ||
private final String pageName; | ||
private final Map<String, Object> arguments; | ||
private final int requestCode; | ||
private final String uniqueId; | ||
|
||
private FlutterBoostRouteOptions(FlutterBoostRouteOptions.Builder builder) { | ||
this.pageName = builder.pageName; | ||
this.arguments = builder.arguments; | ||
this.requestCode = builder.requestCode; | ||
this.uniqueId = builder.uniqueId; | ||
} | ||
|
||
public String pageName() { | ||
return pageName; | ||
} | ||
|
||
public Map<String, Object> arguments() { | ||
return arguments; | ||
} | ||
|
||
public int requestCode() { | ||
return requestCode; | ||
} | ||
|
||
public String uniqueId() { | ||
return uniqueId; | ||
} | ||
|
||
public static class Builder { | ||
private String pageName; | ||
private Map<String, Object> arguments; | ||
private int requestCode; | ||
private String uniqueId; | ||
|
||
public Builder() { | ||
} | ||
|
||
public FlutterBoostRouteOptions.Builder pageName(String pageName) { | ||
this.pageName = pageName; | ||
return this; | ||
} | ||
|
||
public FlutterBoostRouteOptions.Builder arguments(Map<String, Object> arguments) { | ||
this.arguments = arguments; | ||
return this; | ||
} | ||
|
||
public FlutterBoostRouteOptions.Builder requestCode(int requestCode) { | ||
this.requestCode = requestCode; | ||
return this; | ||
} | ||
|
||
public FlutterBoostRouteOptions.Builder uniqueId(String uniqueId) { | ||
this.uniqueId = uniqueId; | ||
return this; | ||
} | ||
|
||
public FlutterBoostRouteOptions build() { | ||
return new FlutterBoostRouteOptions(this); | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters