Commit 066e4741 authored by Jidong Chen's avatar Jidong Chen

code style opt

parent 0a4d2767
......@@ -35,7 +35,6 @@
#define FLUTTER_VIEW FLUTTER_APP.flutterViewController.view
#define FLUTTER_VC FLUTTER_APP.flutterViewController
@interface FLBFlutterViewContainer ()
@property (nonatomic,copy,readwrite) NSString *name;
@property (nonatomic,strong,readwrite) NSDictionary *params;
......
......@@ -28,7 +28,6 @@
NS_ASSUME_NONNULL_BEGIN
@interface FLB2Factory : NSObject<FLBAbstractFactory>
@end
NS_ASSUME_NONNULL_END
......@@ -33,5 +33,4 @@ NS_ASSUME_NONNULL_BEGIN
@interface FLB2FlutterApplication : NSObject<FLBFlutterApplicationInterface>
@property (nonatomic,strong) id<FLB2Platform> platform;
@end
NS_ASSUME_NONNULL_END
......@@ -26,8 +26,6 @@
#import "FLB2FlutterProvider.h"
NS_ASSUME_NONNULL_BEGIN
@interface FLB2FlutterEngine : NSObject<FLB2FlutterProvider>
@end
NS_ASSUME_NONNULL_END
......@@ -27,11 +27,7 @@
#import "FLBFlutterContainer.h"
NS_ASSUME_NONNULL_BEGIN
@interface FLB2FlutterViewContainer : FlutterViewController<FLBFlutterContainer>
- (void)surfaceUpdated:(BOOL)appeared;
@end
NS_ASSUME_NONNULL_END
......@@ -29,15 +29,11 @@
@class FlutterEngine;
NS_ASSUME_NONNULL_BEGIN
@protocol FLB2FlutterProvider <FLBFlutterViewProvider>
@required
- (FlutterEngine *)engine;
- (void)atacheToViewController:(FlutterViewController *)vc;
- (void)detach;
- (void)prepareEngineIfNeeded;
@end
NS_ASSUME_NONNULL_END
......@@ -26,9 +26,7 @@
#import "FLBPlatform.h"
NS_ASSUME_NONNULL_BEGIN
@protocol FLB2Platform <FLBPlatform>
@optional
- (BOOL)useBoost2;
......@@ -43,5 +41,4 @@ NS_ASSUME_NONNULL_BEGIN
exts:(NSDictionary *)exts
completion:(void (^)(BOOL finished))completion;
@end
NS_ASSUME_NONNULL_END
......@@ -30,13 +30,9 @@
#import "FLBFlutterContainer.h"
NS_ASSUME_NONNULL_BEGIN
@protocol FLBAbstractFactory <NSObject>
@required
- (id<FLBFlutterApplicationInterface>)createApplication:(id<FLB2Platform>)platform;
- (id<FLBFlutterContainer>)createFlutterContainer;
@end
NS_ASSUME_NONNULL_END
......@@ -25,12 +25,9 @@
#import <Flutter/Flutter.h>
NS_ASSUME_NONNULL_BEGIN
@interface FLBFlutterAppDelegate : FlutterAppDelegate
// Returns the key window's rootViewController, if it's a FlutterViewController.
// Otherwise, returns nil.
- (FlutterViewController*)rootFlutterViewController;
@end
NS_ASSUME_NONNULL_END
......@@ -31,5 +31,4 @@
- (FlutterViewController*)rootFlutterViewController {
return FlutterBoostPlugin.sharedInstance.application.flutterViewController;
}
@end
......@@ -21,7 +21,6 @@
* 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"
......@@ -29,10 +28,8 @@
#import "FLB2FlutterProvider.h"
#import "FLBFlutterContainer.h"
NS_ASSUME_NONNULL_BEGIN
@protocol FLBFlutterApplicationInterface <NSObject>
@property (nonatomic,strong) id<FLB2Platform> platform;
- (id<FLB2FlutterProvider>)flutterProvider;
......@@ -57,7 +54,6 @@ NS_ASSUME_NONNULL_BEGIN
- (BOOL)isRunning;
#pragma mark - handle messages
- (void)close:(NSString *)uid
result:(NSDictionary *)result
exts:(NSDictionary *)exts
......@@ -79,7 +75,6 @@ NS_ASSUME_NONNULL_BEGIN
uniqueId:(NSString *)uniqueId;
@end
NS_ASSUME_NONNULL_END
......@@ -26,12 +26,10 @@
#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
......@@ -26,7 +26,6 @@
#import "FLBFlutterContainer.h"
NS_ASSUME_NONNULL_BEGIN
@interface FLBFlutterContainerManager : NSObject
- (NSString *)peak;
......@@ -35,5 +34,4 @@ NS_ASSUME_NONNULL_BEGIN
- (BOOL)contains:(id<FLBFlutterContainer>)vc;
@end
NS_ASSUME_NONNULL_END
......@@ -25,7 +25,6 @@
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@protocol FLBPlatform <NSObject>
@required
......@@ -39,5 +38,4 @@ NS_ASSUME_NONNULL_BEGIN
params:(NSDictionary *)params
completion:(void (^)(BOOL finished))completion;
@end
NS_ASSUME_NONNULL_END
......@@ -27,16 +27,17 @@
#import "FLBTypes.h"
@interface FlutterBoostPlugin : NSObject<FlutterPlugin>
#pragma mark - Initializer
+ (instancetype)sharedInstance;
- (void)startFlutterWithPlatform:(id<FLB2Platform>)platform
onStart:(void (^)(id<FlutterBinaryMessenger, FlutterTextureRegistry, FlutterPluginRegistry> engine))callback;
onStart:(void (^)(id<FlutterBinaryMessenger,
FlutterTextureRegistry,
FlutterPluginRegistry> engine))callback;
#pragma mark - Some properties.
- (BOOL)isRunning;
- (FlutterViewController *)currentViewController;
#pragma mark - broadcast event to/from flutter
......@@ -45,5 +46,4 @@
- (FLBVoidCallback)addEventListener:(FLBEventListener)listner
forName:(NSString *)name;
@end
......@@ -30,13 +30,10 @@
id<FLBFlutterApplicationInterface> _application;
id<FLBAbstractFactory> _factory;
}
- (id<FLBFlutterApplicationInterface>)application;
- (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
......@@ -21,12 +21,9 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#import "BoostMessageChannel.h"
#import "FlutterBoostPlugin_private.h"
@implementation BoostMessageChannel
+ (NSMutableDictionary *)lists{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment