Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
flutter_boost_1.22.4
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_boost_1.22.4
Commits
7d66d8cd
Commit
7d66d8cd
authored
Oct 16, 2019
by
yangwu.jia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Page name update
parent
e26225b4
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
18 deletions
+17
-18
android/src/main/java/com/idlefish/flutterboost/containers/NewBoostFlutterActivity.java
...fish/flutterboost/containers/NewBoostFlutterActivity.java
+0
-1
example/android/app/src/main/java/com/taobao/idlefish/flutterboostexample/PageRouter.java
...a/com/taobao/idlefish/flutterboostexample/PageRouter.java
+5
-5
example/lib/main.dart
example/lib/main.dart
+4
-4
example/lib/simple_page_widgets.dart
example/lib/simple_page_widgets.dart
+8
-8
No files found.
android/src/main/java/com/idlefish/flutterboost/containers/NewBoostFlutterActivity.java
View file @
7d66d8cd
...
@@ -277,7 +277,6 @@ public class NewBoostFlutterActivity extends Activity
...
@@ -277,7 +277,6 @@ public class NewBoostFlutterActivity extends Activity
protected
void
onStop
()
{
protected
void
onStop
()
{
super
.
onStop
();
super
.
onStop
();
delegate
.
onStop
();
delegate
.
onStop
();
// lifecycle.handleLifecycleEvent(Lifecycle.Event.ON_STOP);
}
}
@Override
@Override
...
...
example/android/app/src/main/java/com/taobao/idlefish/flutterboostexample/PageRouter.java
View file @
7d66d8cd
...
@@ -12,14 +12,14 @@ import java.util.Map;
...
@@ -12,14 +12,14 @@ import java.util.Map;
public
class
PageRouter
{
public
class
PageRouter
{
public
final
static
Map
<
String
,
String
>
pageName
=
new
HashMap
<
String
,
String
>()
{{
public
final
static
Map
<
String
,
String
>
pageName
=
new
HashMap
<
String
,
String
>()
{{
put
(
"sample://f
lutterPage1"
,
"flutterPage1
"
);
put
(
"sample://f
irst"
,
"first
"
);
put
(
"sample://
flutterPage2"
,
"flutterPage2
"
);
put
(
"sample://
second"
,
"second
"
);
put
(
"sample://
flutterPage3"
,
"flutterPage3
"
);
put
(
"sample://
tab"
,
"tab
"
);
put
(
"sample://flutter
Main"
,
"flutterMain
"
);
put
(
"sample://flutter
Page"
,
"flutterPage
"
);
}};
}};
public
static
final
String
NATIVE_PAGE_URL
=
"sample://nativePage"
;
public
static
final
String
NATIVE_PAGE_URL
=
"sample://nativePage"
;
public
static
final
String
FLUTTER_PAGE_URL
=
"sample://flutter
Main
"
;
public
static
final
String
FLUTTER_PAGE_URL
=
"sample://flutter
Page
"
;
public
static
final
String
FLUTTER_FRAGMENT_PAGE_URL
=
"sample://flutterFragmentPage"
;
public
static
final
String
FLUTTER_FRAGMENT_PAGE_URL
=
"sample://flutterFragmentPage"
;
public
static
boolean
openPageByUrl
(
Context
context
,
String
url
,
Map
params
)
{
public
static
boolean
openPageByUrl
(
Context
context
,
String
url
,
Map
params
)
{
...
...
example/lib/main.dart
View file @
7d66d8cd
...
@@ -17,12 +17,12 @@ class _MyAppState extends State<MyApp> {
...
@@ -17,12 +17,12 @@ class _MyAppState extends State<MyApp> {
super
.
initState
();
super
.
initState
();
FlutterBoost
.
singleton
.
registerPageBuilders
({
FlutterBoost
.
singleton
.
registerPageBuilders
({
'f
lutterPage1
'
:
(
pageName
,
params
,
_
)
=>
FirstRouteWidget
(),
'f
irst
'
:
(
pageName
,
params
,
_
)
=>
FirstRouteWidget
(),
'
flutterPage2
'
:
(
pageName
,
params
,
_
)
=>
SecondRouteWidget
(),
'
second
'
:
(
pageName
,
params
,
_
)
=>
SecondRouteWidget
(),
'
flutterPage3
'
:
(
pageName
,
params
,
_
)
=>
TabRouteWidget
(),
'
tab
'
:
(
pageName
,
params
,
_
)
=>
TabRouteWidget
(),
'flutterFragment'
:
(
pageName
,
params
,
_
)
=>
FragmentRouteWidget
(
params
),
'flutterFragment'
:
(
pageName
,
params
,
_
)
=>
FragmentRouteWidget
(
params
),
///可以在native层通过 getContainerParams 来传递参数
///可以在native层通过 getContainerParams 来传递参数
'flutter
Main
'
:
(
pageName
,
params
,
_
)
{
'flutter
Page
'
:
(
pageName
,
params
,
_
)
{
print
(
"flutterPage params:
$params
"
);
print
(
"flutterPage params:
$params
"
);
return
FlutterRouteWidget
(
params:
params
);
return
FlutterRouteWidget
(
params:
params
);
...
...
example/lib/simple_page_widgets.dart
View file @
7d66d8cd
...
@@ -14,7 +14,7 @@ class FirstRouteWidget extends StatelessWidget {
...
@@ -14,7 +14,7 @@ class FirstRouteWidget extends StatelessWidget {
child:
Text
(
'Open second route'
),
child:
Text
(
'Open second route'
),
onPressed:
()
{
onPressed:
()
{
print
(
"open second page!"
);
print
(
"open second page!"
);
FlutterBoost
.
singleton
.
open
(
"sample://
flutterPage2
"
).
then
((
Map
value
)
{
FlutterBoost
.
singleton
.
open
(
"sample://
second
"
).
then
((
Map
value
)
{
print
(
print
(
"call me when page is finished. did recieve second route result
$value
"
);
"call me when page is finished. did recieve second route result
$value
"
);
});
});
...
@@ -59,7 +59,7 @@ class TabRouteWidget extends StatelessWidget {
...
@@ -59,7 +59,7 @@ class TabRouteWidget extends StatelessWidget {
body:
Center
(
body:
Center
(
child:
RaisedButton
(
child:
RaisedButton
(
onPressed:
()
{
onPressed:
()
{
FlutterBoost
.
singleton
.
open
(
"sample://
flutterPage2
"
);
FlutterBoost
.
singleton
.
open
(
"sample://
second
"
);
},
},
child:
Text
(
'Open second route'
),
child:
Text
(
'Open second route'
),
),
),
...
@@ -140,14 +140,14 @@ class _FlutterRouteWidgetState extends State<FlutterRouteWidget> {
...
@@ -140,14 +140,14 @@ class _FlutterRouteWidgetState extends State<FlutterRouteWidget> {
margin:
const
EdgeInsets
.
all
(
8.0
),
margin:
const
EdgeInsets
.
all
(
8.0
),
color:
Colors
.
yellow
,
color:
Colors
.
yellow
,
child:
Text
(
child:
Text
(
'open f
lutterPage1
'
,
'open f
irst
'
,
style:
TextStyle
(
fontSize:
22.0
,
color:
Colors
.
black
),
style:
TextStyle
(
fontSize:
22.0
,
color:
Colors
.
black
),
)),
)),
///后面的参数会在native的IPlatform.startActivity方法回调中拼接到url的query部分。
///后面的参数会在native的IPlatform.startActivity方法回调中拼接到url的query部分。
///例如:sample://nativePage?aaa=bbb
///例如:sample://nativePage?aaa=bbb
onTap:
()
=>
FlutterBoost
.
singleton
onTap:
()
=>
FlutterBoost
.
singleton
.
open
(
"sample://f
lutterPage1
"
,
urlParams:
{
.
open
(
"sample://f
irst
"
,
urlParams:
{
"query"
:
{
"aaa"
:
"bbb"
}
"query"
:
{
"aaa"
:
"bbb"
}
}),
}),
),
),
...
@@ -157,14 +157,14 @@ class _FlutterRouteWidgetState extends State<FlutterRouteWidget> {
...
@@ -157,14 +157,14 @@ class _FlutterRouteWidgetState extends State<FlutterRouteWidget> {
margin:
const
EdgeInsets
.
all
(
8.0
),
margin:
const
EdgeInsets
.
all
(
8.0
),
color:
Colors
.
yellow
,
color:
Colors
.
yellow
,
child:
Text
(
child:
Text
(
'open
flutterPage2
'
,
'open
second
'
,
style:
TextStyle
(
fontSize:
22.0
,
color:
Colors
.
black
),
style:
TextStyle
(
fontSize:
22.0
,
color:
Colors
.
black
),
)),
)),
///后面的参数会在native的IPlatform.startActivity方法回调中拼接到url的query部分。
///后面的参数会在native的IPlatform.startActivity方法回调中拼接到url的query部分。
///例如:sample://nativePage?aaa=bbb
///例如:sample://nativePage?aaa=bbb
onTap:
()
=>
FlutterBoost
.
singleton
onTap:
()
=>
FlutterBoost
.
singleton
.
open
(
"sample://
flutterPage2
"
,
urlParams:
{
.
open
(
"sample://
second
"
,
urlParams:
{
"query"
:
{
"aaa"
:
"bbb"
}
"query"
:
{
"aaa"
:
"bbb"
}
}),
}),
),
),
...
@@ -174,14 +174,14 @@ class _FlutterRouteWidgetState extends State<FlutterRouteWidget> {
...
@@ -174,14 +174,14 @@ class _FlutterRouteWidgetState extends State<FlutterRouteWidget> {
margin:
const
EdgeInsets
.
all
(
8.0
),
margin:
const
EdgeInsets
.
all
(
8.0
),
color:
Colors
.
yellow
,
color:
Colors
.
yellow
,
child:
Text
(
child:
Text
(
'open
flutterPage3
'
,
'open
tab
'
,
style:
TextStyle
(
fontSize:
22.0
,
color:
Colors
.
black
),
style:
TextStyle
(
fontSize:
22.0
,
color:
Colors
.
black
),
)),
)),
///后面的参数会在native的IPlatform.startActivity方法回调中拼接到url的query部分。
///后面的参数会在native的IPlatform.startActivity方法回调中拼接到url的query部分。
///例如:sample://nativePage?aaa=bbb
///例如:sample://nativePage?aaa=bbb
onTap:
()
=>
FlutterBoost
.
singleton
onTap:
()
=>
FlutterBoost
.
singleton
.
open
(
"sample://
flutterPage3
"
,
urlParams:
{
.
open
(
"sample://
tab
"
,
urlParams:
{
"query"
:
{
"aaa"
:
"bbb"
}
"query"
:
{
"aaa"
:
"bbb"
}
}),
}),
),
),
...
...
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