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
739e7b00
Commit
739e7b00
authored
Apr 22, 2019
by
Jidong Chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
opt
parent
bd13d022
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
41 additions
and
12 deletions
+41
-12
ios/Classes/Adaptor/FLBFlutterEngineOld.h
ios/Classes/Adaptor/FLBFlutterEngineOld.h
+3
-0
ios/Classes/Adaptor/FLBFlutterEngineOld.m
ios/Classes/Adaptor/FLBFlutterEngineOld.m
+11
-1
ios/Classes/Adaptor/FLBFlutterViewControllerAdaptor.m
ios/Classes/Adaptor/FLBFlutterViewControllerAdaptor.m
+9
-7
ios/Classes/Adaptor/FLBFlutterViewProvider.h
ios/Classes/Adaptor/FLBFlutterViewProvider.h
+1
-0
ios/Classes/Adaptor/FLBViewProviderFactory.h
ios/Classes/Adaptor/FLBViewProviderFactory.h
+2
-0
ios/Classes/Adaptor/FLBViewProviderFactory.m
ios/Classes/Adaptor/FLBViewProviderFactory.m
+10
-1
ios/Classes/Boost/FLBFlutterApplication.m
ios/Classes/Boost/FLBFlutterApplication.m
+1
-3
ios/Classes/Boost/FLBPlatform.h
ios/Classes/Boost/FLBPlatform.h
+4
-0
No files found.
ios/Classes/Adaptor/FLBFlutterEngineOld.h
View file @
739e7b00
...
@@ -24,11 +24,14 @@
...
@@ -24,11 +24,14 @@
#import <Foundation/Foundation.h>
#import <Foundation/Foundation.h>
#import "FLBFlutterViewProvider.h"
#import "FLBFlutterViewProvider.h"
#import "FLBPlatform.h"
NS_ASSUME_NONNULL_BEGIN
NS_ASSUME_NONNULL_BEGIN
@interface
FLBFlutterEngineOld
:
NSObject
<
FLBFlutterViewProvider
>
@interface
FLBFlutterEngineOld
:
NSObject
<
FLBFlutterViewProvider
>
-
(
instancetype
)
initWithPlatform
:(
id
<
FLBPlatform
>
)
platform
;
@end
@end
NS_ASSUME_NONNULL_END
NS_ASSUME_NONNULL_END
ios/Classes/Adaptor/FLBFlutterEngineOld.m
View file @
739e7b00
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
#import "FLBFlutterEngineOld.h"
#import "FLBFlutterEngineOld.h"
#import "FLBFlutterViewControllerAdaptor.h"
#import "FLBFlutterViewControllerAdaptor.h"
#import <objc/runtime.h>
@interface
FLBFlutterEngineOld
()
@interface
FLBFlutterEngineOld
()
@property
(
nonatomic
,
strong
)
FLBFlutterViewControllerAdaptor
*
viewController
;
@property
(
nonatomic
,
strong
)
FLBFlutterViewControllerAdaptor
*
viewController
;
...
@@ -31,13 +32,22 @@
...
@@ -31,13 +32,22 @@
@implementation
FLBFlutterEngineOld
@implementation
FLBFlutterEngineOld
-
(
instancetype
)
init
-
(
instancetype
)
init
WithPlatform
:(
id
<
FLBPlatform
>
)
platform
{
{
#pragma clang diagnostic push
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
if
(
self
=
[
super
init
])
{
if
(
self
=
[
super
init
])
{
Class
class
=
[
FLBFlutterViewControllerAdaptor
class
];
SEL
originalSelector
=
@selector
(
onAccessibilityStatusChanged
:
);
SEL
swizzledSelector
=
@selector
(
fixed_onAccessibilityStatusChanged
:
);
Method
originalMethod
=
class_getInstanceMethod
(
class
,
originalSelector
);
Method
swizzledMethod
=
class_getInstanceMethod
(
class
,
swizzledSelector
);
method_exchangeImplementations
(
originalMethod
,
swizzledMethod
);
_viewController
=
[
FLBFlutterViewControllerAdaptor
new
];
_viewController
=
[
FLBFlutterViewControllerAdaptor
new
];
_viewController
.
accessibilityEnable
=
[
platform
accessibilityEnable
];
[
_viewController
view
];
[
_viewController
view
];
Class
clazz
=
NSClassFromString
(
@"GeneratedPluginRegistrant"
);
Class
clazz
=
NSClassFromString
(
@"GeneratedPluginRegistrant"
);
if
(
clazz
)
{
if
(
clazz
)
{
...
...
ios/Classes/Adaptor/FLBFlutterViewControllerAdaptor.m
View file @
739e7b00
...
@@ -29,16 +29,11 @@
...
@@ -29,16 +29,11 @@
@end
@end
@implementation
FLBFlutterViewControllerAdaptor
@implementation
FLBFlutterViewControllerAdaptor
-
(
instancetype
)
init
-
(
instancetype
)
init
{
{
if
(
self
=
[
super
init
])
{
if
(
self
=
[
super
init
])
{
Class
class
=
[
self
class
];
SEL
originalSelector
=
@selector
(
onAccessibilityStatusChanged
:
);
SEL
swizzledSelector
=
@selector
(
fixed_onAccessibilityStatusChanged
:
);
Method
originalMethod
=
class_getInstanceMethod
(
class
,
originalSelector
);
Method
swizzledMethod
=
class_getInstanceMethod
(
class
,
swizzledSelector
);
method_exchangeImplementations
(
originalMethod
,
swizzledMethod
);
}
}
return
self
;
return
self
;
}
}
...
@@ -114,5 +109,12 @@
...
@@ -114,5 +109,12 @@
}
}
}
}
//- (void)onAccessibilityStatusChanged:(NSNotification*)notification {
//// if(self.accessibilityEnable){
//// [self fixed_onAccessibilityStatusChanged:notification];
//// }
//}
@end
@end
ios/Classes/Adaptor/FLBFlutterViewProvider.h
View file @
739e7b00
...
@@ -34,6 +34,7 @@ NS_ASSUME_NONNULL_BEGIN
...
@@ -34,6 +34,7 @@ NS_ASSUME_NONNULL_BEGIN
@required
@required
-
(
void
)
setAccessibilityEnable
:(
BOOL
)
enable
;
-
(
void
)
setAccessibilityEnable
:(
BOOL
)
enable
;
-
(
BOOL
)
accessibilityEnable
;
-
(
FlutterViewController
*
)
viewController
;
-
(
FlutterViewController
*
)
viewController
;
-
(
void
)
pause
;
-
(
void
)
pause
;
-
(
void
)
resume
;
-
(
void
)
resume
;
...
...
ios/Classes/Adaptor/FLBViewProviderFactory.h
View file @
739e7b00
...
@@ -25,12 +25,14 @@
...
@@ -25,12 +25,14 @@
#import <Foundation/Foundation.h>
#import <Foundation/Foundation.h>
#import "FLBFlutterViewProvider.h"
#import "FLBFlutterViewProvider.h"
#import "FLBPlatform.h"
NS_ASSUME_NONNULL_BEGIN
NS_ASSUME_NONNULL_BEGIN
@interface
FLBViewProviderFactory
:
NSObject
@interface
FLBViewProviderFactory
:
NSObject
-
(
id
<
FLBFlutterViewProvider
>
)
createViewProvider
;
-
(
id
<
FLBFlutterViewProvider
>
)
createViewProvider
;
-
(
id
<
FLBFlutterViewProvider
>
)
createViewProviderWithPlatform
:(
id
<
FLBPlatform
>
)
platform
;
@end
@end
...
...
ios/Classes/Adaptor/FLBViewProviderFactory.m
View file @
739e7b00
...
@@ -25,11 +25,20 @@
...
@@ -25,11 +25,20 @@
#import "FLBViewProviderFactory.h"
#import "FLBViewProviderFactory.h"
#import "FLBFlutterEngine.h"
#import "FLBFlutterEngine.h"
#import "FLBFlutterEngineOld.h"
#import "FLBFlutterEngineOld.h"
#import "FLBPlatform.h"
@implementation
FLBViewProviderFactory
@implementation
FLBViewProviderFactory
-
(
id
<
FLBFlutterViewProvider
>
)
createViewProviderWithPlatform
:(
id
<
FLBPlatform
>
)
platform
{
#if RELEASE_1_0
return
[
FLBFlutterEngine
new
];
#else
return
[[
FLBFlutterEngineOld
alloc
]
initWithPlatform
:
platform
];
#endif
}
-
(
id
<
FLBFlutterViewProvider
>
)
createViewProvider
-
(
id
<
FLBFlutterViewProvider
>
)
createViewProvider
{
{
#if RELEASE_1_0
#if RELEASE_1_0
...
...
ios/Classes/Boost/FLBFlutterApplication.m
View file @
739e7b00
...
@@ -61,7 +61,7 @@
...
@@ -61,7 +61,7 @@
static
dispatch_once_t
onceToken
;
static
dispatch_once_t
onceToken
;
dispatch_once
(
&
onceToken
,
^
{
dispatch_once
(
&
onceToken
,
^
{
self
.
platform
=
platform
;
self
.
platform
=
platform
;
self
.
viewProvider
=
[[
FLBViewProviderFactory
new
]
createViewProvider
];
self
.
viewProvider
=
[[
FLBViewProviderFactory
new
]
createViewProvider
WithPlatform
:
platform
];
[
self
.
viewProvider
resume
];
[
self
.
viewProvider
resume
];
self
.
isRendering
=
YES
;
self
.
isRendering
=
YES
;
self
.
isRunning
=
YES
;
self
.
isRunning
=
YES
;
...
@@ -110,8 +110,6 @@
...
@@ -110,8 +110,6 @@
}
}
-
(
BOOL
)
isTop
:(
NSString
*
)
pageId
-
(
BOOL
)
isTop
:(
NSString
*
)
pageId
{
{
return
[
_manager
.
peak
isEqual
:
pageId
];
return
[
_manager
.
peak
isEqual
:
pageId
];
...
...
ios/Classes/Boost/FLBPlatform.h
View file @
739e7b00
...
@@ -27,7 +27,11 @@
...
@@ -27,7 +27,11 @@
NS_ASSUME_NONNULL_BEGIN
NS_ASSUME_NONNULL_BEGIN
@protocol
FLBPlatform
<
NSObject
>
@protocol
FLBPlatform
<
NSObject
>
@required
@required
-
(
BOOL
)
accessibilityEnable
;
-
(
void
)
openPage
:(
NSString
*
)
name
-
(
void
)
openPage
:(
NSString
*
)
name
params
:(
NSDictionary
*
)
params
params
:(
NSDictionary
*
)
params
animated
:(
BOOL
)
animated
animated
:(
BOOL
)
animated
...
...
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