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
1
Merge Requests
1
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
6d98bca6
Commit
6d98bca6
authored
May 15, 2020
by
justin
Committed by
GitHub
May 15, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #694 from AlexVincent525/master
Fix type cast error with `invokeMethod` method.
parents
db7ca34a
fbd1446f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
18 deletions
+19
-18
example/lib/simple_page_widgets.dart
example/lib/simple_page_widgets.dart
+8
-8
example_swift/lib/simple_page_widgets.dart
example_swift/lib/simple_page_widgets.dart
+1
-1
lib/flutter_boost.dart
lib/flutter_boost.dart
+5
-4
test/lib/unit/container_manager_test.dart
test/lib/unit/container_manager_test.dart
+2
-2
test/lib/unit/page_widgets.dart
test/lib/unit/page_widgets.dart
+3
-3
No files found.
example/lib/simple_page_widgets.dart
View file @
6d98bca6
...
...
@@ -55,7 +55,7 @@ class _FirstRouteWidgetState extends State<FirstRouteWidget> {
print
(
'open natve page!'
);
FlutterBoost
.
singleton
.
open
(
'native'
)
.
then
((
Map
<
String
,
dynamic
>
value
)
{
.
then
((
Map
<
dynamic
,
dynamic
>
value
)
{
print
(
'call me when page is finished. did recieve native route result
$value
'
);
});
...
...
@@ -67,7 +67,7 @@ class _FirstRouteWidgetState extends State<FirstRouteWidget> {
print
(
'open FF page!'
);
FlutterBoost
.
singleton
.
open
(
'firstFirst'
)
.
then
((
Map
<
String
,
dynamic
>
value
)
{
.
then
((
Map
<
dynamic
,
dynamic
>
value
)
{
print
(
'call me when page is finished. did recieve FF route result
$value
'
);
});
...
...
@@ -79,7 +79,7 @@ class _FirstRouteWidgetState extends State<FirstRouteWidget> {
print
(
'open second page!'
);
FlutterBoost
.
singleton
.
open
(
'second'
)
.
then
((
Map
<
String
,
dynamic
>
value
)
{
.
then
((
Map
<
dynamic
,
dynamic
>
value
)
{
print
(
'call me when page is finished. did recieve second route result
$value
'
);
});
...
...
@@ -92,7 +92,7 @@ class _FirstRouteWidgetState extends State<FirstRouteWidget> {
FlutterBoost
.
singleton
.
open
(
'secondStateful'
,
urlParams:
<
String
,
dynamic
>{
'present'
:
true
}).
then
((
Map
<
String
,
dynamic
>
value
)
{
}).
then
((
Map
<
dynamic
,
dynamic
>
value
)
{
print
(
'call me when page is finished. did recieve second stateful route result
$value
'
);
});
...
...
@@ -105,7 +105,7 @@ class _FirstRouteWidgetState extends State<FirstRouteWidget> {
FlutterBoost
.
singleton
.
open
(
'second'
,
urlParams:
<
String
,
dynamic
>{
'present'
:
true
}).
then
((
Map
<
String
,
dynamic
>
value
)
{
}).
then
((
Map
<
dynamic
,
dynamic
>
value
)
{
print
(
'call me when page is finished. did recieve second route result
$value
'
);
});
...
...
@@ -167,7 +167,7 @@ class _FirstFirstRouteWidgetState extends State<FirstFirstRouteWidget> {
print
(
'open first page again!'
);
FlutterBoost
.
singleton
.
open
(
'first'
)
.
then
((
Map
<
String
,
dynamic
>
value
)
{
.
then
((
Map
<
dynamic
,
dynamic
>
value
)
{
print
(
'did recieve first route result'
);
print
(
'did recieve first route result
$value
'
);
});
...
...
@@ -195,7 +195,7 @@ class _EmbeddedFirstRouteWidgetState extends State<EmbeddedFirstRouteWidget> {
print
(
'open second page!'
);
FlutterBoost
.
singleton
.
open
(
'second'
)
.
then
((
Map
<
String
,
dynamic
>
value
)
{
.
then
((
Map
<
dynamic
,
dynamic
>
value
)
{
print
(
'call me when page is finished. did recieve second route result
$value
'
);
});
...
...
@@ -296,7 +296,7 @@ class PlatformRouteWidget extends StatelessWidget {
print
(
'open second page!'
);
FlutterBoost
.
singleton
.
open
(
'second'
)
.
then
((
Map
<
String
,
dynamic
>
value
)
{
.
then
((
Map
<
dynamic
,
dynamic
>
value
)
{
print
(
'call me when page is finished. did recieve second route result
$value
'
);
});
...
...
example_swift/lib/simple_page_widgets.dart
View file @
6d98bca6
...
...
@@ -15,7 +15,7 @@ class FirstRouteWidget extends StatelessWidget {
print
(
'open second page!'
);
FlutterBoost
.
singleton
.
open
(
'second'
)
.
then
((
Map
<
String
,
dynamic
>
value
)
{
.
then
((
Map
<
dynamic
,
dynamic
>
value
)
{
print
(
'call me when page is finished. did recieve second route result
$value
'
);
});
...
...
lib/flutter_boost.dart
View file @
6d98bca6
...
...
@@ -69,8 +69,9 @@ class FlutterBoost {
static
void
onPageStart
()
{
WidgetsBinding
.
instance
.
addPostFrameCallback
((
Duration
_
)
{
singleton
.
channel
.
invokeMethod
<
Map
<
String
,
dynamic
>>(
'pageOnStart'
)
.
then
((
Map
<
String
,
dynamic
>
pageInfo
)
{
.
invokeMethod
<
Map
<
dynamic
,
dynamic
>>(
'pageOnStart'
)
.
then
((
Map
<
dynamic
,
dynamic
>
_pageInfo
)
{
final
Map
<
String
,
dynamic
>
pageInfo
=
_pageInfo
?.
cast
<
String
,
dynamic
>();
if
(
pageInfo
?.
isEmpty
??
true
)
{
return
;
}
...
...
@@ -137,7 +138,7 @@ class FlutterBoost {
ContainerCoordinator
.
singleton
.
registerPageBuilders
(
builders
);
}
Future
<
Map
<
String
,
dynamic
>>
open
(
Future
<
Map
<
dynamic
,
dynamic
>>
open
(
String
url
,
{
Map
<
String
,
dynamic
>
urlParams
,
Map
<
String
,
dynamic
>
exts
,
...
...
@@ -146,7 +147,7 @@ class FlutterBoost {
properties
[
'url'
]
=
url
;
properties
[
'urlParams'
]
=
urlParams
;
properties
[
'exts'
]
=
exts
;
return
channel
.
invokeMethod
<
Map
<
String
,
dynamic
>>(
'openPage'
,
properties
);
return
channel
.
invokeMethod
<
Map
<
dynamic
,
dynamic
>>(
'openPage'
,
properties
);
}
Future
<
bool
>
close
(
...
...
test/lib/unit/container_manager_test.dart
View file @
6d98bca6
...
...
@@ -24,7 +24,7 @@ class FirstRouteWidget extends StatelessWidget {
print
(
'open second page!'
);
FlutterBoost
.
singleton
.
open
(
'second'
)
.
then
((
Map
<
String
,
dynamic
>
value
)
{
.
then
((
Map
<
dynamic
,
dynamic
>
value
)
{
print
(
'call me when page is finished. did recieve second route result
$value
'
);
});
...
...
@@ -54,7 +54,7 @@ class SecondRouteWidget extends StatelessWidget {
print
(
'open second page!'
);
FlutterBoost
.
singleton
.
open
(
'second'
)
.
then
((
Map
<
String
,
dynamic
>
value
)
{
.
then
((
Map
<
dynamic
,
dynamic
>
value
)
{
print
(
'call me when page is finished. did recieve second route result
$value
'
);
});
...
...
test/lib/unit/page_widgets.dart
View file @
6d98bca6
...
...
@@ -19,7 +19,7 @@ class FirstRouteWidget extends StatelessWidget {
print
(
'open second page!'
);
FlutterBoost
.
singleton
.
open
(
'second'
)
.
then
((
Map
<
String
,
dynamic
>
value
)
{
.
then
((
Map
<
dynamic
,
dynamic
>
value
)
{
print
(
'call me when page is finished. did recieve second route result
$value
'
);
});
...
...
@@ -32,7 +32,7 @@ class FirstRouteWidget extends StatelessWidget {
FlutterBoost
.
singleton
.
open
(
'second'
,
urlParams:
<
String
,
dynamic
>{
'present'
:
true
}).
then
((
Map
<
String
,
dynamic
>
value
)
{
}).
then
((
Map
<
dynamic
,
dynamic
>
value
)
{
print
(
'call me when page is finished. did recieve second route result
$value
'
);
});
...
...
@@ -56,7 +56,7 @@ class EmbededFirstRouteWidget extends StatelessWidget {
print
(
'open second page!'
);
FlutterBoost
.
singleton
.
open
(
'second'
)
.
then
((
Map
<
String
,
dynamic
>
value
)
{
.
then
((
Map
<
dynamic
,
dynamic
>
value
)
{
print
(
'call me when page is finished. did recieve second route result
$value
'
);
});
...
...
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