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
dc9ee726
Commit
dc9ee726
authored
Jun 14, 2019
by
Jidong Chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some fixs
parent
01e72797
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
19 deletions
+15
-19
android/src/main/java/com/taobao/idlefish/flutterboost/messageing/base/Broadcastor.java
...ao/idlefish/flutterboost/messageing/base/Broadcastor.java
+5
-6
lib/flutter_boost.dart
lib/flutter_boost.dart
+4
-9
lib/messaging/base/broadcastor.dart
lib/messaging/base/broadcastor.dart
+6
-4
No files found.
android/src/main/java/com/taobao/idlefish/flutterboost/messageing/base/Broadcastor.java
View file @
dc9ee726
...
...
@@ -51,19 +51,18 @@ public class Broadcastor{
return
;
}
List
<
EvenListener
>
list
=
lists
.
get
(
name
);
if
(
list
==
null
){
return
;
}
String
eventName
=
(
String
)
arguments
.
get
(
"name"
);
Map
eventArguments
=
(
Map
)
arguments
.
get
(
"arguments"
);
List
<
EvenListener
>
list
=
lists
.
get
(
eventName
);
if
(
list
==
null
){
return
;
}
for
(
EvenListener
l
:
list
){
l
.
onEvent
(
eventName
,
eventArguments
);
}
return
;
return
;
}
public
void
addEventListener
(
String
name
,
EvenListener
listener
){
...
...
lib/flutter_boost.dart
View file @
dc9ee726
...
...
@@ -128,25 +128,20 @@ class FlutterBoost {
ContainerCoordinator
.
singleton
.
registerDefaultPageBuilder
(
builder
);
}
///Register page builder for a key.
void
registerPageBuilder
(
String
pageName
,
PageBuilder
builder
)
{
ContainerCoordinator
.
singleton
.
registerPageBuilder
(
pageName
,
builder
);
}
///Register a map builders
void
registerPageBuilders
(
Map
<
String
,
PageBuilder
>
builders
)
{
ContainerCoordinator
.
singleton
.
registerPageBuilders
(
builders
);
}
Future
<
bool
>
openPage
(
String
url
,
Map
params
,
Future
<
bool
>
openPage
(
String
name
,
Map
params
,
{
bool
animated
,
PageResultHandler
resultHandler
})
{
return
_router
.
openPage
(
url
,
params
,
return
_router
.
openPage
(
name
,
params
,
animated:
animated
,
resultHandler:
resultHandler
);
}
Future
<
bool
>
closePage
(
String
url
,
String
pageId
,
Map
params
,
Future
<
bool
>
closePage
(
String
name
,
String
pageId
,
Map
params
,
{
bool
animated
})
{
return
_router
.
closePage
(
url
,
pageId
,
params
,
animated:
animated
);
return
_router
.
closePage
(
name
,
pageId
,
params
,
animated:
animated
);
}
//Close currentPage page.
...
...
lib/messaging/base/broadcastor.dart
View file @
dc9ee726
...
...
@@ -70,15 +70,17 @@ class Broadcastor{
}
Future
<
dynamic
>
handleCall
(
MethodCall
call
){
if
(
!
_lists
.
containsKey
(
call
.
method
)
||
call
.
method
!=
"__event__"
){
if
(
call
.
method
!=
"__event__"
){
return
Future
<
dynamic
>((){});
}
String
name
=
call
.
arguments
[
"name"
];
Map
arg
=
call
.
arguments
[
"arguments"
];
List
<
EventListener
>
list
=
_lists
[
call
.
method
];
for
(
EventListener
l
in
list
){
l
(
name
,
arg
);
List
<
EventListener
>
list
=
_lists
[
name
];
if
(
list
!=
null
){
for
(
EventListener
l
in
list
){
l
(
name
,
arg
);
}
}
return
Future
<
dynamic
>((){});
...
...
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