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
62d3504f
Commit
62d3504f
authored
Sep 18, 2019
by
余玠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增present函数
parent
f44b7392
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
1 deletion
+23
-1
ios/Classes/Boost/FlutterBoostPlugin.h
ios/Classes/Boost/FlutterBoostPlugin.h
+16
-1
ios/Classes/Boost/FlutterBoostPlugin.m
ios/Classes/Boost/FlutterBoostPlugin.m
+7
-0
No files found.
ios/Classes/Boost/FlutterBoostPlugin.h
View file @
62d3504f
...
@@ -67,7 +67,7 @@
...
@@ -67,7 +67,7 @@
completion
:(
void
(
^
)(
BOOL
))
completion
;
completion
:(
void
(
^
)(
BOOL
))
completion
;
/**
/**
* 打开新页面
,混合栈推荐使用的用于操作页面的接口
* 打开新页面
(默认以push方式),混合栈推荐使用的用于操作页面的接口;通过urlParams可以设置为以present方式打开页面:urlParams:@{@"present":@(YES)}
*
*
* @param url 打开的页面资源定位符
* @param url 打开的页面资源定位符
* @param urlParams 传人页面的参数; 若有特殊逻辑,可以通过这个参数设置回调的id
* @param urlParams 传人页面的参数; 若有特殊逻辑,可以通过这个参数设置回调的id
...
@@ -80,4 +80,19 @@
...
@@ -80,4 +80,19 @@
exts
:(
NSDictionary
*
)
exts
exts
:(
NSDictionary
*
)
exts
onPageFinished
:(
void
(
^
)(
NSDictionary
*
))
resultCallback
onPageFinished
:(
void
(
^
)(
NSDictionary
*
))
resultCallback
completion
:(
void
(
^
)(
BOOL
))
completion
;
completion
:(
void
(
^
)(
BOOL
))
completion
;
/**
* Present方式打开新页面,混合栈推荐使用的用于操作页面的接口
*
* @param url 打开的页面资源定位符
* @param urlParams 传人页面的参数; 若有特殊逻辑,可以通过这个参数设置回调的id
* @param exts 额外参数
* @param resultCallback 当页面结束返回时执行的回调,通过这个回调可以取得页面的返回数据,如close函数传入的resultData
* @param completion 打开页面的即时回调,页面一旦打开即回调
*/
+
(
void
)
present
:(
NSString
*
)
url
urlParams
:(
NSDictionary
*
)
urlParams
exts
:(
NSDictionary
*
)
exts
onPageFinished
:(
void
(
^
)(
NSDictionary
*
))
resultCallback
completion
:(
void
(
^
)(
BOOL
))
completion
;
@end
@end
ios/Classes/Boost/FlutterBoostPlugin.m
View file @
62d3504f
...
@@ -168,6 +168,13 @@
...
@@ -168,6 +168,13 @@
[
app
open
:
url
urlParams
:
urlParams
exts
:
exts
onPageFinished
:
resultCallback
completion
:
completion
];
[
app
open
:
url
urlParams
:
urlParams
exts
:
exts
onPageFinished
:
resultCallback
completion
:
completion
];
}
}
+
(
void
)
present
:(
NSString
*
)
url
urlParams
:(
NSDictionary
*
)
urlParams
exts
:(
NSDictionary
*
)
exts
onPageFinished
:(
void
(
^
)(
NSDictionary
*
))
resultCallback
completion
:(
void
(
^
)(
BOOL
))
completion
{
id
<
FLBFlutterApplicationInterface
>
app
=
[[
FlutterBoostPlugin
sharedInstance
]
application
];
NSMutableDictionary
*
myParams
=
[[
NSMutableDictionary
alloc
]
initWithDictionary
:
urlParams
];
[
myParams
setObject
:
@
(
YES
)
forKey
:
@"present"
];
[
app
open
:
url
urlParams
:
myParams
exts
:
exts
onPageFinished
:
resultCallback
completion
:
completion
];
}
+
(
void
)
close
:(
NSString
*
)
uniqueId
result
:(
NSDictionary
*
)
resultData
exts
:(
NSDictionary
*
)
exts
completion
:(
void
(
^
)(
BOOL
))
completion
{
+
(
void
)
close
:(
NSString
*
)
uniqueId
result
:(
NSDictionary
*
)
resultData
exts
:(
NSDictionary
*
)
exts
completion
:(
void
(
^
)(
BOOL
))
completion
{
id
<
FLBFlutterApplicationInterface
>
app
=
[[
FlutterBoostPlugin
sharedInstance
]
application
];
id
<
FLBFlutterApplicationInterface
>
app
=
[[
FlutterBoostPlugin
sharedInstance
]
application
];
[
app
close
:
uniqueId
result
:
resultData
exts
:
exts
completion
:
completion
];
[
app
close
:
uniqueId
result
:
resultData
exts
:
exts
completion
:
completion
];
...
...
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