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
Jun 11, 2019
by
Jidong Chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1,rename
2,refactory
parent
80bbf5c0
Changes
27
Hide 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 @@
...
@@ -24,27 +24,28 @@
#import <Foundation/Foundation.h>
#import <Foundation/Foundation.h>
#import <Flutter/Flutter.h>
#import <Flutter/Flutter.h>
#import "FLBPlatform.h"
#import "FLB
2
Platform.h"
#import "FlutterBoost.h"
#import "FlutterBoost.h"
#import "FLBFlutterProvider.h"
#import "FLB2FlutterProvider.h"
#import "FLBFlutterApplicationInterface.h"
NS_ASSUME_NONNULL_BEGIN
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
#pragma mark - Getters
+
(
FLBFlutterApplication
*
)
sharedApplication
;
+
(
FLB
2
FlutterApplication
*
)
sharedApplication
;
-
(
void
)
startFlutterWithPlatform
:(
id
<
FLBPlatform
>
)
platform
-
(
void
)
startFlutterWithPlatform
:(
id
<
FLB
2
Platform
>
)
platform
onStart
:(
void
(
^
)(
FlutterEngine
*
_Nonnull
))
callback
;
onStart
:(
void
(
^
)(
FlutterEngine
*
_Nonnull
))
callback
;
-
(
FlutterViewController
*
)
flutterViewController
;
-
(
FlutterViewController
*
)
flutterViewController
;
#pragma mark - Container Management
#pragma mark - Container Management
-
(
BOOL
)
contains
:(
FLBFlutterViewContainer
*
)
vc
;
-
(
BOOL
)
contains
:(
FLB
2
FlutterViewContainer
*
)
vc
;
-
(
void
)
addUniqueViewController
:(
FLBFlutterViewContainer
*
)
vc
;
-
(
void
)
addUniqueViewController
:(
FLB
2
FlutterViewContainer
*
)
vc
;
-
(
void
)
removeViewController
:(
FLBFlutterViewContainer
*
)
vc
;
-
(
void
)
removeViewController
:(
FLB
2
FlutterViewContainer
*
)
vc
;
-
(
BOOL
)
isTop
:(
NSString
*
)
pageId
;
-
(
BOOL
)
isTop
:(
NSString
*
)
pageId
;
#pragma mark - App Control
#pragma mark - App Control
...
...
ios/Classes/
Boost/FLB
FlutterApplication.m
→
ios/Classes/
1.5/FLB2
FlutterApplication.m
View file @
185c1ff8
...
@@ -22,26 +22,24 @@
...
@@ -22,26 +22,24 @@
* THE SOFTWARE.
* THE SOFTWARE.
*/
*/
#import "FLBFlutterApplication.h"
#import "FLB
2
FlutterApplication.h"
#import "FlutterBoost.h"
#import "FlutterBoost.h"
#import "FLBFlutterViewContainerManager.h"
#import "FLBFlutterContainerManager.h"
#import "FLBFlutterProviderFactory.h"
@interface
FLBFlutterApplication
()
@interface
FLB
2
FlutterApplication
()
@property
(
nonatomic
,
strong
)
FLBFlutter
View
ContainerManager
*
manager
;
@property
(
nonatomic
,
strong
)
FLBFlutterContainerManager
*
manager
;
@property
(
nonatomic
,
strong
)
id
<
FLBFlutterProvider
>
viewProvider
;
@property
(
nonatomic
,
strong
)
id
<
FLB
2
FlutterProvider
>
viewProvider
;
@property
(
nonatomic
,
strong
)
NSMutableDictionary
*
pageBuilders
;
@property
(
nonatomic
,
strong
)
NSMutableDictionary
*
pageBuilders
;
@property
(
nonatomic
,
copy
)
FLBPageBuilder
defaultPageBuilder
;
@property
(
nonatomic
,
assign
)
BOOL
isRunning
;
@property
(
nonatomic
,
assign
)
BOOL
isRunning
;
@end
@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
;
static
dispatch_once_t
onceToken
;
dispatch_once
(
&
onceToken
,
^
{
dispatch_once
(
&
onceToken
,
^
{
instance
=
[
self
new
];
instance
=
[
self
new
];
...
@@ -59,13 +57,13 @@
...
@@ -59,13 +57,13 @@
return
_viewProvider
;
return
_viewProvider
;
}
}
-
(
void
)
startFlutterWithPlatform
:(
id
<
FLBPlatform
>
)
platform
-
(
void
)
startFlutterWithPlatform
:(
id
<
FLB
2
Platform
>
)
platform
onStart
:(
void
(
^
)(
FlutterEngine
*
_Nonnull
))
callback
onStart
:(
void
(
^
)(
FlutterEngine
*
_Nonnull
))
callback
{
{
static
dispatch_once_t
onceToken
;
static
dispatch_once_t
onceToken
;
dispatch_once
(
&
onceToken
,
^
{
dispatch_once
(
&
onceToken
,
^
{
self
.
platform
=
platform
;
self
.
platform
=
platform
;
self
.
viewProvider
=
[[
FLBFlutterProviderFactory
new
]
createViewProviderWithPlatform
:
platform
]
;
self
.
viewProvider
;
self
.
isRunning
=
YES
;
self
.
isRunning
=
YES
;
if
(
callback
)
callback
(
self
.
viewProvider
.
engine
);
if
(
callback
)
callback
(
self
.
viewProvider
.
engine
);
});
});
...
@@ -74,7 +72,7 @@
...
@@ -74,7 +72,7 @@
-
(
instancetype
)
init
-
(
instancetype
)
init
{
{
if
(
self
=
[
super
init
])
{
if
(
self
=
[
super
init
])
{
_manager
=
[
FLBFlutter
View
ContainerManager
new
];
_manager
=
[
FLBFlutterContainerManager
new
];
_pageBuilders
=
[
NSMutableDictionary
new
];
_pageBuilders
=
[
NSMutableDictionary
new
];
}
}
return
self
;
return
self
;
...
@@ -91,17 +89,17 @@
...
@@ -91,17 +89,17 @@
}
}
-
(
BOOL
)
contains
:(
FLBFlutterViewContainer
*
)
vc
-
(
BOOL
)
contains
:(
FLB
2
FlutterViewContainer
*
)
vc
{
{
return
[
_manager
contains
:
vc
];
return
[
_manager
contains
:
vc
];
}
}
-
(
void
)
addUniqueViewController
:(
FLBFlutterViewContainer
*
)
vc
-
(
void
)
addUniqueViewController
:(
FLB
2
FlutterViewContainer
*
)
vc
{
{
return
[
_manager
addUnique
:
vc
];
return
[
_manager
addUnique
:
vc
];
}
}
-
(
void
)
removeViewController
:(
FLBFlutterViewContainer
*
)
vc
-
(
void
)
removeViewController
:(
FLB
2
FlutterViewContainer
*
)
vc
{
{
return
[
_manager
remove
:
vc
];
return
[
_manager
remove
:
vc
];
}
}
...
...
ios/Classes/
Adaptor/FLB
FlutterEngine.h
→
ios/Classes/
1.5/FLB2
FlutterEngine.h
View file @
185c1ff8
...
@@ -23,11 +23,11 @@
...
@@ -23,11 +23,11 @@
*/
*/
#import <Foundation/Foundation.h>
#import <Foundation/Foundation.h>
#import "FLBFlutterProvider.h"
#import "FLB
2
FlutterProvider.h"
NS_ASSUME_NONNULL_BEGIN
NS_ASSUME_NONNULL_BEGIN
@interface
FLB
FlutterEngine
:
NSObject
<
FLB
FlutterProvider
>
@interface
FLB
2FlutterEngine
:
NSObject
<
FLB2
FlutterProvider
>
@end
@end
NS_ASSUME_NONNULL_END
NS_ASSUME_NONNULL_END
ios/Classes/
Adaptor/FLB
FlutterEngine.m
→
ios/Classes/
1.5/FLB2
FlutterEngine.m
View file @
185c1ff8
...
@@ -22,17 +22,17 @@
...
@@ -22,17 +22,17 @@
* THE SOFTWARE.
* THE SOFTWARE.
*/
*/
#import "FLBFlutterEngine.h"
#import "FLB
2
FlutterEngine.h"
#import <Flutter/Flutter.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
)
FlutterEngine
*
engine
;
@property
(
nonatomic
,
strong
)
FLBFlutterViewContainer
*
dummy
;
@property
(
nonatomic
,
strong
)
FLB
2
FlutterViewContainer
*
dummy
;
@end
@end
@implementation
FLBFlutterEngine
@implementation
FLB
2
FlutterEngine
-
(
instancetype
)
init
-
(
instancetype
)
init
{
{
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
if
(
self
=
[
super
init
])
{
if
(
self
=
[
super
init
])
{
_engine
=
[[
FlutterEngine
alloc
]
initWithName
:
@"io.flutter"
project
:
nil
];
_engine
=
[[
FlutterEngine
alloc
]
initWithName
:
@"io.flutter"
project
:
nil
];
[
_engine
runWithEntrypoint
:
nil
];
[
_engine
runWithEntrypoint
:
nil
];
_dummy
=
[[
FLBFlutterViewContainer
alloc
]
initWithEngine
:
_engine
_dummy
=
[[
FLB
2
FlutterViewContainer
alloc
]
initWithEngine
:
_engine
nibName:
nil
nibName:
nil
bundle:
nil
];
bundle:
nil
];
Class
clazz
=
NSClassFromString
(
@"GeneratedPluginRegistrant"
);
Class
clazz
=
NSClassFromString
(
@"GeneratedPluginRegistrant"
);
...
...
ios/Classes/
Adaptor/FLBFlutterProviderFactory
.h
→
ios/Classes/
1.5/FLB2FlutterViewContainer
.h
View file @
185c1ff8
...
@@ -22,17 +22,15 @@
...
@@ -22,17 +22,15 @@
* THE SOFTWARE.
* THE SOFTWARE.
*/
*/
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <Flutter/Flutter.h>
#import "FLBFlutterProvider.h"
#import "FLBFlutterContainer.h"
#import "FLBPlatform.h"
NS_ASSUME_NONNULL_BEGIN
NS_ASSUME_NONNULL_BEGIN
@interface
FLB
FlutterProviderFactory
:
NSObject
@interface
FLB
2FlutterViewContainer
:
FlutterViewController
<
FLBFlutterContainer
>
-
(
id
<
FLBFlutterProvider
>
)
createViewProvider
;
-
(
void
)
surfaceUpdated
:(
BOOL
)
appeared
;
-
(
id
<
FLBFlutterProvider
>
)
createViewProviderWithPlatform
:(
id
<
FLBPlatform
>
)
platform
;
@end
@end
...
...
ios/Classes/
Container/FLB
FlutterViewContainer.m
→
ios/Classes/
1.5/FLB2
FlutterViewContainer.m
View file @
185c1ff8
...
@@ -22,23 +22,23 @@
...
@@ -22,23 +22,23 @@
* THE SOFTWARE.
* THE SOFTWARE.
*/
*/
#import "FLBFlutterViewContainer.h"
#import "FLB
2
FlutterViewContainer.h"
#import "FLBFlutterApplication.h"
#import "FLB
2
FlutterApplication.h"
#import "Service_NavigationService.h"
#import "Service_NavigationService.h"
#import "F
lutterBoostConfig
.h"
#import "F
LBFlutterContainerManager
.h"
#import "F
LBFlutterViewContainerManager
.h"
#import "F
lutterBoostPlugin_private
.h"
#define FLUTTER_VIEW [FLBFlutterApplication sharedApplication].flutterViewController.view
#define FLUTTER_VIEW [FLB
2
FlutterApplication sharedApplication].flutterViewController.view
#define FLUTTER_VC [FLBFlutterApplication sharedApplication].flutterViewController
#define FLUTTER_VC [FLB
2
FlutterApplication sharedApplication].flutterViewController
#define FLUTTER_APP [FLBFlutterApplication sharedApplication]
#define FLUTTER_APP [FLB
2
FlutterApplication sharedApplication]
@interface
FLBFlutterViewContainer
()
@interface
FLB
2
FlutterViewContainer
()
@property
(
nonatomic
,
copy
,
readwrite
)
NSString
*
name
;
@property
(
nonatomic
,
copy
,
readwrite
)
NSString
*
name
;
@property
(
nonatomic
,
strong
,
readwrite
)
NSDictionary
*
params
;
@property
(
nonatomic
,
strong
,
readwrite
)
NSDictionary
*
params
;
@property
(
nonatomic
,
assign
)
long
long
identifier
;
@property
(
nonatomic
,
assign
)
long
long
identifier
;
@end
@end
@implementation
FLBFlutterViewContainer
@implementation
FLB
2
FlutterViewContainer
-
(
instancetype
)
init
-
(
instancetype
)
init
{
{
...
@@ -119,7 +119,7 @@ static NSUInteger kInstanceCounter = 0;
...
@@ -119,7 +119,7 @@ static NSUInteger kInstanceCounter = 0;
pageName:
_name
params
:
_params
pageName:
_name
params
:
_params
uniqueId:
[
self
uniqueIDString
]];
uniqueId:
[
self
uniqueIDString
]];
[[
FLBFlutterApplication
sharedApplication
]
removeViewController
:
self
];
[[
FLB
2
FlutterApplication
sharedApplication
]
removeViewController
:
self
];
[
self
.
class
instanceCounterDecrease
];
[
self
.
class
instanceCounterDecrease
];
}
}
...
@@ -152,7 +152,7 @@ static NSUInteger kInstanceCounter = 0;
...
@@ -152,7 +152,7 @@ static NSUInteger kInstanceCounter = 0;
-
(
void
)
viewDidLayoutSubviews
-
(
void
)
viewDidLayoutSubviews
{
{
[
super
viewDidLayoutSubviews
];
[
super
viewDidLayoutSubviews
];
[[
FLBFlutterApplication
sharedApplication
]
resume
];
[[
FLB
2
FlutterApplication
sharedApplication
]
resume
];
}
}
-
(
void
)
viewWillAppear
:(
BOOL
)
animated
-
(
void
)
viewWillAppear
:(
BOOL
)
animated
...
@@ -163,7 +163,7 @@ static NSUInteger kInstanceCounter = 0;
...
@@ -163,7 +163,7 @@ static NSUInteger kInstanceCounter = 0;
[
self
attatchFlutterEngine
];
[
self
attatchFlutterEngine
];
}
}
[[
FLBFlutterApplication
sharedApplication
]
resume
];
[[
FLB
2
FlutterApplication
sharedApplication
]
resume
];
[
self
surfaceUpdated
:
YES
];
[
self
surfaceUpdated
:
YES
];
//For new page we should attach flutter view in view will appear
//For new page we should attach flutter view in view will appear
...
@@ -174,10 +174,10 @@ static NSUInteger kInstanceCounter = 0;
...
@@ -174,10 +174,10 @@ static NSUInteger kInstanceCounter = 0;
params:
_params
params:
_params
uniqueId:
self
.
uniqueIDString
];
uniqueId:
self
.
uniqueIDString
];
//Save some first time page info.
//Save some first time page info.
if
(
!
[
FlutterBoost
Config
sharedInstance
].
fPagename
){
if
(
!
[
FlutterBoost
Plugin
sharedInstance
].
fPagename
){
[
FlutterBoost
Config
sharedInstance
].
fPagename
=
_name
;
[
FlutterBoost
Plugin
sharedInstance
].
fPagename
=
_name
;
[
FlutterBoost
Config
sharedInstance
].
fPageId
=
self
.
uniqueIDString
;
[
FlutterBoost
Plugin
sharedInstance
].
fPageId
=
self
.
uniqueIDString
;
[
FlutterBoost
Config
sharedInstance
].
fParams
=
_params
;
[
FlutterBoost
Plugin
sharedInstance
].
fParams
=
_params
;
}
}
[
super
viewWillAppear
:
animated
];
[
super
viewWillAppear
:
animated
];
...
@@ -218,16 +218,6 @@ static NSUInteger kInstanceCounter = 0;
...
@@ -218,16 +218,6 @@ static NSUInteger kInstanceCounter = 0;
[
super
viewDidDisappear
:
animated
];
[
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
{
-
(
void
)
installSplashScreenViewIfNecessary
{
//Do nothing.
//Do nothing.
}
}
...
...
ios/Classes/
Container/FLBViewControllerResultHandler
.h
→
ios/Classes/
1.5/FLBFactory
.h
100755 → 100644
View file @
185c1ff8
/*
/*
* The MIT License (MIT)
* The MIT License (MIT)
*
*
* Copyright (c) 2019 Alibaba Group
* Copyright (c) 2019 Alibaba Group
*
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* furnished to do so, subject to the following conditions:
*
*
* The above copyright notice and this permission notice shall be included in
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
* all copies or substantial portions of the Software.
*
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
...
@@ -26,9 +26,8 @@
...
@@ -26,9 +26,8 @@
NS_ASSUME_NONNULL_BEGIN
NS_ASSUME_NONNULL_BEGIN
@protocol
FLBViewControllerResultHandler
<
NSObject
>
@interface
FLBFactory
:
NSObject
@required
-
(
void
)
onRecievedResult
:(
NSDictionary
*
)
resultData
forKey
:(
NSString
*
)
key
;
@end
@end
NS_ASSUME_NONNULL_END
NS_ASSUME_NONNULL_END
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
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
ios/Classes/
Adaptor/FLB
FlutterProvider.h
→
ios/Classes/
Boost/FLB2
FlutterProvider.h
View file @
185c1ff8
...
@@ -31,7 +31,7 @@ NS_ASSUME_NONNULL_BEGIN
...
@@ -31,7 +31,7 @@ NS_ASSUME_NONNULL_BEGIN
#define RELEASE_1_0 1
#define RELEASE_1_0 1
@protocol
FLBFlutterProvider
<
NSObject
>
@protocol
FLB
2
FlutterProvider
<
NSObject
>
@required
@required
-
(
FlutterEngine
*
)
engine
;
-
(
FlutterEngine
*
)
engine
;
...
...
ios/Classes/Boost/FLBPlatform.h
→
ios/Classes/Boost/FLB
2
Platform.h
View file @
185c1ff8
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
NS_ASSUME_NONNULL_BEGIN
NS_ASSUME_NONNULL_BEGIN
@protocol
FLBPlatform
<
NSObject
>
@protocol
FLB
2
Platform
<
NSObject
>
@optional
@optional
//Whether to enable accessibility support. Default value is Yes.
//Whether to enable accessibility support. Default value is Yes.
...
...
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
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
ios/Classes/Boost/FLBFlutterAppDelegate.m
View file @
185c1ff8
...
@@ -23,13 +23,13 @@
...
@@ -23,13 +23,13 @@
*/
*/
#import "FLBFlutterAppDelegate.h"
#import "FLBFlutterAppDelegate.h"
#import "FLBFlutterApplication.h"
#import "FLB
2
FlutterApplication.h"
@implementation
FLBFlutterAppDelegate
@implementation
FLBFlutterAppDelegate
// Returns the key window's rootViewController, if it's a FlutterViewController.
// Returns the key window's rootViewController, if it's a FlutterViewController.
// Otherwise, returns nil.
// Otherwise, returns nil.
-
(
FlutterViewController
*
)
rootFlutterViewController
{
-
(
FlutterViewController
*
)
rootFlutterViewController
{
return
FLBFlutterApplication
.
sharedApplication
.
flutterViewController
;
return
FLB
2
FlutterApplication
.
sharedApplication
.
flutterViewController
;
}
}
@end
@end
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
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
ios/Classes/
Container/FLBFlutterView
ContainerManager.h
→
ios/Classes/
Boost/FLBFlutter
ContainerManager.h
View file @
185c1ff8
...
@@ -23,16 +23,16 @@
...
@@ -23,16 +23,16 @@
*/
*/
#import <Foundation/Foundation.h>
#import <Foundation/Foundation.h>
#import "FLBFlutter
View
Container.h"
#import "FLBFlutterContainer.h"
NS_ASSUME_NONNULL_BEGIN
NS_ASSUME_NONNULL_BEGIN
@interface
FLBFlutter
View
ContainerManager
:
NSObject
@interface
FLBFlutterContainerManager
:
NSObject
-
(
NSString
*
)
peak
;
-
(
NSString
*
)
peak
;
-
(
void
)
addUnique
:(
FLBFlutterViewContainer
*
)
vc
;
-
(
void
)
addUnique
:(
id
<
FLBFlutterContainer
>
)
vc
;
-
(
void
)
remove
:(
FLBFlutterViewContainer
*
)
vc
;
-
(
void
)
remove
:(
id
<
FLBFlutterContainer
>
)
vc
;
-
(
BOOL
)
contains
:(
FLBFlutterViewContainer
*
)
vc
;
-
(
BOOL
)
contains
:(
id
<
FLBFlutterContainer
>
)
vc
;
@end
@end
...
...
ios/Classes/
Container/FLBFlutterView
ContainerManager.m
→
ios/Classes/
Boost/FLBFlutter
ContainerManager.m
View file @
185c1ff8
...
@@ -22,14 +22,14 @@
...
@@ -22,14 +22,14 @@
* THE SOFTWARE.
* THE SOFTWARE.
*/
*/
#import "FLBFlutter
View
ContainerManager.h"
#import "FLBFlutterContainerManager.h"
@interface
FLBFlutter
View
ContainerManager
()
@interface
FLBFlutterContainerManager
()
@property
(
nonatomic
,
strong
)
NSMutableArray
*
idStk
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
idStk
;
@property
(
nonatomic
,
strong
)
NSMutableDictionary
*
existedID
;
@property
(
nonatomic
,
strong
)
NSMutableDictionary
*
existedID
;
@end
@end
@implementation
FLBFlutter
View
ContainerManager
@implementation
FLBFlutterContainerManager
-
(
instancetype
)
init
-
(
instancetype
)
init
{
{
...
@@ -41,7 +41,7 @@
...
@@ -41,7 +41,7 @@
return
self
;
return
self
;
}
}
-
(
BOOL
)
contains
:(
FLBFlutterViewContainer
*
)
vc
-
(
BOOL
)
contains
:(
id
<
FLBFlutterContainer
>
)
vc
{
{
if
(
vc
)
{
if
(
vc
)
{
return
_existedID
[
vc
.
uniqueIDString
]?
YES
:
NO
;
return
_existedID
[
vc
.
uniqueIDString
]?
YES
:
NO
;
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
return
NO
;
return
NO
;
}
}
-
(
void
)
addUnique
:(
FLBFlutterViewContainer
*
)
vc
-
(
void
)
addUnique
:(
id
<
FLBFlutterContainer
>
)
vc
{
{
if
(
vc
)
{
if
(
vc
)
{
if
(
!
_existedID
[
vc
.
uniqueIDString
]){
if
(
!
_existedID
[
vc
.
uniqueIDString
]){
...
@@ -60,7 +60,7 @@
...
@@ -60,7 +60,7 @@
}
}
}
}
-
(
void
)
remove
:(
FLBFlutterViewContainer
*
)
vc
-
(
void
)
remove
:(
id
<
FLBFlutterContainer
>
)
vc
{
{
if
(
vc
)
{
if
(
vc
)
{
[
_existedID
removeObjectForKey
:
vc
.
uniqueIDString
];
[
_existedID
removeObjectForKey
:
vc
.
uniqueIDString
];
...
...
ios/Classes/Boost/FlutterBoost.h
View file @
185c1ff8
...
@@ -26,8 +26,11 @@
...
@@ -26,8 +26,11 @@
#define FlutterBoost_h
#define FlutterBoost_h
#import "FlutterBoostPlugin.h"
#import "FlutterBoostPlugin.h"
#import "FLBFlutterViewContainer.h"
#import "FLBPlatform.h"
#import "FLBFlutterAppDelegate.h"
#import "FLBFlutterAppDelegate.h"
//#import "FLBFlutterViewContainer.h"
//#import "FLBPlatform.h"
#import "FLB2FlutterViewContainer.h"
#import "FLB2Platform.h"
#endif
/* FlutterBoost_h */
#endif
/* FlutterBoost_h */
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
ios/Classes/Boost/FlutterBoostPlugin.h
View file @
185c1ff8
...
@@ -23,19 +23,16 @@
...
@@ -23,19 +23,16 @@
*/
*/
#import <Flutter/Flutter.h>
#import <Flutter/Flutter.h>
#import "FLBFlutterViewContainer.h"
#import "FLB2Platform.h"
#import "FLBPlatform.h"
typedef
FLBFlutterViewContainer
*
(
^
FLBPageBuilder
)(
NSString
*
name
,
NSDictionary
*
params
);
@interface
FlutterBoostPlugin
:
NSObject
<
FlutterPlugin
>
@interface
FlutterBoostPlugin
:
NSObject
<
FlutterPlugin
>
#pragma mark - Initializer
-
(
void
)
setAccessibilityEnable
:(
BOOL
)
enable
;
#pragma mark - Initializer
+
(
instancetype
)
sharedInstance
;
+
(
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.
#pragma mark - Some properties.
-
(
BOOL
)
isRunning
;
-
(
BOOL
)
isRunning
;
...
...
ios/Classes/Boost/FlutterBoostPlugin.m
View file @
185c1ff8
...
@@ -23,12 +23,9 @@
...
@@ -23,12 +23,9 @@
*/
*/
#import "FlutterBoostPlugin.h"
#import "FlutterBoostPlugin.h"
#import "FLBFlutterApplication.h"
#import "FLB
2
FlutterApplication.h"
#import "FLBResultMediator.h"
#import "FLBResultMediator.h"
#import "FlutterBoostPlugin_private.h"
@interface
FlutterBoostPlugin
()
@property
(
nonatomic
,
strong
)
FLBResultMediator
*
resultMediator
;
@end
@implementation
FlutterBoostPlugin
@implementation
FlutterBoostPlugin
...
@@ -69,21 +66,24 @@
...
@@ -69,21 +66,24 @@
}
}
-
(
void
)
startFlutterWithPlatform
:(
id
<
FLBPlatform
>
)
platform
-
(
void
)
startFlutterWithPlatform
:(
id
<
FLB2Platform
>
)
platform
onStart
:(
void
(
^
)(
FlutterEngine
*
))
callback
;
onStart
:(
void
(
^
)(
id
<
FlutterBinaryMessenger
,
FlutterTextureRegistry
,
FlutterPluginRegistry
>
engine
))
callback
;
{
{
[
FLBFlutterApplication
.
sharedApplication
startFlutterWithPlatform
:
platform
//TODO:
[
FLB2FlutterApplication
.
sharedApplication
startFlutterWithPlatform
:
platform
onStart:
callback
];
onStart:
callback
];
}
}
-
(
BOOL
)
isRunning
-
(
BOOL
)
isRunning
{
{
return
[
FLBFlutterApplication
.
sharedApplication
isRunning
];
return
[
FLB
2
FlutterApplication
.
sharedApplication
isRunning
];
}
}
-
(
FlutterViewController
*
)
currentViewController
-
(
FlutterViewController
*
)
currentViewController
{
{
return
[[
FLBFlutterApplication
sharedApplication
]
flutterViewController
];
return
[[
FLB
2
FlutterApplication
sharedApplication
]
flutterViewController
];
}
}
-
(
void
)
openPage
:(
NSString
*
)
name
-
(
void
)
openPage
:(
NSString
*
)
name
...
...
ios/Classes/Boost/FlutterBoost
Config
.h
→
ios/Classes/Boost/FlutterBoost
Plugin_private
.h
100755 → 100644
View file @
185c1ff8
/*
/*
* The MIT License (MIT)
* The MIT License (MIT)
*
*
* Copyright (c) 2019 Alibaba Group
* Copyright (c) 2019 Alibaba Group
*
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* furnished to do so, subject to the following conditions:
*
*
* The above copyright notice and this permission notice shall be included in
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
* all copies or substantial portions of the Software.
*
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
...
@@ -21,20 +21,20 @@
...
@@ -21,20 +21,20 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
* 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
*
fPageId
;
@property
(
nonatomic
,
copy
)
NSString
*
fPagename
;
@property
(
nonatomic
,
strong
)
NSDictionary
*
fParams
;
@property
(
nonatomic
,
strong
)
NSDictionary
*
fParams
;
-
(
BOOL
)
firstView
;
@end
@end
NS_ASSUME_NONNULL_END
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
ios/Classes/Messaging/Generated/NavigationService/handlers/NavigationService_closePage.mm
View file @
185c1ff8
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
#import "ServiceGateway.h"
#import "ServiceGateway.h"
#import "NavigationService_closePage.h"
#import "NavigationService_closePage.h"
#import "FLBFlutterApplication.h"
#import "FLB
2
FlutterApplication.h"
@implementation
NavigationService_closePage
@implementation
NavigationService_closePage
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
animated
:(
NSNumber
*
)
animated
animated
:(
NSNumber
*
)
animated
{
{
//Add your handler code here!
//Add your handler code here!
[[
FLBFlutterApplication
sharedApplication
].
platform
closePage
:
uniqueId
[[
FLB
2
FlutterApplication
sharedApplication
].
platform
closePage
:
uniqueId
animated:
animated
.
boolValue
animated:
animated
.
boolValue
params:
params
params:
params
completion:
^
(
BOOL
finished
)
{
completion:
^
(
BOOL
finished
)
{
...
...
ios/Classes/Messaging/Generated/NavigationService/handlers/NavigationService_openPage.mm
View file @
185c1ff8
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
#import "ServiceGateway.h"
#import "ServiceGateway.h"
#import "NavigationService_openPage.h"
#import "NavigationService_openPage.h"
#import "FLBFlutterApplication.h"
#import "FLB
2
FlutterApplication.h"
#import "FlutterBoost.h"
#import "FlutterBoost.h"
#import "Service_NavigationService.h"
#import "Service_NavigationService.h"
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
-
(
void
)
onCall
:(
void
(
^
)(
BOOL
))
result
pageName
:(
NSString
*
)
pageName
params
:(
NSDictionary
*
)
params
animated
:(
NSNumber
*
)
animated
-
(
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
params:
params
animated:
animated
.
boolValue
animated:
animated
.
boolValue
completion:
^
(
BOOL
finished
)
{
completion:
^
(
BOOL
finished
)
{
...
...
ios/Classes/Messaging/Generated/NavigationService/handlers/NavigationService_pageOnStart.mm
View file @
185c1ff8
...
@@ -26,17 +26,16 @@
...
@@ -26,17 +26,16 @@
#import "ServiceGateway.h"
#import "ServiceGateway.h"
#import "NavigationService_pageOnStart.h"
#import "NavigationService_pageOnStart.h"
#import "FLBFlutterApplication.h"
#import "FlutterBoostPlugin_private.h"
#import "FlutterBoostConfig.h"
@implementation
NavigationService_pageOnStart
@implementation
NavigationService_pageOnStart
-
(
void
)
onCall
:(
void
(
^
)(
NSDictionary
*
))
result
params
:(
NSDictionary
*
)
params
-
(
void
)
onCall
:(
void
(
^
)(
NSDictionary
*
))
result
params
:(
NSDictionary
*
)
params
{
{
NSMutableDictionary
*
pageInfo
=
[
NSMutableDictionary
new
];
NSMutableDictionary
*
pageInfo
=
[
NSMutableDictionary
new
];
pageInfo
[
@"name"
]
=
[
FlutterBoost
Config
sharedInstance
].
fPagename
;
pageInfo
[
@"name"
]
=
[
FlutterBoost
Plugin
sharedInstance
].
fPagename
;
pageInfo
[
@"params"
]
=
[
FlutterBoost
Config
sharedInstance
].
fParams
;
pageInfo
[
@"params"
]
=
[
FlutterBoost
Plugin
sharedInstance
].
fParams
;
pageInfo
[
@"uniqueId"
]
=
[
FlutterBoost
Config
sharedInstance
].
fPageId
;
pageInfo
[
@"uniqueId"
]
=
[
FlutterBoost
Plugin
sharedInstance
].
fPageId
;
if
(
result
)
result
(
pageInfo
);
if
(
result
)
result
(
pageInfo
);
}
}
...
...
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