Commit ee90a5f5 authored by 余玠's avatar 余玠

re-organize the file structure for version 1.5

parent 68357859
......@@ -9,3 +9,4 @@ build/
pubspec.lock
.flutter-plugins
flutter
flutter_boost
PODS:
- Flutter (1.0.0)
- flutter_boost (0.0.1):
- Flutter
- xservice_kit
- xservice_kit (0.0.1):
- flutter_boost (0.0.2):
- Flutter
DEPENDENCIES:
- Flutter (from `.symlinks/flutter/ios`)
- flutter_boost (from `/Users/jidong/Documents/projects/Flutter/flutter_boost/ios`)
- xservice_kit (from `/Users/jidong/.pub-cache/hosted/pub.dartlang.org/xservice_kit-0.0.29/ios`)
- flutter_boost (from `/Users/yujie/Desktop/flutter/flutter_boost/ios`)
EXTERNAL SOURCES:
Flutter:
:path: ".symlinks/flutter/ios"
flutter_boost:
:path: "/Users/jidong/Documents/projects/Flutter/flutter_boost/ios"
xservice_kit:
:path: "/Users/jidong/.pub-cache/hosted/pub.dartlang.org/xservice_kit-0.0.29/ios"
:path: "/Users/yujie/Desktop/flutter/flutter_boost/ios"
SPEC CHECKSUMS:
Flutter: 9d0fac939486c9aba2809b7982dfdbb47a7b0296
flutter_boost: 6a083f2f1b67f9b08724d6c4b280a099d1b40797
xservice_kit: a86c64372b3e41e7d8e9b1a0b9139866680f525c
flutter_boost: 91c0b7bfc2f93528edc0658c8c539c595bd2d46f
PODFILE CHECKSUM: 2a757a7bdc03b37a2814666652fdff1cf694243f
......
......@@ -180,7 +180,6 @@
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
3FC74F80EA9D039C70D1F681 /* [CP] Embed Pods Frameworks */,
6CD183C8DCF5E8247072E2F6 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
......@@ -261,7 +260,7 @@
files = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
"${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
"${PODS_ROOT}/../.symlinks/flutter/ios/Flutter.framework",
);
name = "[CP] Embed Pods Frameworks";
......@@ -273,21 +272,6 @@
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
6CD183C8DCF5E8247072E2F6 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
showEnvVarsInLog = 0;
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
......@@ -317,7 +301,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
......
......@@ -11,8 +11,5 @@
@interface AppDelegate : FLBFlutterAppDelegate <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@end
This diff is collapsed.
......@@ -183,15 +183,6 @@
params:params
uniqueId:uniqueId];
}
+ (void)canPopPageName:(NSString *)pageName params:(NSDictionary *)params uniqueId:(NSString *)uniqueId{
NSMutableDictionary *tmp = [NSMutableDictionary dictionary];
if(pageName) tmp[@"pageName"] = pageName;
if(params) tmp[@"params"] = params;
if(uniqueId) tmp[@"uniqueId"] = uniqueId;
[self.service invoke:@"canPop" args:tmp result:^(id tTesult) {
}];
}
@end
/*
* 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.
*/
// Generated by AIOCodeGen do not edit!
#import <xservice_kit/FlutterServiceCallHandler.h>
@interface NavigationService_closePage : FlutterServiceCallHandler
@end
/*
* 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.
*/
//Generated by AIOCodeGen.
#import <xservice_kit/ServiceGateway.h>
#import "NavigationService_closePage.h"
#import "FLBFlutterApplication.h"
@implementation NavigationService_closePage
- (void)onCall:(void (^)(BOOL))result
uniqueId:(NSString *)uniqueId
pageName:(NSString *)pageName
params:(NSDictionary *)params
animated:(NSNumber *)animated
{
//Add your handler code here!
[[FLBFlutterApplication sharedApplication].platform closePage:uniqueId
animated:animated.boolValue
params:params
completion:^(BOOL finished) {
if(result) result(finished);
}];
}
#pragma mark - Do not edit these method.
- (void)__flutter_p_handler_closePage:(NSDictionary *)args result:(void (^)(BOOL))result {
[self onCall:result uniqueId:args[@"uniqueId"] pageName:args[@"pageName"] params:args[@"params"] animated:args[@"animated"]];
}
+ (void)load{
[[ServiceGateway sharedInstance] registerHandler:[NavigationService_closePage new]];
}
- (NSString *)returnType
{
return @"BOOL";
}
- (NSString *)service
{
return @"NavigationService";
}
@end
/*
* 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 <xservice_kit/FlutterServiceCallHandler.h>
NS_ASSUME_NONNULL_BEGIN
@interface NavigationService_flutterCanPop : FlutterServiceCallHandler
@end
NS_ASSUME_NONNULL_END
/*
* 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 "NavigationService_flutterCanPop.h"
#import <xservice_kit/ServiceGateway.h>
#import "FLBFlutterApplication.h"
#import "FlutterBoostConfig.h"
@implementation NavigationService_flutterCanPop
- (void)onCall:(void (^)(BOOL))result
canPop:(BOOL)canPop
{
//Add your handler code here!
if ([[FLBFlutterApplication sharedApplication].platform respondsToSelector:@selector(flutterCanPop:)]) {
[[FLBFlutterApplication sharedApplication].platform flutterCanPop:canPop];
}
}
#pragma mark - Do not edit these method.
- (void)__flutter_p_handler_flutterCanPop:(NSDictionary *)args result:(void (^)(BOOL))result {
[self onCall:result canPop:[args[@"canPop"] boolValue]];
}
+ (void)load{
[[ServiceGateway sharedInstance] registerHandler:[NavigationService_flutterCanPop new]];
}
- (NSString *)service
{
return @"NavigationService";
}
@end
/*
* 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.
*/
// Generated by AIOCodeGen do not edit!
#import <xservice_kit/FlutterServiceCallHandler.h>
@interface NavigationService_onFlutterPageResult : FlutterServiceCallHandler
@end
/*
* 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.
*/
//Generated by AIOCodeGen.
#import <xservice_kit/ServiceGateway.h>
#import "NavigationService_onFlutterPageResult.h"
#import "FlutterBoost.h"
@implementation NavigationService_onFlutterPageResult
- (void)onCall:(void (^)(BOOL))result uniqueId:(NSString *)uniqueId key:(NSString *)key resultData:(NSDictionary *)resultData params:(NSDictionary *)params
{
//Add your handler code here!
[FlutterBoostPlugin.sharedInstance onResultForKey:key
resultData:resultData
params:params];
}
#pragma mark - Do not edit these method.
- (void)__flutter_p_handler_onFlutterPageResult:(NSDictionary *)args result:(void (^)(BOOL))result {
[self onCall:result uniqueId:args[@"uniqueId"] key:args[@"key"] resultData:args[@"resultData"] params:args[@"params"]];
}
+ (void)load{
[[ServiceGateway sharedInstance] registerHandler:[NavigationService_onFlutterPageResult new]];
}
- (NSString *)returnType
{
return @"BOOL";
}
- (NSString *)service
{
return @"NavigationService";
}
@end
/*
* 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.
*/
// Generated by AIOCodeGen do not edit!
#import <xservice_kit/FlutterServiceCallHandler.h>
@interface NavigationService_onShownContainerChanged : FlutterServiceCallHandler
@end
/*
* 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.
*/
//Generated by AIOCodeGen.
#import <xservice_kit/ServiceGateway.h>
#import "NavigationService_onShownContainerChanged.h"
@implementation NavigationService_onShownContainerChanged
- (void)onCall:(void (^)(BOOL))result newName:(NSString *)newName oldName:(NSString *)oldName params:(NSDictionary *)params
{
if(newName){
[NSNotificationCenter.defaultCenter postNotificationName:@"flutter_boost_container_showed"
object:newName];
}
}
#pragma mark - Do not edit these method.
- (void)__flutter_p_handler_onShownContainerChanged:(NSDictionary *)args result:(void (^)(BOOL))result {
[self onCall:result newName:args[@"newName"] oldName:args[@"oldName"] params:args[@"params"]];
}
+ (void)load{
[[ServiceGateway sharedInstance] registerHandler:[NavigationService_onShownContainerChanged new]];
}
- (NSString *)returnType
{
return @"BOOL";
}
- (NSString *)service
{
return @"NavigationService";
}
@end
/*
* 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.
*/
// Generated by AIOCodeGen do not edit!
#import <xservice_kit/FlutterServiceCallHandler.h>
@interface NavigationService_openPage : FlutterServiceCallHandler
@end
/*
* 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.
*/
//Generated by AIOCodeGen.
#import <xservice_kit/ServiceGateway.h>
#import "NavigationService_openPage.h"
#import "FLBFlutterApplication.h"
#import "FlutterBoost.h"
#import "Service_NavigationService.h"
@implementation NavigationService_openPage
- (void)onCall:(void (^)(BOOL))result pageName:(NSString *)pageName params:(NSDictionary *)params animated:(NSNumber *)animated
{
[[FLBFlutterApplication sharedApplication].platform openPage:pageName
params:params
animated:animated.boolValue
completion:^(BOOL finished) {
if(result)result(YES);
}];
}
#pragma mark - Do not edit these method.
- (void)__flutter_p_handler_openPage:(NSDictionary *)args result:(void (^)(BOOL))result {
[self onCall:result pageName:args[@"pageName"] params:args[@"params"] animated:args[@"animated"]];
}
+ (void)load{
[[ServiceGateway sharedInstance] registerHandler:[NavigationService_openPage new]];
}
- (NSString *)returnType
{
return @"BOOL";
}
- (NSString *)service
{
return @"NavigationService";
}
@end
/*
* 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.
*/
// Generated by AIOCodeGen do not edit!
#import <xservice_kit/FlutterServiceCallHandler.h>
@interface NavigationService_pageOnStart : FlutterServiceCallHandler
@end
/*
* 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.
*/
//Generated by AIOCodeGen.
#import <xservice_kit/ServiceGateway.h>
#import "NavigationService_pageOnStart.h"
#import "FLBFlutterApplication.h"
#import "FlutterBoostConfig.h"
@implementation NavigationService_pageOnStart
- (void)onCall:(void (^)(NSDictionary *))result params:(NSDictionary *)params
{
NSMutableDictionary *pageInfo = [NSMutableDictionary new];
pageInfo[@"name"] =[FlutterBoostConfig sharedInstance].fPagename;
pageInfo[@"params"] = [FlutterBoostConfig sharedInstance].fParams;
pageInfo[@"uniqueId"] = [FlutterBoostConfig sharedInstance].fPageId;
if(result) result(pageInfo);
}
#pragma mark - Do not edit these method.
- (void)__flutter_p_handler_pageOnStart:(NSDictionary *)args result:(void (^)(NSDictionary *))result {
[self onCall:result params:args[@"params"]];
}
+ (void)load{
[[ServiceGateway sharedInstance] registerHandler:[NavigationService_pageOnStart new]];
}
- (NSString *)returnType
{
return @"NSDictionary *";
}
- (NSString *)service
{
return @"NavigationService";
}
@end
......@@ -71,7 +71,6 @@
}
}
static NSUInteger kInstanceCounter = 0;
+ (NSUInteger)instanceCounter
......
......@@ -22,7 +22,7 @@ A new Flutter plugin make flutter better to use!
'Classes/Boost/FLBTypes.h',
'Classes/Boost/FlutterBoost.h',
'Classes/Boost/BoostChannel.h',
'Classes/1.5/FLBFlutterViewContainer.h'
'Classes/container/FLBFlutterViewContainer.h'
s.dependency 'Flutter'
s.libraries = 'c++'
......
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:xservice_kit/ServiceCallHandler.dart';
import 'package:xservice_kit/ServiceGateway.dart';
import 'package:flutter_boost/flutter_boost.dart';
import 'package:flutter_boost/AIOService/NavigationService/service/NavigationService.dart';
class NavigationService_canPop extends ServiceCallHandler {
static void regsiter() {
ServiceGateway.sharedInstance()
.registerHandler(new NavigationService_canPop());
}
@override
String name() {
return "canPop";
}
@override
String service() {
return "NavigationService";
}
@override
Future<bool> onMethodCall(MethodCall call) {
return onCall(call.arguments["pageName"], call.arguments["params"],
call.arguments["uniqueId"]);
}
//==============================================Do not edit code above!
Future<bool> onCall(String pageName, Map params, String uniqueId) async {
NavigatorState navigator = FlutterBoost.containerManager.onstageContainer;
bool canPop = navigator.canPop();
NavigationService.flutterCanPop(canPop);
return true;
}
}
\ No newline at end of file
/*
* 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 'dart:async';
import 'package:xservice_kit/foundation_ext/foundation_ext.dart';
import 'package:xservice_kit/ServiceTemplate.dart';
import 'package:xservice_kit/ServiceGateway.dart';
class NavigationService {
static final ServiceTemplate _service =
new ServiceTemplate("NavigationService");
static void regsiter() {
ServiceGateway.sharedInstance().registerService(_service);
}
//List event from event channel.
static int listenEvent(void onData(dynamic event)) {
return _service.listenEvent(onData);
}
//Cancel event for subscription with ID.
static void cancelEventForSubscription(int subID) {
_service.cancelEventForSubscription(subID);
}
static Future<bool> onShownContainerChanged(String newName,String oldName,Map params) {
Map<String,dynamic> properties = new Map<String,dynamic>();
properties["newName"]=newName;
properties["oldName"]=oldName;
properties["params"]=params;
return _service.methodChannel().invokeMethod('onShownContainerChanged',properties).then<bool>((value){
return BOOL(value);
});
}
static Future<bool> onFlutterPageResult(String uniqueId,String key,Map resultData,Map params) {
Map<String,dynamic> properties = new Map<String,dynamic>();
properties["uniqueId"]=uniqueId;
properties["key"]=key;
properties["resultData"]=resultData;
properties["params"]=params;
return _service.methodChannel().invokeMethod('onFlutterPageResult',properties).then<bool>((value){
return BOOL(value);
});
}
static Future<Map> pageOnStart(Map params) async {
Map<String,dynamic> properties = new Map<String,dynamic>();
properties["params"]=params;
try {
return await _service.methodChannel().invokeMethod('pageOnStart',properties).then<Map>((value){
return value as Map;
});
} catch (e) {
print('Page on start exception');
return Future<Map>.value({});
}
}
static Future<bool> openPage(String pageName,Map params,bool animated) {
Map<String,dynamic> properties = new Map<String,dynamic>();
properties["pageName"]=pageName;
properties["params"]=params;
properties["animated"]=animated;
return _service.methodChannel().invokeMethod('openPage',properties).then<bool>((value){
return BOOL(value);
});
}
static Future<bool> closePage(String uniqueId,String pageName,Map params,bool animated) {
Map<String,dynamic> properties = new Map<String,dynamic>();
properties["uniqueId"]=uniqueId;
properties["pageName"]=pageName;
properties["params"]=params;
properties["animated"]=animated;
return _service.methodChannel().invokeMethod('closePage',properties).then<bool>((value){
return BOOL(value);
});
}
/// 通知原生模块flutter是否可以pop
static void flutterCanPop(bool canPop) {
Map<String,dynamic> properties = new Map<String,dynamic>();
properties["canPop"]=canPop;
_service.methodChannel().invokeMethod('flutterCanPop',properties);
}
}
\ No newline at end of file
/*
* 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 'NavigationService.dart';
import '../handlers/NavigationService_onNativePageResult.dart';
import '../handlers/NavigationService_didShowPageContainer.dart';
import '../handlers/NavigationService_willShowPageContainer.dart';
import '../handlers/NavigationService_willDisappearPageContainer.dart';
import '../handlers/NavigationService_didDisappearPageContainer.dart';
import '../handlers/NavigationService_didInitPageContainer.dart';
import '../handlers/NavigationService_willDeallocPageContainer.dart';
import '../handlers/NavigationService_canPop.dart';
class NavigationServiceRegister{
static register(){
NavigationService.regsiter();
NavigationService_onNativePageResult.regsiter();
NavigationService_didShowPageContainer.regsiter();
NavigationService_willShowPageContainer.regsiter();
NavigationService_willDisappearPageContainer.regsiter();
NavigationService_didDisappearPageContainer.regsiter();
NavigationService_didInitPageContainer.regsiter();
NavigationService_willDeallocPageContainer.regsiter();
NavigationService_canPop.regsiter();
}
}
\ No newline at end of file
......@@ -25,7 +25,7 @@ import 'package:flutter/material.dart';
import 'container_manager.dart';
import '../flutter_boost.dart';
import 'boost_page_route.dart';
import '../logger.dart';
import '../support/logger.dart';
enum ContainerLifeCycle {
Init,
......
......@@ -30,7 +30,7 @@ import 'package:flutter/services.dart';
import '../channel/boost_channel.dart';
import 'boost_container.dart';
import '../flutter_boost.dart';
import '../logger.dart';
import '../support/logger.dart';
class ContainerCoordinator {
static ContainerCoordinator get singleton => _instance;
......
......@@ -23,10 +23,10 @@
*/
import 'package:flutter/material.dart';
import 'package:flutter/scheduler.dart';
import 'package:flutter_boost/container/boost_container.dart';
import 'package:flutter_boost/container/container_coordinator.dart';
import 'package:flutter_boost/flutter_boost.dart';
import 'package:flutter_boost/support/logger.dart';
import 'boost_container.dart';
import 'container_coordinator.dart';
import '../flutter_boost.dart';
import '../support/logger.dart';
enum ContainerOperation { Push, Onstage, Pop, Remove }
......@@ -99,8 +99,6 @@ class ContainerManagerState extends State<BoostContainerManager> {
assert(widget.initNavigator != null);
_onstage = BoostContainer.copy(widget.initNavigator);
FlutterBoost.containerManager.navigatorObserver.addBoostNavigatorObserver(NavigatorCanPopObserver());
WidgetsBinding.instance.addPostFrameCallback((_) {
setState(() {});
});
......
import 'package:flutter_boost/container/boost_container.dart';
import 'package:flutter/material.dart';
import 'package:flutter_boost/AIOService/NavigationService/service/NavigationService.dart';
class NavigatorCanPopObserver extends BoostNavigatorObserver{
@override
void didPush(Route route, Route previousRoute) {
super.didPush(route, previousRoute);
_noticeCanPopToNative(route);
}
@override
void didPop(Route route, Route previousRoute) {
// TODO: implement didPop
super.didPop(route, previousRoute);
_noticeCanPopToNative(route);
}
_noticeCanPopToNative(Route route){
bool canPop = route.navigator.canPop();
NavigationService.flutterCanPop(canPop);
}
}
\ No newline at end of file
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