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
185c1ff8
Commit
185c1ff8
authored
5 years ago
by
Jidong Chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1,rename
2,refactory
parent
80bbf5c0
master
patch-1
v1.22.4-hotfixes
1.17.1
1.12.13+3
1.12.13+2
1.12.13+1
1.12.13
1.9.1+2
1.9.1+1
0.1.66
0.1.65
0.1.64
0.1.63
0.1.62
0.1.61
0.1.60
0.1.54
0.1.53
0.1.52
0.1.51
0.1.50
0.1.5
v5_flutter_1.5_upgrade_opt
v4_flutter_1.5_upgrade_opt
v3_flutter_1.5_upgrade_opt
v2_flutter_1.5_upgrade_opt
v1.12.13_support+10
v1.12.13_support+9
v1.12.13_support+8
v1.12.13_support+7
v1.12.13_support+6
v1.12.13_support+5
v1.12.13_support+4
v1.12.13_support+3
v1.12.13_support+2
v1.12.13_support+1
v1.12.13_support_xianyu+15
v1.12.13_support_xianyu+14
v1.12.13_support_xianyu+13
v1.12.13_support_xianyu+12
v1.12.13_support_xianyu+11
v1.12.13_support_xianyu+10
v1.9.1_suport+1
v1_flutter_1.5_upgrade_opt
v0.1.61-androidx-hotfixes
No related merge requests found
Changes
27
Show whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
266 additions
and
282 deletions
+266
-282
ios/Classes/1.5/FLB2FlutterApplication.h
ios/Classes/1.5/FLB2FlutterApplication.h
+11
-10
ios/Classes/1.5/FLB2FlutterApplication.m
ios/Classes/1.5/FLB2FlutterApplication.m
+14
-16
ios/Classes/1.5/FLB2FlutterEngine.h
ios/Classes/1.5/FLB2FlutterEngine.h
+2
-2
ios/Classes/1.5/FLB2FlutterEngine.m
ios/Classes/1.5/FLB2FlutterEngine.m
+6
-6
ios/Classes/1.5/FLB2FlutterViewContainer.h
ios/Classes/1.5/FLB2FlutterViewContainer.h
+5
-7
ios/Classes/1.5/FLB2FlutterViewContainer.m
ios/Classes/1.5/FLB2FlutterViewContainer.m
+16
-26
ios/Classes/1.5/FLBFactory.h
ios/Classes/1.5/FLBFactory.h
+6
-7
ios/Classes/1.5/FLBFactory.m
ios/Classes/1.5/FLBFactory.m
+12
-0
ios/Classes/Adaptor/FLBFlutterProviderFactory.m
ios/Classes/Adaptor/FLBFlutterProviderFactory.m
+0
-42
ios/Classes/Boost/FLB2FlutterProvider.h
ios/Classes/Boost/FLB2FlutterProvider.h
+1
-1
ios/Classes/Boost/FLB2Platform.h
ios/Classes/Boost/FLB2Platform.h
+1
-1
ios/Classes/Boost/FLBAbstractFactory.h
ios/Classes/Boost/FLBAbstractFactory.h
+44
-0
ios/Classes/Boost/FLBAbstractFactory.m
ios/Classes/Boost/FLBAbstractFactory.m
+12
-0
ios/Classes/Boost/FLBFlutterAppDelegate.m
ios/Classes/Boost/FLBFlutterAppDelegate.m
+2
-2
ios/Classes/Boost/FLBFlutterApplicationInterface.h
ios/Classes/Boost/FLBFlutterApplicationInterface.h
+62
-0
ios/Classes/Boost/FLBFlutterContainer.h
ios/Classes/Boost/FLBFlutterContainer.h
+19
-0
ios/Classes/Boost/FLBFlutterContainerManager.h
ios/Classes/Boost/FLBFlutterContainerManager.h
+5
-5
ios/Classes/Boost/FLBFlutterContainerManager.m
ios/Classes/Boost/FLBFlutterContainerManager.m
+6
-6
ios/Classes/Boost/FlutterBoost.h
ios/Classes/Boost/FlutterBoost.h
+5
-2
ios/Classes/Boost/FlutterBoostConfig.m
ios/Classes/Boost/FlutterBoostConfig.m
+0
-59
ios/Classes/Boost/FlutterBoostPlugin.h
ios/Classes/Boost/FlutterBoostPlugin.h
+4
-7
ios/Classes/Boost/FlutterBoostPlugin.m
ios/Classes/Boost/FlutterBoostPlugin.m
+10
-10
ios/Classes/Boost/FlutterBoostPlugin_private.h
ios/Classes/Boost/FlutterBoostPlugin_private.h
+15
-15
ios/Classes/Container/FLBFlutterViewContainer.h
ios/Classes/Container/FLBFlutterViewContainer.h
+0
-49
ios/Classes/Messaging/Generated/NavigationService/handlers/NavigationService_closePage.mm
...NavigationService/handlers/NavigationService_closePage.mm
+2
-2
ios/Classes/Messaging/Generated/NavigationService/handlers/NavigationService_openPage.mm
.../NavigationService/handlers/NavigationService_openPage.mm
+2
-2
ios/Classes/Messaging/Generated/NavigationService/handlers/NavigationService_pageOnStart.mm
...vigationService/handlers/NavigationService_pageOnStart.mm
+4
-5
No files found.
ios/Classes/
Boost/FLB
FlutterApplication.h
→
ios/Classes/
1.5/FLB2
FlutterApplication.h
View file @
185c1ff8
...
...
@@ -24,27 +24,28 @@
#import <Foundation/Foundation.h>
#import <Flutter/Flutter.h>
#import "FLBPlatform.h"
#import "FLB
2
Platform.h"
#import "FlutterBoost.h"
#import "FLBFlutterProvider.h"
#import "FLB2FlutterProvider.h"
#import "FLBFlutterApplicationInterface.h"
NS_ASSUME_NONNULL_BEGIN
@interface
FLB
FlutterApplication
:
NSObject
@interface
FLB
2FlutterApplication
:
NSObject
<
FLBFlutterApplicationInterface
>
@property
(
nonatomic
,
strong
)
id
<
FLBPlatform
>
platform
;
@property
(
nonatomic
,
strong
)
id
<
FLB
2
Platform
>
platform
;
-
(
id
<
FLBFlutterProvider
>
)
flutterProvider
;
-
(
id
<
FLB
2
FlutterProvider
>
)
flutterProvider
;
#pragma mark - Getters
+
(
FLBFlutterApplication
*
)
sharedApplication
;
-
(
void
)
startFlutterWithPlatform
:(
id
<
FLBPlatform
>
)
platform
+
(
FLB
2
FlutterApplication
*
)
sharedApplication
;
-
(
void
)
startFlutterWithPlatform
:(
id
<
FLB
2
Platform
>
)
platform
onStart
:(
void
(
^
)(
FlutterEngine
*
_Nonnull
))
callback
;
-
(
FlutterViewController
*
)
flutterViewController
;
#pragma mark - Container Management
-
(
BOOL
)
contains
:(
FLBFlutterViewContainer
*
)
vc
;
-
(
void
)
addUniqueViewController
:(
FLBFlutterViewContainer
*
)
vc
;
-
(
void
)
removeViewController
:(
FLBFlutterViewContainer
*
)
vc
;
-
(
BOOL
)
contains
:(
FLB
2
FlutterViewContainer
*
)
vc
;
-
(
void
)
addUniqueViewController
:(
FLB
2
FlutterViewContainer
*
)
vc
;
-
(
void
)
removeViewController
:(
FLB
2
FlutterViewContainer
*
)
vc
;
-
(
BOOL
)
isTop
:(
NSString
*
)
pageId
;
#pragma mark - App Control
...
...
This diff is collapsed.
Click to expand it.
ios/Classes/
Boost/FLB
FlutterApplication.m
→
ios/Classes/
1.5/FLB2
FlutterApplication.m
View file @
185c1ff8
...
...
@@ -22,26 +22,24 @@
* THE SOFTWARE.
*/
#import "FLBFlutterApplication.h"
#import "FLB
2
FlutterApplication.h"
#import "FlutterBoost.h"
#import "FLBFlutterViewContainerManager.h"
#import "FLBFlutterProviderFactory.h"
#import "FLBFlutterContainerManager.h"
@interface
FLBFlutterApplication
()
@property
(
nonatomic
,
strong
)
FLBFlutter
View
ContainerManager
*
manager
;
@property
(
nonatomic
,
strong
)
id
<
FLBFlutterProvider
>
viewProvider
;
@interface
FLB
2
FlutterApplication
()
@property
(
nonatomic
,
strong
)
FLBFlutterContainerManager
*
manager
;
@property
(
nonatomic
,
strong
)
id
<
FLB
2
FlutterProvider
>
viewProvider
;
@property
(
nonatomic
,
strong
)
NSMutableDictionary
*
pageBuilders
;
@property
(
nonatomic
,
copy
)
FLBPageBuilder
defaultPageBuilder
;
@property
(
nonatomic
,
assign
)
BOOL
isRunning
;
@end
@implementation
FLBFlutterApplication
@implementation
FLB
2
FlutterApplication
+
(
FLBFlutterApplication
*
)
sharedApplication
+
(
FLB
2
FlutterApplication
*
)
sharedApplication
{
static
FLBFlutterApplication
*
instance
=
nil
;
static
FLB
2
FlutterApplication
*
instance
=
nil
;
static
dispatch_once_t
onceToken
;
dispatch_once
(
&
onceToken
,
^
{
instance
=
[
self
new
];
...
...
@@ -59,13 +57,13 @@
return
_viewProvider
;
}
-
(
void
)
startFlutterWithPlatform
:(
id
<
FLBPlatform
>
)
platform
-
(
void
)
startFlutterWithPlatform
:(
id
<
FLB
2
Platform
>
)
platform
onStart
:(
void
(
^
)(
FlutterEngine
*
_Nonnull
))
callback
{
static
dispatch_once_t
onceToken
;
dispatch_once
(
&
onceToken
,
^
{
self
.
platform
=
platform
;
self
.
viewProvider
=
[[
FLBFlutterProviderFactory
new
]
createViewProviderWithPlatform
:
platform
]
;
self
.
viewProvider
;
self
.
isRunning
=
YES
;
if
(
callback
)
callback
(
self
.
viewProvider
.
engine
);
});
...
...
@@ -74,7 +72,7 @@
-
(
instancetype
)
init
{
if
(
self
=
[
super
init
])
{
_manager
=
[
FLBFlutter
View
ContainerManager
new
];
_manager
=
[
FLBFlutterContainerManager
new
];
_pageBuilders
=
[
NSMutableDictionary
new
];
}
return
self
;
...
...
@@ -91,17 +89,17 @@
}
-
(
BOOL
)
contains
:(
FLBFlutterViewContainer
*
)
vc
-
(
BOOL
)
contains
:(
FLB
2
FlutterViewContainer
*
)
vc
{
return
[
_manager
contains
:
vc
];
}
-
(
void
)
addUniqueViewController
:(
FLBFlutterViewContainer
*
)
vc
-
(
void
)
addUniqueViewController
:(
FLB
2
FlutterViewContainer
*
)
vc
{
return
[
_manager
addUnique
:
vc
];
}
-
(
void
)
removeViewController
:(
FLBFlutterViewContainer
*
)
vc
-
(
void
)
removeViewController
:(
FLB
2
FlutterViewContainer
*
)
vc
{
return
[
_manager
remove
:
vc
];
}
...
...
This diff is collapsed.
Click to expand it.
ios/Classes/
Adaptor/FLB
FlutterEngine.h
→
ios/Classes/
1.5/FLB2
FlutterEngine.h
View file @
185c1ff8
...
...
@@ -23,11 +23,11 @@
*/
#import <Foundation/Foundation.h>
#import "FLBFlutterProvider.h"
#import "FLB
2
FlutterProvider.h"
NS_ASSUME_NONNULL_BEGIN
@interface
FLB
FlutterEngine
:
NSObject
<
FLB
FlutterProvider
>
@interface
FLB
2FlutterEngine
:
NSObject
<
FLB2
FlutterProvider
>
@end
NS_ASSUME_NONNULL_END
This diff is collapsed.
Click to expand it.
ios/Classes/
Adaptor/FLB
FlutterEngine.m
→
ios/Classes/
1.5/FLB2
FlutterEngine.m
View file @
185c1ff8
...
...
@@ -22,17 +22,17 @@
* THE SOFTWARE.
*/
#import "FLBFlutterEngine.h"
#import "FLB
2
FlutterEngine.h"
#import <Flutter/Flutter.h>
#import "FLBFlutterViewContainer.h"
#import "FLB
2
FlutterViewContainer.h"
@interface
FLBFlutterEngine
()
@interface
FLB
2
FlutterEngine
()
@property
(
nonatomic
,
strong
)
FlutterEngine
*
engine
;
@property
(
nonatomic
,
strong
)
FLBFlutterViewContainer
*
dummy
;
@property
(
nonatomic
,
strong
)
FLB
2
FlutterViewContainer
*
dummy
;
@end
@implementation
FLBFlutterEngine
@implementation
FLB
2
FlutterEngine
-
(
instancetype
)
init
{
...
...
@@ -42,7 +42,7 @@
if
(
self
=
[
super
init
])
{
_engine
=
[[
FlutterEngine
alloc
]
initWithName
:
@"io.flutter"
project
:
nil
];
[
_engine
runWithEntrypoint
:
nil
];
_dummy
=
[[
FLBFlutterViewContainer
alloc
]
initWithEngine
:
_engine
_dummy
=
[[
FLB
2
FlutterViewContainer
alloc
]
initWithEngine
:
_engine
nibName:
nil
bundle:
nil
];
Class
clazz
=
NSClassFromString
(
@"GeneratedPluginRegistrant"
);
...
...
This diff is collapsed.
Click to expand it.
ios/Classes/
Adaptor/FLBFlutterProviderFactory
.h
→
ios/Classes/
1.5/FLB2FlutterViewContainer
.h
View file @
185c1ff8
...
...
@@ -22,17 +22,15 @@
* THE SOFTWARE.
*/
#import <Foundation/Foundation.h>
#import "FLBFlutterProvider.h"
#import "FLBPlatform.h"
#import <UIKit/UIKit.h>
#import <Flutter/Flutter.h>
#import "FLBFlutterContainer.h"
NS_ASSUME_NONNULL_BEGIN
@interface
FLB
FlutterProviderFactory
:
NSObject
@interface
FLB
2FlutterViewContainer
:
FlutterViewController
<
FLBFlutterContainer
>
-
(
id
<
FLBFlutterProvider
>
)
createViewProvider
;
-
(
id
<
FLBFlutterProvider
>
)
createViewProviderWithPlatform
:(
id
<
FLBPlatform
>
)
platform
;
-
(
void
)
surfaceUpdated
:(
BOOL
)
appeared
;
@end
...
...
This diff is collapsed.
Click to expand it.
ios/Classes/
Container/FLB
FlutterViewContainer.m
→
ios/Classes/
1.5/FLB2
FlutterViewContainer.m
View file @
185c1ff8
...
...
@@ -22,23 +22,23 @@
* THE SOFTWARE.
*/
#import "FLBFlutterViewContainer.h"
#import "FLBFlutterApplication.h"
#import "FLB
2
FlutterViewContainer.h"
#import "FLB
2
FlutterApplication.h"
#import "Service_NavigationService.h"
#import "F
lutterBoostConfig
.h"
#import "F
LBFlutterViewContainerManager
.h"
#import "F
LBFlutterContainerManager
.h"
#import "F
lutterBoostPlugin_private
.h"
#define FLUTTER_VIEW [FLBFlutterApplication sharedApplication].flutterViewController.view
#define FLUTTER_VC [FLBFlutterApplication sharedApplication].flutterViewController
#define FLUTTER_APP [FLBFlutterApplication sharedApplication]
#define FLUTTER_VIEW [FLB
2
FlutterApplication sharedApplication].flutterViewController.view
#define FLUTTER_VC [FLB
2
FlutterApplication sharedApplication].flutterViewController
#define FLUTTER_APP [FLB
2
FlutterApplication sharedApplication]
@interface
FLBFlutterViewContainer
()
@interface
FLB
2
FlutterViewContainer
()
@property
(
nonatomic
,
copy
,
readwrite
)
NSString
*
name
;
@property
(
nonatomic
,
strong
,
readwrite
)
NSDictionary
*
params
;
@property
(
nonatomic
,
assign
)
long
long
identifier
;
@end
@implementation
FLBFlutterViewContainer
@implementation
FLB
2
FlutterViewContainer
-
(
instancetype
)
init
{
...
...
@@ -119,7 +119,7 @@ static NSUInteger kInstanceCounter = 0;
pageName:
_name
params
:
_params
uniqueId:
[
self
uniqueIDString
]];
[[
FLBFlutterApplication
sharedApplication
]
removeViewController
:
self
];
[[
FLB
2
FlutterApplication
sharedApplication
]
removeViewController
:
self
];
[
self
.
class
instanceCounterDecrease
];
}
...
...
@@ -152,7 +152,7 @@ static NSUInteger kInstanceCounter = 0;
-
(
void
)
viewDidLayoutSubviews
{
[
super
viewDidLayoutSubviews
];
[[
FLBFlutterApplication
sharedApplication
]
resume
];
[[
FLB
2
FlutterApplication
sharedApplication
]
resume
];
}
-
(
void
)
viewWillAppear
:(
BOOL
)
animated
...
...
@@ -163,7 +163,7 @@ static NSUInteger kInstanceCounter = 0;
[
self
attatchFlutterEngine
];
}
[[
FLBFlutterApplication
sharedApplication
]
resume
];
[[
FLB
2
FlutterApplication
sharedApplication
]
resume
];
[
self
surfaceUpdated
:
YES
];
//For new page we should attach flutter view in view will appear
...
...
@@ -174,10 +174,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
];
...
...
@@ -218,16 +218,6 @@ static NSUInteger kInstanceCounter = 0;
[
super
viewDidDisappear
:
animated
];
}
#pragma mark - FLBViewControllerResultHandler
-
(
void
)
onRecievedResult
:(
NSDictionary
*
)
resultData
forKey
:(
NSString
*
)
key
{
[
Service_NavigationService
onNativePageResult
:
^
(
NSNumber
*
finished
)
{}
uniqueId:
self
.
uniqueIDString
key:
key
resultData:
resultData
params:
@{}];
}
-
(
void
)
installSplashScreenViewIfNecessary
{
//Do nothing.
}
...
...
This diff is collapsed.
Click to expand it.
ios/Classes/
Container/FLBViewControllerResultHandler
.h
→
ios/Classes/
1.5/FLBFactory
.h
100755 → 100644
View file @
185c1ff8
...
...
@@ -26,9 +26,8 @@
NS_ASSUME_NONNULL_BEGIN
@protocol
FLBViewControllerResultHandler
<
NSObject
>
@required
-
(
void
)
onRecievedResult
:(
NSDictionary
*
)
resultData
forKey
:(
NSString
*
)
key
;
@interface
FLBFactory
:
NSObject
@end
NS_ASSUME_NONNULL_END
This diff is collapsed.
Click to expand it.
ios/Classes/1.5/FLBFactory.m
0 → 100644
View file @
185c1ff8
//
// FLBFactory.m
// flutter_boost
//
// Created by Jidong Chen on 2019/6/11.
//
#import "FLBFactory.h"
@implementation
FLBFactory
@end
This diff is collapsed.
Click to expand it.
ios/Classes/Adaptor/FLBFlutterProviderFactory.m
deleted
100755 → 0
View file @
80bbf5c0
/*
* 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 "FLBFlutterProviderFactory.h"
#import "FLBFlutterEngine.h"
#import "FLBPlatform.h"
@implementation
FLBFlutterProviderFactory
-
(
id
<
FLBFlutterProvider
>
)
createViewProviderWithPlatform
:(
id
<
FLBPlatform
>
)
platform
{
return
[
FLBFlutterEngine
new
];
}
-
(
id
<
FLBFlutterProvider
>
)
createViewProvider
{
return
[
FLBFlutterEngine
new
];
}
@end
This diff is collapsed.
Click to expand it.
ios/Classes/
Adaptor/FLB
FlutterProvider.h
→
ios/Classes/
Boost/FLB2
FlutterProvider.h
View file @
185c1ff8
...
...
@@ -31,7 +31,7 @@ NS_ASSUME_NONNULL_BEGIN
#define RELEASE_1_0 1
@protocol
FLBFlutterProvider
<
NSObject
>
@protocol
FLB
2
FlutterProvider
<
NSObject
>
@required
-
(
FlutterEngine
*
)
engine
;
...
...
This diff is collapsed.
Click to expand it.
ios/Classes/Boost/FLBPlatform.h
→
ios/Classes/Boost/FLB
2
Platform.h
View file @
185c1ff8
...
...
@@ -26,7 +26,7 @@
NS_ASSUME_NONNULL_BEGIN
@protocol
FLBPlatform
<
NSObject
>
@protocol
FLB
2
Platform
<
NSObject
>
@optional
//Whether to enable accessibility support. Default value is Yes.
...
...
This diff is collapsed.
Click to expand it.
ios/Classes/Boost/FLBAbstractFactory.h
0 → 100644
View file @
185c1ff8
/*
* 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>
#import "FLBFlutterApplicationInterface.h"
#import "FLB2FlutterProvider.h"
#import "FLB2Platform.h"
#import "FLBFlutterContainer.h"
NS_ASSUME_NONNULL_BEGIN
@protocol
FLBAbstractFactory
<
NSObject
>
-
(
id
<
FLBFlutterApplicationInterface
>
)
createApplication
:(
id
<
FLB2Platform
>
)
platform
;
-
(
id
<
FLB2FlutterProvider
>
)
createFlutterProvider
:(
id
<
FLB2Platform
>
)
platform
;
-
(
id
<
FLBFlutterContainer
>
)
createFlutterContainer
;
@end
NS_ASSUME_NONNULL_END
This diff is collapsed.
Click to expand it.
ios/Classes/Boost/FLBAbstractFactory.m
0 → 100644
View file @
185c1ff8
//
// FLBAbstractFactory.m
// flutter_boost
//
// Created by Jidong Chen on 2019/6/11.
//
#import "FLBAbstractFactory.h"
@implementation
FLBAbstractFactory
@end
This diff is collapsed.
Click to expand it.
ios/Classes/Boost/FLBFlutterAppDelegate.m
View file @
185c1ff8
...
...
@@ -23,13 +23,13 @@
*/
#import "FLBFlutterAppDelegate.h"
#import "FLBFlutterApplication.h"
#import "FLB
2
FlutterApplication.h"
@implementation
FLBFlutterAppDelegate
// Returns the key window's rootViewController, if it's a FlutterViewController.
// Otherwise, returns nil.
-
(
FlutterViewController
*
)
rootFlutterViewController
{
return
FLBFlutterApplication
.
sharedApplication
.
flutterViewController
;
return
FLB
2
FlutterApplication
.
sharedApplication
.
flutterViewController
;
}
@end
This diff is collapsed.
Click to expand it.
ios/Classes/Boost/FLBFlutterApplicationInterface.h
0 → 100644
View file @
185c1ff8
/*
* 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>
#import <Flutter/Flutter.h>
#import "FLB2Platform.h"
#import "FlutterBoost.h"
#import "FLB2FlutterProvider.h"
#import "FLBFlutterContainer.h"
NS_ASSUME_NONNULL_BEGIN
@protocol
FLBFlutterApplicationInterface
<
NSObject
>
@property
(
nonatomic
,
strong
)
id
<
FLB2Platform
>
platform
;
-
(
id
<
FLB2FlutterProvider
>
)
flutterProvider
;
-
(
void
)
startFlutterWithPlatform
:(
id
<
FLB2Platform
>
)
platform
onStart
:(
void
(
^
)(
id
<
FlutterBinaryMessenger
,
FlutterTextureRegistry
,
FlutterPluginRegistry
>
engine
))
callback
;
-
(
FlutterViewController
*
)
flutterViewController
;
#pragma mark - Container Management
-
(
BOOL
)
contains
:(
id
<
FLBFlutterContainer
>
)
vc
;
-
(
void
)
addUniqueViewController
:(
id
<
FLBFlutterContainer
>
)
vc
;
-
(
void
)
removeViewController
:(
id
<
FLBFlutterContainer
>
)
vc
;
-
(
BOOL
)
isTop
:(
NSString
*
)
pageId
;
#pragma mark - App Control
-
(
void
)
pause
;
-
(
void
)
resume
;
-
(
void
)
inactive
;
-
(
BOOL
)
isRunning
;
@end
NS_ASSUME_NONNULL_END
This diff is collapsed.
Click to expand it.
ios/Classes/Boost/FLBFlutterContainer.h
0 → 100644
View file @
185c1ff8
//
// FLBFlutterContainer.h
// flutter_boost
//
// Created by Jidong Chen on 2019/6/11.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@protocol
FLBFlutterContainer
<
NSObject
>
-
(
NSString
*
)
name
;
-
(
NSDictionary
*
)
params
;
-
(
NSString
*
)
uniqueIDString
;
-
(
void
)
setName
:(
NSString
*
)
name
params
:(
NSDictionary
*
)
params
;
@end
NS_ASSUME_NONNULL_END
This diff is collapsed.
Click to expand it.
ios/Classes/
Container/FLBFlutterView
ContainerManager.h
→
ios/Classes/
Boost/FLBFlutter
ContainerManager.h
View file @
185c1ff8
...
...
@@ -23,16 +23,16 @@
*/
#import <Foundation/Foundation.h>
#import "FLBFlutter
View
Container.h"
#import "FLBFlutterContainer.h"
NS_ASSUME_NONNULL_BEGIN
@interface
FLBFlutter
View
ContainerManager
:
NSObject
@interface
FLBFlutterContainerManager
:
NSObject
-
(
NSString
*
)
peak
;
-
(
void
)
addUnique
:(
FLBFlutterViewContainer
*
)
vc
;
-
(
void
)
remove
:(
FLBFlutterViewContainer
*
)
vc
;
-
(
BOOL
)
contains
:(
FLBFlutterViewContainer
*
)
vc
;
-
(
void
)
addUnique
:(
id
<
FLBFlutterContainer
>
)
vc
;
-
(
void
)
remove
:(
id
<
FLBFlutterContainer
>
)
vc
;
-
(
BOOL
)
contains
:(
id
<
FLBFlutterContainer
>
)
vc
;
@end
...
...
This diff is collapsed.
Click to expand it.
ios/Classes/
Container/FLBFlutterView
ContainerManager.m
→
ios/Classes/
Boost/FLBFlutter
ContainerManager.m
View file @
185c1ff8
...
...
@@ -22,14 +22,14 @@
* THE SOFTWARE.
*/
#import "FLBFlutter
View
ContainerManager.h"
#import "FLBFlutterContainerManager.h"
@interface
FLBFlutter
View
ContainerManager
()
@interface
FLBFlutterContainerManager
()
@property
(
nonatomic
,
strong
)
NSMutableArray
*
idStk
;
@property
(
nonatomic
,
strong
)
NSMutableDictionary
*
existedID
;
@end
@implementation
FLBFlutter
View
ContainerManager
@implementation
FLBFlutterContainerManager
-
(
instancetype
)
init
{
...
...
@@ -41,7 +41,7 @@
return
self
;
}
-
(
BOOL
)
contains
:(
FLBFlutterViewContainer
*
)
vc
-
(
BOOL
)
contains
:(
id
<
FLBFlutterContainer
>
)
vc
{
if
(
vc
)
{
return
_existedID
[
vc
.
uniqueIDString
]?
YES
:
NO
;
...
...
@@ -50,7 +50,7 @@
return
NO
;
}
-
(
void
)
addUnique
:(
FLBFlutterViewContainer
*
)
vc
-
(
void
)
addUnique
:(
id
<
FLBFlutterContainer
>
)
vc
{
if
(
vc
)
{
if
(
!
_existedID
[
vc
.
uniqueIDString
]){
...
...
@@ -60,7 +60,7 @@
}
}
-
(
void
)
remove
:(
FLBFlutterViewContainer
*
)
vc
-
(
void
)
remove
:(
id
<
FLBFlutterContainer
>
)
vc
{
if
(
vc
)
{
[
_existedID
removeObjectForKey
:
vc
.
uniqueIDString
];
...
...
This diff is collapsed.
Click to expand it.
ios/Classes/Boost/FlutterBoost.h
View file @
185c1ff8
...
...
@@ -26,8 +26,11 @@
#define FlutterBoost_h
#import "FlutterBoostPlugin.h"
#import "FLBFlutterViewContainer.h"
#import "FLBPlatform.h"
#import "FLBFlutterAppDelegate.h"
//#import "FLBFlutterViewContainer.h"
//#import "FLBPlatform.h"
#import "FLB2FlutterViewContainer.h"
#import "FLB2Platform.h"
#endif
/* FlutterBoost_h */
This diff is collapsed.
Click to expand it.
ios/Classes/Boost/FlutterBoostConfig.m
deleted
100755 → 0
View file @
80bbf5c0
/*
* 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 "FlutterBoostConfig.h"
@interface
FlutterBoostConfig
()
@property
(
nonatomic
,
assign
)
BOOL
firstView
;
@end
@implementation
FlutterBoostConfig
+
(
instancetype
)
sharedInstance
{
static
FlutterBoostConfig
*
instance
=
nil
;
static
dispatch_once_t
onceToken
;
dispatch_once
(
&
onceToken
,
^
{
instance
=
[
self
new
];
instance
.
firstView
=
YES
;
});
return
instance
;
}
-
(
void
)
setFPageId
:(
NSString
*
)
fPageId
{
_fPageId
=
fPageId
;
_firstView
=
NO
;
}
-
(
BOOL
)
firstView
{
return
_firstView
;
}
@end
This diff is collapsed.
Click to expand it.
ios/Classes/Boost/FlutterBoostPlugin.h
View file @
185c1ff8
...
...
@@ -23,19 +23,16 @@
*/
#import <Flutter/Flutter.h>
#import "FLBFlutterViewContainer.h"
#import "FLBPlatform.h"
typedef
FLBFlutterViewContainer
*
(
^
FLBPageBuilder
)(
NSString
*
name
,
NSDictionary
*
params
);
#import "FLB2Platform.h"
@interface
FlutterBoostPlugin
:
NSObject
<
FlutterPlugin
>
#pragma mark - Initializer
-
(
void
)
setAccessibilityEnable
:(
BOOL
)
enable
;
#pragma mark - Initializer
+
(
instancetype
)
sharedInstance
;
-
(
void
)
startFlutterWithPlatform
:(
id
<
FLBPlatform
>
)
platform
onStart
:(
void
(
^
)(
FlutterEngine
*
))
callback
;
-
(
void
)
startFlutterWithPlatform
:(
id
<
FLB2Platform
>
)
platform
onStart
:(
void
(
^
)(
id
<
FlutterBinaryMessenger
,
FlutterTextureRegistry
,
FlutterPluginRegistry
>
engine
))
callback
;
#pragma mark - Some properties.
-
(
BOOL
)
isRunning
;
...
...
This diff is collapsed.
Click to expand it.
ios/Classes/Boost/FlutterBoostPlugin.m
View file @
185c1ff8
...
...
@@ -23,12 +23,9 @@
*/
#import "FlutterBoostPlugin.h"
#import "FLBFlutterApplication.h"
#import "FLB
2
FlutterApplication.h"
#import "FLBResultMediator.h"
@interface
FlutterBoostPlugin
()
@property
(
nonatomic
,
strong
)
FLBResultMediator
*
resultMediator
;
@end
#import "FlutterBoostPlugin_private.h"
@implementation
FlutterBoostPlugin
...
...
@@ -69,21 +66,24 @@
}
-
(
void
)
startFlutterWithPlatform
:(
id
<
FLBPlatform
>
)
platform
onStart
:(
void
(
^
)(
FlutterEngine
*
))
callback
;
-
(
void
)
startFlutterWithPlatform
:(
id
<
FLB2Platform
>
)
platform
onStart
:(
void
(
^
)(
id
<
FlutterBinaryMessenger
,
FlutterTextureRegistry
,
FlutterPluginRegistry
>
engine
))
callback
;
{
[
FLBFlutterApplication
.
sharedApplication
startFlutterWithPlatform
:
platform
//TODO:
[
FLB2FlutterApplication
.
sharedApplication
startFlutterWithPlatform
:
platform
onStart:
callback
];
}
-
(
BOOL
)
isRunning
{
return
[
FLBFlutterApplication
.
sharedApplication
isRunning
];
return
[
FLB
2
FlutterApplication
.
sharedApplication
isRunning
];
}
-
(
FlutterViewController
*
)
currentViewController
{
return
[[
FLBFlutterApplication
sharedApplication
]
flutterViewController
];
return
[[
FLB
2
FlutterApplication
sharedApplication
]
flutterViewController
];
}
-
(
void
)
openPage
:(
NSString
*
)
name
...
...
This diff is collapsed.
Click to expand it.
ios/Classes/Boost/FlutterBoost
Config
.h
→
ios/Classes/Boost/FlutterBoost
Plugin_private
.h
100755 → 100644
View file @
185c1ff8
...
...
@@ -21,20 +21,20 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#import <Flutter/Flutter.h>
NS_ASSUME_NONNULL_BEGIN
#import "FLBFlutterApplicationInterface.h"
#import "FLBResultMediator.h"
@interface
FlutterBoostPlugin
()
-
(
id
<
FLBFlutterApplicationInterface
>
)
application
;
@property
(
nonatomic
,
strong
)
FLBResultMediator
*
resultMediator
;
@interface
FlutterBoostConfig
:
NSObject
#pragma mark - Store first open page
//There are some cases first page messages could be lost.
//So we store the first page info for later usage.
+
(
instancetype
)
sharedInstance
;
@property
(
nonatomic
,
copy
)
NSString
*
fPagename
;
@property
(
nonatomic
,
copy
)
NSString
*
fPageId
;
@property
(
nonatomic
,
copy
)
NSString
*
fPagename
;
@property
(
nonatomic
,
strong
)
NSDictionary
*
fParams
;
-
(
BOOL
)
firstView
;
@end
NS_ASSUME_NONNULL_END
@end
This diff is collapsed.
Click to expand it.
ios/Classes/Container/FLBFlutterViewContainer.h
deleted
100755 → 0
View file @
80bbf5c0
/*
* 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 <UIKit/UIKit.h>
#import "FLBViewControllerResultHandler.h"
#import <Flutter/Flutter.h>
NS_ASSUME_NONNULL_BEGIN
@interface
FLBFlutterViewContainer
:
FlutterViewController
<
FLBViewControllerResultHandler
>
@property
(
nonatomic
,
copy
,
readonly
)
NSString
*
name
;
@property
(
nonatomic
,
strong
,
readonly
)
NSDictionary
*
params
;
@property
(
nonatomic
,
copy
,
readonly
)
NSString
*
uniqueIDString
;
/*
You must call this one time to set flutter page name
and params.
*/
-
(
void
)
setName
:(
NSString
*
)
name
params
:(
NSDictionary
*
)
params
;
-
(
void
)
flutterViewDidAppear
:(
NSDictionary
*
)
params
;
-
(
void
)
surfaceUpdated
:(
BOOL
)
appeared
;
@end
NS_ASSUME_NONNULL_END
This diff is collapsed.
Click to expand it.
ios/Classes/Messaging/Generated/NavigationService/handlers/NavigationService_closePage.mm
View file @
185c1ff8
...
...
@@ -26,7 +26,7 @@
#import "ServiceGateway.h"
#import "NavigationService_closePage.h"
#import "FLBFlutterApplication.h"
#import "FLB
2
FlutterApplication.h"
@implementation
NavigationService_closePage
...
...
@@ -37,7 +37,7 @@
animated
:(
NSNumber
*
)
animated
{
//Add your handler code here!
[[
FLBFlutterApplication
sharedApplication
].
platform
closePage
:
uniqueId
[[
FLB
2
FlutterApplication
sharedApplication
].
platform
closePage
:
uniqueId
animated:
animated
.
boolValue
params:
params
completion:
^
(
BOOL
finished
)
{
...
...
This diff is collapsed.
Click to expand it.
ios/Classes/Messaging/Generated/NavigationService/handlers/NavigationService_openPage.mm
View file @
185c1ff8
...
...
@@ -26,7 +26,7 @@
#import "ServiceGateway.h"
#import "NavigationService_openPage.h"
#import "FLBFlutterApplication.h"
#import "FLB
2
FlutterApplication.h"
#import "FlutterBoost.h"
#import "Service_NavigationService.h"
...
...
@@ -34,7 +34,7 @@
-
(
void
)
onCall
:(
void
(
^
)(
BOOL
))
result
pageName
:(
NSString
*
)
pageName
params
:(
NSDictionary
*
)
params
animated
:(
NSNumber
*
)
animated
{
[[
FLBFlutterApplication
sharedApplication
].
platform
openPage
:
pageName
[[
FLB
2
FlutterApplication
sharedApplication
].
platform
openPage
:
pageName
params:
params
animated:
animated
.
boolValue
completion:
^
(
BOOL
finished
)
{
...
...
This diff is collapsed.
Click to expand it.
ios/Classes/Messaging/Generated/NavigationService/handlers/NavigationService_pageOnStart.mm
View file @
185c1ff8
...
...
@@ -26,17 +26,16 @@
#import "ServiceGateway.h"
#import "NavigationService_pageOnStart.h"
#import "FLBFlutterApplication.h"
#import "FlutterBoostConfig.h"
#import "FlutterBoostPlugin_private.h"
@implementation
NavigationService_pageOnStart
-
(
void
)
onCall
:(
void
(
^
)(
NSDictionary
*
))
result
params
:(
NSDictionary
*
)
params
{
NSMutableDictionary
*
pageInfo
=
[
NSMutableDictionary
new
];
pageInfo
[
@"name"
]
=
[
FlutterBoost
Config
sharedInstance
].
fPagename
;
pageInfo
[
@"params"
]
=
[
FlutterBoost
Config
sharedInstance
].
fParams
;
pageInfo
[
@"uniqueId"
]
=
[
FlutterBoost
Config
sharedInstance
].
fPageId
;
pageInfo
[
@"name"
]
=
[
FlutterBoost
Plugin
sharedInstance
].
fPagename
;
pageInfo
[
@"params"
]
=
[
FlutterBoost
Plugin
sharedInstance
].
fParams
;
pageInfo
[
@"uniqueId"
]
=
[
FlutterBoost
Plugin
sharedInstance
].
fPageId
;
if
(
result
)
result
(
pageInfo
);
}
...
...
This diff is collapsed.
Click to expand it.
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