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
030f1738
Commit
030f1738
authored
Oct 18, 2019
by
余玠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
get rid of the singleton function of FLBFlutterApplication
parent
6b9c1239
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
33 deletions
+9
-33
ios/Classes/Boost/FlutterBoostPlugin.m
ios/Classes/Boost/FlutterBoostPlugin.m
+5
-15
ios/Classes/Boost/FlutterBoostPlugin_private.h
ios/Classes/Boost/FlutterBoostPlugin_private.h
+3
-6
ios/Classes/Engine/FLBFactory.m
ios/Classes/Engine/FLBFactory.m
+1
-1
ios/Classes/Engine/FLBFlutterApplication.h
ios/Classes/Engine/FLBFlutterApplication.h
+0
-1
ios/Classes/Engine/FLBFlutterApplication.m
ios/Classes/Engine/FLBFlutterApplication.m
+0
-10
No files found.
ios/Classes/Boost/FlutterBoostPlugin.m
View file @
030f1738
...
...
@@ -111,26 +111,16 @@
return
_instance
;
}
-
(
id
<
FLBFlutterApplicationInterface
>
)
application
{
return
_application
;
}
-
(
id
<
FLBAbstractFactory
>
)
factory
{
return
_factory
;
}
-
(
void
)
startFlutterWithPlatform
:(
id
<
FLBPlatform
>
)
platform
onStart
:(
void
(
^
)(
FlutterEngine
*
engine
))
callback
;
{
static
dispatch_once_t
onceToken
;
__weak
__typeof__
(
self
)
weakSelf
=
self
;
dispatch_once
(
&
onceToken
,
^
{
self
->
_factory
=
FLBFactory
.
new
;
self
->
_application
=
[
self
->
_factory
createApplication
:
platform
];
[
self
->
_application
startFlutterWithPlatform
:
platform
__strong
__typeof__
(
weakSelf
)
self
=
weakSelf
;
self
.
factory
=
FLBFactory
.
new
;
self
.
application
=
[
self
->
_factory
createApplication
:
platform
];
[
self
.
application
startFlutterWithPlatform
:
platform
onStart:
callback
];
});
}
...
...
ios/Classes/Boost/FlutterBoostPlugin_private.h
View file @
030f1738
...
...
@@ -26,14 +26,11 @@
#import "FLBFlutterApplicationInterface.h"
#import "FLBAbstractFactory.h"
#import "FlutterBoostPlugin.h"
@interface
FlutterBoostPlugin
(){
id
<
FLBFlutterApplicationInterface
>
_application
;
id
<
FLBAbstractFactory
>
_factory
;
}
@interface
FlutterBoostPlugin
()
@property
(
nonatomic
,
strong
)
id
<
FLBFlutterApplicationInterface
>
application
;
@property
(
nonatomic
,
strong
)
id
<
FLBAbstractFactory
>
factory
;
@property
(
nonatomic
,
strong
)
FlutterMethodChannel
*
methodChannel
;
@property
(
nonatomic
,
copy
)
NSString
*
fPageId
;
@property
(
nonatomic
,
copy
)
NSString
*
fPagename
;
@property
(
nonatomic
,
strong
)
NSDictionary
*
fParams
;
-
(
id
<
FLBFlutterApplicationInterface
>
)
application
;
-
(
id
<
FLBAbstractFactory
>
)
factory
;
@end
ios/Classes/Engine/FLBFactory.m
View file @
030f1738
...
...
@@ -30,7 +30,7 @@
-
(
id
<
FLBFlutterApplicationInterface
>
)
createApplication
:(
id
<
FLBPlatform
>
)
platform
{
return
[
FLBFlutterApplication
sharedApplication
];
return
[
FLBFlutterApplication
new
];
}
-
(
id
<
FLBFlutterContainer
>
)
createFlutterContainer
...
...
ios/Classes/Engine/FLBFlutterApplication.h
View file @
030f1738
...
...
@@ -30,6 +30,5 @@
NS_ASSUME_NONNULL_BEGIN
@interface
FLBFlutterApplication
:
NSObject
<
FLBFlutterApplicationInterface
>
+
(
FLBFlutterApplication
*
)
sharedApplication
;
@end
NS_ASSUME_NONNULL_END
ios/Classes/Engine/FLBFlutterApplication.m
View file @
030f1738
...
...
@@ -39,16 +39,6 @@
@implementation
FLBFlutterApplication
@synthesize
platform
;
+
(
FLBFlutterApplication
*
)
sharedApplication
{
static
FLBFlutterApplication
*
instance
=
nil
;
static
dispatch_once_t
onceToken
;
dispatch_once
(
&
onceToken
,
^
{
instance
=
[
self
new
];
});
return
instance
;
}
-
(
BOOL
)
isRunning
{
return
_isRunning
;
...
...
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