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
b5ef7160
Commit
b5ef7160
authored
Jun 11, 2019
by
Jidong Chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
almost done
parent
5173dd21
Changes
21
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
141 additions
and
127 deletions
+141
-127
ios/Classes/1.0/FLBFlutterApplication.m
ios/Classes/1.0/FLBFlutterApplication.m
+0
-5
ios/Classes/1.0/FLBFlutterEngineOld.m
ios/Classes/1.0/FLBFlutterEngineOld.m
+1
-6
ios/Classes/1.0/FLBFlutterProvider.h
ios/Classes/1.0/FLBFlutterProvider.h
+7
-8
ios/Classes/1.0/FLBFlutterViewContainer.m
ios/Classes/1.0/FLBFlutterViewContainer.m
+16
-14
ios/Classes/1.0/FLBFlutterViewControllerAdaptor.h
ios/Classes/1.0/FLBFlutterViewControllerAdaptor.h
+0
-1
ios/Classes/1.0/FLBFlutterViewControllerAdaptor.m
ios/Classes/1.0/FLBFlutterViewControllerAdaptor.m
+0
-6
ios/Classes/1.0/FLBFlutterViewProvider.h
ios/Classes/1.0/FLBFlutterViewProvider.h
+0
-2
ios/Classes/1.0/FLBViewProviderFactory.m
ios/Classes/1.0/FLBViewProviderFactory.m
+0
-1
ios/Classes/1.5/FLB2Factory.h
ios/Classes/1.5/FLB2Factory.h
+2
-1
ios/Classes/1.5/FLB2Factory.m
ios/Classes/1.5/FLB2Factory.m
+35
-6
ios/Classes/1.5/FLB2FlutterApplication.h
ios/Classes/1.5/FLB2FlutterApplication.h
+0
-21
ios/Classes/1.5/FLB2FlutterApplication.m
ios/Classes/1.5/FLB2FlutterApplication.m
+4
-6
ios/Classes/1.5/FLB2FlutterViewContainer.m
ios/Classes/1.5/FLB2FlutterViewContainer.m
+7
-7
ios/Classes/Boost/FLB2FlutterProvider.h
ios/Classes/Boost/FLB2FlutterProvider.h
+2
-6
ios/Classes/Boost/FLB2Platform.h
ios/Classes/Boost/FLB2Platform.h
+1
-2
ios/Classes/Boost/FLBFlutterContainer.h
ios/Classes/Boost/FLBFlutterContainer.h
+24
-6
ios/Classes/Boost/FLBPlatform.h
ios/Classes/Boost/FLBPlatform.h
+0
-4
ios/Classes/Boost/FlutterBoostPlugin.m
ios/Classes/Boost/FlutterBoostPlugin.m
+14
-3
ios/Classes/Boost/FlutterBoostPlugin_private.h
ios/Classes/Boost/FlutterBoostPlugin_private.h
+7
-4
ios/Classes/Messaging/Generated/NavigationService/handlers/NavigationService_closePage.mm
...NavigationService/handlers/NavigationService_closePage.mm
+10
-8
ios/Classes/Messaging/Generated/NavigationService/handlers/NavigationService_openPage.mm
.../NavigationService/handlers/NavigationService_openPage.mm
+11
-10
No files found.
ios/Classes/1.0/FLBFlutterApplication.m
View file @
b5ef7160
...
...
@@ -126,10 +126,5 @@
[
self
.
viewProvider
inactive
];
}
-
(
void
)
setAccessibilityEnable
:(
BOOL
)
enable
{
[
self
.
viewProvider
setAccessibilityEnable
:
enable
];
}
@end
ios/Classes/1.0/FLBFlutterEngineOld.m
View file @
b5ef7160
...
...
@@ -47,12 +47,7 @@
method_exchangeImplementations
(
originalMethod
,
swizzledMethod
);
_viewController
=
[
FLBFlutterViewControllerAdaptor
new
];
if
([
platform
respondsToSelector
:
@selector
(
accessibilityEnable
)]){
_viewController
.
accessibilityEnable
=
[
platform
accessibilityEnable
];
}
else
{
_viewController
.
accessibilityEnable
=
YES
;
}
[
_viewController
view
];
Class
clazz
=
NSClassFromString
(
@"GeneratedPluginRegistrant"
);
if
(
clazz
)
{
...
...
ios/Classes/1.0/FLBFlutterProvider.h
View file @
b5ef7160
/*
* The MIT License (MIT)
*
*
* Copyright (c) 2019 Alibaba Group
*
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
...
...
@@ -25,21 +25,20 @@
#import <Foundation/Foundation.h>
@class
FlutterViewController
;
@class
FlutterEngine
;
NS_ASSUME_NONNULL_BEGIN
#define RELEASE_1_0
1
#define RELEASE_1_0
0
@protocol
FLBFlutterProvider
<
NSObject
>
@protocol
FLBFlutter
View
Provider
<
NSObject
>
@required
-
(
FlutterViewController
*
)
viewController
;
-
(
void
)
pause
;
-
(
void
)
resume
;
-
(
void
)
inactive
;
-
(
void
)
prepareEngineIfNeeded
;
@end
NS_ASSUME_NONNULL_END
ios/Classes/1.0/FLBFlutterViewContainer.m
View file @
b5ef7160
...
...
@@ -29,10 +29,12 @@
#import "FLBMemoryInspector.h"
#import "Service_NavigationService.h"
#import "FlutterBoostConfig.h"
#import "FlutterBoostPlugin_private.h"
#define FLUTTER_APP [FlutterBoostPlugin sharedInstance].application
#define FLUTTER_VIEW FLUTTER_APP.flutterViewController.view
#define FLUTTER_VC FLUTTER_APP.flutterViewController
#define FLUTTER_VIEW [FLBFlutterApplication sharedApplication].flutterViewController.view
#define FLUTTER_VC [FLBFlutterApplication sharedApplication].flutterViewController
#define FLUTTER_APP [FLBFlutterApplication sharedApplication]
@interface
FLBFlutterViewContainer
()
@property
(
nonatomic
,
copy
,
readwrite
)
NSString
*
name
;
...
...
@@ -77,7 +79,7 @@ static NSUInteger kInstanceCounter = 0;
kInstanceCounter
--
;
if
([
self
.
class
instanceCounter
]
==
0
){
[[
FLBStackCache
sharedInstance
]
clear
];
[
[
FLBFlutterApplication
sharedApplication
]
pause
];
[
FLUTTER_APP
pause
];
}
}
...
...
@@ -143,7 +145,7 @@ static NSUInteger kInstanceCounter = 0;
uniqueId:
[
self
uniqueIDString
]];
[[
FLBStackCache
sharedInstance
]
remove
:
self
.
uniqueIDString
];
[
[
FLBFlutterApplication
sharedApplication
]
removeViewController
:
self
];
[
FLUTTER_APP
removeViewController
:
self
];
[
self
.
class
instanceCounterDecrease
];
}
...
...
@@ -290,7 +292,7 @@ static NSUInteger kInstanceCounter = 0;
-
(
void
)
viewDidLayoutSubviews
{
[
super
viewDidLayoutSubviews
];
[
[
FLBFlutterApplication
sharedApplication
]
resume
];
[
FLUTTER_APP
resume
];
}
-
(
void
)
viewWillAppear
:(
BOOL
)
animated
...
...
@@ -299,10 +301,10 @@ static NSUInteger kInstanceCounter = 0;
self
.
interactiveGestureActive
=
true
;
}
[
[
FLBFlutterApplication
sharedApplication
]
resume
];
[
FLUTTER_APP
resume
];
//For new page we should attach flutter view in view will appear
//for better performance.
if
(
!
[
[
FLBFlutterApplication
sharedApplication
]
contains
:
self
]){
if
(
!
[
FLUTTER_APP
contains
:
self
]){
[
self
attatchFlutterView
];
}
...
...
@@ -313,10 +315,10 @@ static NSUInteger kInstanceCounter = 0;
params:
_params
uniqueId:
self
.
uniqueIDString
];
//Save some first time page info.
if
(
!
[
FlutterBoost
Config
sharedInstance
].
fPagename
){
[
FlutterBoost
Config
sharedInstance
].
fPagename
=
_name
;
[
FlutterBoost
Config
sharedInstance
].
fPageId
=
self
.
uniqueIDString
;
[
FlutterBoost
Config
sharedInstance
].
fParams
=
_params
;
if
(
!
[
FlutterBoost
Plugin
sharedInstance
].
fPagename
){
[
FlutterBoost
Plugin
sharedInstance
].
fPagename
=
_name
;
[
FlutterBoost
Plugin
sharedInstance
].
fPageId
=
self
.
uniqueIDString
;
[
FlutterBoost
Plugin
sharedInstance
].
fParams
=
_params
;
}
[
super
viewWillAppear
:
animated
];
...
...
@@ -324,7 +326,7 @@ static NSUInteger kInstanceCounter = 0;
-
(
void
)
viewDidAppear
:(
BOOL
)
animated
{
[
[
FLBFlutterApplication
sharedApplication
]
resume
];
[
FLUTTER_APP
resume
];
//Ensure flutter view is attached.
[
self
attatchFlutterView
];
...
...
@@ -334,7 +336,7 @@ static NSUInteger kInstanceCounter = 0;
params:
_params
uniqueId:
self
.
uniqueIDString
];
[
[
FLBFlutterApplication
sharedApplication
]
addUniqueViewController
:
self
];
[
FLUTTER_APP
addUniqueViewController
:
self
];
[
super
viewDidAppear
:
animated
];
...
...
ios/Classes/1.0/FLBFlutterViewControllerAdaptor.h
View file @
b5ef7160
...
...
@@ -32,7 +32,6 @@ NS_ASSUME_NONNULL_BEGIN
-
(
void
)
boost_viewWillDisappear
:(
BOOL
)
animated
;
-
(
void
)
boost_viewDidDisappear
:(
BOOL
)
animated
;
@property
(
nonatomic
,
assign
)
BOOL
accessibilityEnable
;
@end
...
...
ios/Classes/1.0/FLBFlutterViewControllerAdaptor.m
View file @
b5ef7160
...
...
@@ -95,11 +95,5 @@
//Override this to avoid unnecessary splash Screen.
}
-
(
void
)
fixed_onAccessibilityStatusChanged
:(
NSNotification
*
)
notification
{
if
(
self
.
accessibilityEnable
){
[
self
fixed_onAccessibilityStatusChanged
:
notification
];
}
}
@end
ios/Classes/1.0/FLBFlutterViewProvider.h
View file @
b5ef7160
...
...
@@ -33,8 +33,6 @@ NS_ASSUME_NONNULL_BEGIN
@protocol
FLBFlutterViewProvider
<
NSObject
>
@required
-
(
void
)
setAccessibilityEnable
:(
BOOL
)
enable
;
-
(
BOOL
)
accessibilityEnable
;
-
(
FlutterViewController
*
)
viewController
;
-
(
void
)
pause
;
-
(
void
)
resume
;
...
...
ios/Classes/1.0/FLBViewProviderFactory.m
View file @
b5ef7160
...
...
@@ -23,7 +23,6 @@
*/
#import "FLBViewProviderFactory.h"
#import "FLBFlutterEngine.h"
#import "FLBFlutterEngineOld.h"
#import "FLBPlatform.h"
...
...
ios/Classes/1.5/FLB2Factory.h
View file @
b5ef7160
...
...
@@ -23,10 +23,11 @@
*/
#import <Foundation/Foundation.h>
#import "FLBAbstractFactory.h"
NS_ASSUME_NONNULL_BEGIN
@interface
FLB2Factory
:
NSObject
@interface
FLB2Factory
:
NSObject
<
FLBAbstractFactory
>
@end
...
...
ios/Classes/1.5/FLB2Factory.m
View file @
b5ef7160
//
// FLBFactory.m
// flutter_boost
//
// Created by Jidong Chen on 2019/6/11.
//
/*
* The MIT License (MIT)
*
* Copyright (c) 2019 Alibaba Group
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#import "FLB2Factory.h"
#import "FLB2FlutterApplication.h"
#import "FLB2FlutterViewContainer.h"
@implementation
FLB2Factory
-
(
id
<
FLBFlutterApplicationInterface
>
)
createApplication
:(
id
<
FLB2Platform
>
)
platform
{
return
FLB2FlutterApplication
.
new
;
}
-
(
id
<
FLBFlutterContainer
>
)
createFlutterContainer
{
return
FLB2FlutterViewContainer
.
new
;
}
@end
ios/Classes/1.5/FLB2FlutterApplication.h
View file @
b5ef7160
...
...
@@ -32,27 +32,6 @@
NS_ASSUME_NONNULL_BEGIN
@interface
FLB2FlutterApplication
:
NSObject
<
FLBFlutterApplicationInterface
>
@property
(
nonatomic
,
strong
)
id
<
FLB2Platform
>
platform
;
-
(
id
<
FLB2FlutterProvider
>
)
flutterProvider
;
#pragma mark - Getters
+
(
FLB2FlutterApplication
*
)
sharedApplication
;
-
(
void
)
startFlutterWithPlatform
:(
id
<
FLB2Platform
>
)
platform
onStart
:(
void
(
^
)(
FlutterEngine
*
_Nonnull
))
callback
;
-
(
FlutterViewController
*
)
flutterViewController
;
#pragma mark - Container Management
-
(
BOOL
)
contains
:(
FLB2FlutterViewContainer
*
)
vc
;
-
(
void
)
addUniqueViewController
:(
FLB2FlutterViewContainer
*
)
vc
;
-
(
void
)
removeViewController
:(
FLB2FlutterViewContainer
*
)
vc
;
-
(
BOOL
)
isTop
:(
NSString
*
)
pageId
;
#pragma mark - App Control
-
(
void
)
pause
;
-
(
void
)
resume
;
-
(
void
)
inactive
;
-
(
BOOL
)
isRunning
;
@end
NS_ASSUME_NONNULL_END
ios/Classes/1.5/FLB2FlutterApplication.m
View file @
b5ef7160
...
...
@@ -30,7 +30,6 @@
@property
(
nonatomic
,
strong
)
FLBFlutterContainerManager
*
manager
;
@property
(
nonatomic
,
strong
)
id
<
FLB2FlutterProvider
>
viewProvider
;
@property
(
nonatomic
,
strong
)
NSMutableDictionary
*
pageBuilders
;
@property
(
nonatomic
,
assign
)
BOOL
isRunning
;
@end
...
...
@@ -58,7 +57,7 @@
}
-
(
void
)
startFlutterWithPlatform
:(
id
<
FLB2Platform
>
)
platform
onStart
:(
void
(
^
)(
FlutterEngine
*
_Nonnull
))
callback
onStart
:(
void
(
^
)(
id
<
FlutterBinaryMessenger
,
FlutterTextureRegistry
,
FlutterPluginRegistry
>
_Nonnull
))
callback
{
static
dispatch_once_t
onceToken
;
dispatch_once
(
&
onceToken
,
^
{
...
...
@@ -73,7 +72,6 @@
{
if
(
self
=
[
super
init
])
{
_manager
=
[
FLBFlutterContainerManager
new
];
_pageBuilders
=
[
NSMutableDictionary
new
];
}
return
self
;
}
...
...
@@ -89,17 +87,17 @@
}
-
(
BOOL
)
contains
:(
FLB2FlutterViewContainer
*
)
vc
-
(
BOOL
)
contains
:(
id
<
FLBFlutterContainer
>
)
vc
{
return
[
_manager
contains
:
vc
];
}
-
(
void
)
addUniqueViewController
:(
FLB2FlutterViewContainer
*
)
vc
-
(
void
)
addUniqueViewController
:(
id
<
FLBFlutterContainer
>
)
vc
{
return
[
_manager
addUnique
:
vc
];
}
-
(
void
)
removeViewController
:(
FLB2FlutterViewContainer
*
)
vc
-
(
void
)
removeViewController
:(
id
<
FLBFlutterContainer
>
)
vc
{
return
[
_manager
remove
:
vc
];
}
...
...
ios/Classes/1.5/FLB2FlutterViewContainer.m
View file @
b5ef7160
...
...
@@ -28,9 +28,9 @@
#import "FLBFlutterContainerManager.h"
#import "FlutterBoostPlugin_private.h"
#define FLUTTER_
VIEW [FLB2FlutterApplication sharedApplication].flutterViewController.view
#define FLUTTER_V
C [FLB2FlutterApplication sharedApplication].flutterViewController
#define FLUTTER_
APP [FLB2FlutterApplication sharedApplication]
#define FLUTTER_
APP [FlutterBoostPlugin sharedInstance].application
#define FLUTTER_V
IEW FLUTTER_APP.flutterViewController.view
#define FLUTTER_
VC FLUTTER_APP.flutterViewController
@interface
FLB2FlutterViewContainer
()
@property
(
nonatomic
,
copy
,
readwrite
)
NSString
*
name
;
...
...
@@ -91,7 +91,7 @@ static NSUInteger kInstanceCounter = 0;
{
kInstanceCounter
--
;
if
([
self
.
class
instanceCounter
]
==
0
){
// [
[FLBFlutterApplication sharedApplication]
pause];
// [
FLUTTER_APP
pause];
}
}
...
...
@@ -119,7 +119,7 @@ static NSUInteger kInstanceCounter = 0;
pageName:
_name
params
:
_params
uniqueId:
[
self
uniqueIDString
]];
[
[
FLB2FlutterApplication
sharedApplication
]
removeViewController
:
self
];
[
FLUTTER_APP
removeViewController
:
self
];
[
self
.
class
instanceCounterDecrease
];
}
...
...
@@ -152,7 +152,7 @@ static NSUInteger kInstanceCounter = 0;
-
(
void
)
viewDidLayoutSubviews
{
[
super
viewDidLayoutSubviews
];
[
[
FLB2FlutterApplication
sharedApplication
]
resume
];
[
FLUTTER_APP
resume
];
}
-
(
void
)
viewWillAppear
:(
BOOL
)
animated
...
...
@@ -163,7 +163,7 @@ static NSUInteger kInstanceCounter = 0;
[
self
attatchFlutterEngine
];
}
[
[
FLB2FlutterApplication
sharedApplication
]
resume
];
[
FLUTTER_APP
resume
];
[
self
surfaceUpdated
:
YES
];
//For new page we should attach flutter view in view will appear
...
...
ios/Classes/Boost/FLB2FlutterProvider.h
View file @
b5ef7160
...
...
@@ -23,7 +23,7 @@
*/
#import <Foundation/Foundation.h>
#import "FLBFlutterProvider.h"
#import "FLBFlutter
View
Provider.h"
@class
FlutterViewController
;
@class
FlutterEngine
;
...
...
@@ -32,16 +32,12 @@ NS_ASSUME_NONNULL_BEGIN
#define RELEASE_1_0 1
@protocol
FLB2FlutterProvider
<
FLBFlutterProvider
>
@protocol
FLB2FlutterProvider
<
FLBFlutter
View
Provider
>
@required
-
(
FlutterEngine
*
)
engine
;
-
(
void
)
atacheToViewController
:(
FlutterViewController
*
)
vc
;
-
(
void
)
detach
;
-
(
void
)
pause
;
-
(
void
)
resume
;
-
(
void
)
inactive
;
-
(
void
)
prepareEngineIfNeeded
;
@end
...
...
ios/Classes/Boost/FLB2Platform.h
View file @
b5ef7160
...
...
@@ -30,8 +30,7 @@ NS_ASSUME_NONNULL_BEGIN
@protocol
FLB2Platform
<
FLBPlatform
>
@optional
//Whether to enable accessibility support. Default value is Yes.
-
(
BOOL
)
accessibilityEnable
;
-
(
BOOL
)
userBoost2
;
@required
-
(
void
)
openPage
:(
NSString
*
)
name
...
...
ios/Classes/Boost/FLBFlutterContainer.h
View file @
b5ef7160
//
// FLBFlutterContainer.h
// flutter_boost
//
// Created by Jidong Chen on 2019/6/11.
//
/*
* The MIT License (MIT)
*
* Copyright (c) 2019 Alibaba Group
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#import <Foundation/Foundation.h>
...
...
ios/Classes/Boost/FLBPlatform.h
View file @
b5ef7160
...
...
@@ -28,10 +28,6 @@ NS_ASSUME_NONNULL_BEGIN
@protocol
FLBPlatform
<
NSObject
>
@optional
//Whether to enable accessibility support. Default value is Yes.
-
(
BOOL
)
accessibilityEnable
;
@required
-
(
void
)
openPage
:(
NSString
*
)
name
params
:(
NSDictionary
*
)
params
...
...
ios/Classes/Boost/FlutterBoostPlugin.m
View file @
b5ef7160
...
...
@@ -25,6 +25,8 @@
#import "FlutterBoostPlugin.h"
#import "FLBResultMediator.h"
#import "FlutterBoostPlugin_private.h"
#import "FLBFactory.h"
#import "FLB2Factory.h"
@implementation
FlutterBoostPlugin
...
...
@@ -70,9 +72,18 @@
FlutterTextureRegistry
,
FlutterPluginRegistry
>
engine
))
callback
;
{
//TODO:
[
self
.
application
startFlutterWithPlatform
:
platform
onStart:
callback
];
static
dispatch_once_t
onceToken
;
dispatch_once
(
&
onceToken
,
^
{
if
([
platform
respondsToSelector
:
@selector
(
userBoost2
)]
&&
platform
.
userBoost2
){
_factory
=
FLB2Factory
.
new
;
}
else
{
_factory
=
FLBFactory
.
new
;
}
_application
=
[
_factory
createApplication
:
platform
];
[
_application
startFlutterWithPlatform
:
platform
onStart
:
callback
];
});
}
-
(
BOOL
)
isRunning
...
...
ios/Classes/Boost/FlutterBoostPlugin_private.h
View file @
b5ef7160
...
...
@@ -27,12 +27,15 @@
#import "FLBResultMediator.h"
#import "FLBAbstractFactory.h"
@interface
FlutterBoostPlugin
()
@interface
FlutterBoostPlugin
(){
id
<
FLBFlutterApplicationInterface
>
_application
;
FLBResultMediator
*
_resultMediator
;
id
<
FLBAbstractFactory
>
_factory
;
}
-
(
id
<
FLBFlutterApplicationInterface
>
)
application
;
@property
(
nonatomic
,
strong
)
FLBResultMediator
*
resultMediator
;
@property
(
nonatomic
,
strong
)
id
<
FLBAbstractFactory
>
factory
;
-
(
FLBResultMediator
*
)
resultMediator
;
-
(
id
<
FLBAbstractFactory
>
)
factory
;
@property
(
nonatomic
,
copy
)
NSString
*
fPageId
;
@property
(
nonatomic
,
copy
)
NSString
*
fPagename
;
...
...
ios/Classes/Messaging/Generated/NavigationService/handlers/NavigationService_closePage.mm
View file @
b5ef7160
...
...
@@ -24,9 +24,11 @@
//Generated by AIOCodeGen.
#import "ServiceGateway.h"
#import "NavigationService_closePage.h"
#import "FLB2FlutterApplication.h"
#import "ServiceGateway.h"
#import "NavigationService_closePage.h"
#import "FlutterBoostPlugin_private.h"
#define FLUTTER_APP [FlutterBoostPlugin sharedInstance].application
@implementation
NavigationService_closePage
...
...
@@ -37,11 +39,11 @@
animated
:(
NSNumber
*
)
animated
{
//Add your handler code here!
[
[
FLB2FlutterApplication
sharedApplication
]
.
platform
closePage
:
uniqueId
animated:
animated
.
boolValue
params:
params
completion:
^
(
BOOL
finished
)
{
if
(
result
)
result
(
finished
);
[
FLUTTER_APP
.
platform
closePage
:
uniqueId
animated:
animated
.
boolValue
params:
params
completion:
^
(
BOOL
finished
)
{
if
(
result
)
result
(
finished
);
}];
}
...
...
ios/Classes/Messaging/Generated/NavigationService/handlers/NavigationService_openPage.mm
View file @
b5ef7160
...
...
@@ -24,22 +24,23 @@
//Generated by AIOCodeGen.
#import "ServiceGateway.h"
#import "NavigationService_openPage.h"
#import "FLB2FlutterApplication.h"
#import "FlutterBoost.h"
#import "ServiceGateway.h"
#import "NavigationService_openPage.h"
#import "Service_NavigationService.h"
#import "FlutterBoostPlugin_private.h"
#define FLUTTER_APP [FlutterBoostPlugin sharedInstance].application
@implementation
NavigationService_openPage
-
(
void
)
onCall
:(
void
(
^
)(
BOOL
))
result
pageName
:(
NSString
*
)
pageName
params
:(
NSDictionary
*
)
params
animated
:(
NSNumber
*
)
animated
{
[
[
FLB2FlutterApplication
sharedApplication
]
.
platform
openPage
:
pageName
params:
params
animated:
animated
.
boolValue
completion:
^
(
BOOL
finished
)
{
if
(
result
)
result
(
YES
);
}];
[
FLUTTER_APP
.
platform
openPage
:
pageName
params:
params
animated:
animated
.
boolValue
completion:
^
(
BOOL
finished
)
{
if
(
result
)
result
(
YES
);
}];
}
#pragma mark - Do not edit these method.
...
...
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