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
3d6192e9
Commit
3d6192e9
authored
Jun 13, 2019
by
xuanwu
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'f_gzc_navigation'
parents
d911ad60
62f44a98
Changes
21
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
199 additions
and
16 deletions
+199
-16
android/src/main/java/com/taobao/idlefish/flutterboost/NavigationService/NavigationServiceRegister.java
...terboost/NavigationService/NavigationServiceRegister.java
+1
-0
android/src/main/java/com/taobao/idlefish/flutterboost/NavigationService/NavigationService_flutterCanPop.java
...st/NavigationService/NavigationService_flutterCanPop.java
+52
-0
example/ios/.symlinks/plugins/flutter_boost
example/ios/.symlinks/plugins/flutter_boost
+1
-1
example/ios/.symlinks/plugins/xservice_kit
example/ios/.symlinks/plugins/xservice_kit
+1
-1
example/ios/Podfile.lock
example/ios/Podfile.lock
+5
-5
example/ios/Runner.xcodeproj/project.pbxproj
example/ios/Runner.xcodeproj/project.pbxproj
+0
-4
example/ios/Runner.xcworkspace/xcuserdata/zhongchengguo.xcuserdatad/UserInterfaceState.xcuserstate
.../zhongchengguo.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
example/ios/Runner.xcworkspace/xcuserdata/zhongchengguo.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
...chengguo.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
+5
-0
example/ios/Runner/DemoRouter.m
example/ios/Runner/DemoRouter.m
+5
-0
example/lib/main.dart
example/lib/main.dart
+6
-0
example/lib/simple_page_widgets.dart
example/lib/simple_page_widgets.dart
+4
-2
ios/Classes/Boost/FLBPlatform.h
ios/Classes/Boost/FLBPlatform.h
+3
-0
ios/Classes/Container/FLBFlutterViewContainer.m
ios/Classes/Container/FLBFlutterViewContainer.m
+2
-0
ios/Classes/Messaging/Generated/NavigationService/handlers/NavigationService_flutterCanPop.h
...igationService/handlers/NavigationService_flutterCanPop.h
+16
-0
ios/Classes/Messaging/Generated/NavigationService/handlers/NavigationService_flutterCanPop.mm
...gationService/handlers/NavigationService_flutterCanPop.mm
+35
-0
ios/Classes/Messaging/Generated/NavigationService/service/Service_NavigationService.h
...ted/NavigationService/service/Service_NavigationService.h
+3
-1
ios/Classes/Messaging/Generated/NavigationService/service/Service_NavigationService.mm
...ed/NavigationService/service/Service_NavigationService.mm
+10
-2
lib/AIOService/NavigationService/handlers/NavigationService_canPop.dart
.../NavigationService/handlers/NavigationService_canPop.dart
+39
-0
lib/AIOService/NavigationService/service/NavigationService.dart
...OService/NavigationService/service/NavigationService.dart
+6
-0
lib/AIOService/NavigationService/service/NavigationServiceRegister.dart
.../NavigationService/service/NavigationServiceRegister.dart
+2
-0
lib/container/container_manager.dart
lib/container/container_manager.dart
+3
-0
No files found.
android/src/main/java/com/taobao/idlefish/flutterboost/NavigationService/NavigationServiceRegister.java
View file @
3d6192e9
...
...
@@ -33,6 +33,7 @@
NavigationService_pageOnStart
.
register
();
NavigationService_openPage
.
register
();
NavigationService_closePage
.
register
();
NavigationService_flutterCanPop
.
register
();
}
}
\ No newline at end of file
android/src/main/java/com/taobao/idlefish/flutterboost/NavigationService/NavigationService_flutterCanPop.java
0 → 100644
View file @
3d6192e9
package
com.taobao.idlefish.flutterboost.NavigationService
;
import
android.util.Log
;
import
com.taobao.idlefish.flutterboost.FlutterBoostPlugin
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
fleamarket.taobao.com.xservicekit.handler.MessageHandler
;
import
fleamarket.taobao.com.xservicekit.handler.MessageResult
;
import
fleamarket.taobao.com.xservicekit.service.ServiceGateway
;
public
class
NavigationService_flutterCanPop
implements
MessageHandler
<
Boolean
>{
private
Object
mContext
=
null
;
private
boolean
onCall
(
MessageResult
<
Boolean
>
result
,
Boolean
canPop
){
return
true
;
}
@Override
public
boolean
onMethodCall
(
String
name
,
Map
args
,
MessageResult
<
Boolean
>
result
)
{
return
this
.
onCall
(
result
,(
Boolean
)
args
.
get
(
"canPop"
));
}
@Override
public
List
<
String
>
handleMessageNames
()
{
List
<
String
>
h
=
new
ArrayList
<>();
h
.
add
(
"flutterCanPop"
);
return
h
;
}
@Override
public
Object
getContext
()
{
return
mContext
;
}
@Override
public
void
setContext
(
Object
obj
)
{
mContext
=
obj
;
}
@Override
public
String
service
()
{
return
"NavigationService"
;
}
public
static
void
register
(){
ServiceGateway
.
sharedInstance
().
registerHandler
(
new
NavigationService_flutterCanPop
());
}
}
\ No newline at end of file
example/ios/.symlinks/plugins/flutter_boost
View file @
3d6192e9
/Users/jidong/Documents/opensource/flutter_boost
\ No newline at end of file
/Users/zhongchengguo/Desktop/flutter_boost
\ No newline at end of file
example/ios/.symlinks/plugins/xservice_kit
View file @
3d6192e9
/Users/jidong/.pub-cache/hosted/pub.dartlang.org/xservice_kit-0.0.27
\ No newline at end of file
/Users/zhongchengguo/.pub-cache/hosted/pub.flutter-io.cn/xservice_kit-0.0.29
\ No newline at end of file
example/ios/Podfile.lock
View file @
3d6192e9
...
...
@@ -8,20 +8,20 @@ PODS:
DEPENDENCIES:
- Flutter (from `.symlinks/flutter/ios`)
- flutter_boost (from `/Users/
jidong/Documents/opensource
/flutter_boost/ios`)
- xservice_kit (from `/Users/
jidong/.pub-cache/hosted/pub.dartlang.org/xservice_kit-0.0.27
/ios`)
- flutter_boost (from `/Users/
zhongchengguo/Desktop
/flutter_boost/ios`)
- xservice_kit (from `/Users/
zhongchengguo/.pub-cache/hosted/pub.flutter-io.cn/xservice_kit-0.0.29
/ios`)
EXTERNAL SOURCES:
Flutter:
:path: ".symlinks/flutter/ios"
flutter_boost:
:path: "/Users/
jidong/Documents/opensource
/flutter_boost/ios"
:path: "/Users/
zhongchengguo/Desktop
/flutter_boost/ios"
xservice_kit:
:path: "/Users/
jidong/.pub-cache/hosted/pub.dartlang.org/xservice_kit-0.0.27
/ios"
:path: "/Users/
zhongchengguo/.pub-cache/hosted/pub.flutter-io.cn/xservice_kit-0.0.29
/ios"
SPEC CHECKSUMS:
Flutter: 9d0fac939486c9aba2809b7982dfdbb47a7b0296
flutter_boost:
24249d12d924d858cf445a84949484bc08bca000
flutter_boost:
6a083f2f1b67f9b08724d6c4b280a099d1b40797
xservice_kit: a86c64372b3e41e7d8e9b1a0b9139866680f525c
PODFILE CHECKSUM: 2a757a7bdc03b37a2814666652fdff1cf694243f
...
...
example/ios/Runner.xcodeproj/project.pbxproj
View file @
3d6192e9
...
...
@@ -8,7 +8,6 @@
/* Begin PBXBuildFile section */
1498D2341E8E89220040F4C2
/* GeneratedPluginRegistrant.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
1498D2331E8E89220040F4C2
/* GeneratedPluginRegistrant.m */
;
};
2D5378261FAA1A9400D5DBA9
/* flutter_assets in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
2D5378251FAA1A9400D5DBA9
/* flutter_assets */
;
};
3B3967161E833CAA004F5970
/* AppFrameworkInfo.plist in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
3B3967151E833CAA004F5970
/* AppFrameworkInfo.plist */
;
};
3B80C3941E831B6300D905FE
/* App.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
3B80C3931E831B6300D905FE
/* App.framework */
;
};
3B80C3951E831B6300D905FE
/* App.framework in Embed Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
3B80C3931E831B6300D905FE
/* App.framework */
;
settings
=
{
ATTRIBUTES
=
(
CodeSignOnCopy
,
RemoveHeadersOnCopy
,
);
};
};
...
...
@@ -45,7 +44,6 @@
/* Begin PBXFileReference section */
1498D2321E8E86230040F4C2
/* GeneratedPluginRegistrant.h */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
GeneratedPluginRegistrant.h
;
sourceTree
=
"<group>"
;
};
1498D2331E8E89220040F4C2
/* GeneratedPluginRegistrant.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
GeneratedPluginRegistrant.m
;
sourceTree
=
"<group>"
;
};
2D5378251FAA1A9400D5DBA9
/* flutter_assets */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
folder
;
name
=
flutter_assets
;
path
=
Flutter/flutter_assets
;
sourceTree
=
SOURCE_ROOT
;
};
3B3967151E833CAA004F5970
/* AppFrameworkInfo.plist */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
text.plist.xml
;
name
=
AppFrameworkInfo.plist
;
path
=
Flutter/AppFrameworkInfo.plist
;
sourceTree
=
"<group>"
;
};
3B80C3931E831B6300D905FE
/* App.framework */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
wrapper.framework
;
name
=
App.framework
;
path
=
Flutter/App.framework
;
sourceTree
=
"<group>"
;
};
7AFA3C8E1D35360C0083082E
/* Release.xcconfig */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
text.xcconfig
;
name
=
Release.xcconfig
;
path
=
Flutter/Release.xcconfig
;
sourceTree
=
"<group>"
;
};
...
...
@@ -105,7 +103,6 @@
9740EEB11CF90186004384FC
/* Flutter */
=
{
isa
=
PBXGroup
;
children
=
(
2D5378251FAA1A9400D5DBA9
/* flutter_assets */
,
3B80C3931E831B6300D905FE
/* App.framework */
,
3B3967151E833CAA004F5970
/* AppFrameworkInfo.plist */
,
9740EEBA1CF902C7004384FC
/* Flutter.framework */
,
...
...
@@ -231,7 +228,6 @@
3B3967161E833CAA004F5970
/* AppFrameworkInfo.plist in Resources */
,
9740EEB41CF90195004384FC
/* Debug.xcconfig in Resources */
,
97C146FE1CF9000F007C117D
/* Assets.xcassets in Resources */
,
2D5378261FAA1A9400D5DBA9
/* flutter_assets in Resources */
,
97C146FC1CF9000F007C117D
/* Main.storyboard in Resources */
,
);
runOnlyForDeploymentPostprocessing
=
0
;
...
...
example/ios/Runner.xcworkspace/xcuserdata/zhongchengguo.xcuserdatad/UserInterfaceState.xcuserstate
0 → 100644
View file @
3d6192e9
File added
example/ios/Runner.xcworkspace/xcuserdata/zhongchengguo.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
0 → 100644
View file @
3d6192e9
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type =
"0"
version =
"2.0"
>
</Bucket>
example/ios/Runner/DemoRouter.m
View file @
3d6192e9
...
...
@@ -52,4 +52,9 @@
[
self
.
navigationController
popViewControllerAnimated
:
animated
];
}
}
-
(
void
)
flutterCanPop
:(
BOOL
)
canpop
{
self
.
navigationController
.
interactivePopGestureRecognizer
.
enabled
=
!
canpop
;
}
@end
example/lib/main.dart
View file @
3d6192e9
...
...
@@ -33,11 +33,17 @@ class _MyAppState extends State<MyApp> {
FlutterBoost
.
handleOnStartPage
();
}
Map
<
String
,
WidgetBuilder
>
routes
=
{
"second"
:
(
BuildContext
context
)
=>
SecondRouteWidget
(),
};
@override
Widget
build
(
BuildContext
context
)
{
return
MaterialApp
(
title:
'Flutter Boost example'
,
builder:
FlutterBoost
.
init
(
postPush:
_onRoutePushed
),
routes:
routes
,
home:
Container
());
}
...
...
example/lib/simple_page_widgets.dart
View file @
3d6192e9
...
...
@@ -12,7 +12,8 @@ class FirstRouteWidget extends StatelessWidget {
child:
RaisedButton
(
child:
Text
(
'Open second route'
),
onPressed:
()
{
FlutterBoost
.
singleton
.
openPage
(
"second"
,
{},
animated:
true
);
Navigator
.
pushNamed
(
context
,
"second"
);
// FlutterBoost.singleton.openPage("second", {}, animated: true);
},
),
),
...
...
@@ -31,7 +32,8 @@ class SecondRouteWidget extends StatelessWidget {
child:
RaisedButton
(
onPressed:
()
{
// Navigate back to first route when tapped.
FlutterBoost
.
singleton
.
closePageForContext
(
context
);
Navigator
.
pop
(
context
);
// FlutterBoost.singleton.closePageForContext(context);
},
child:
Text
(
'Go back!'
),
),
...
...
ios/Classes/Boost/FLBPlatform.h
View file @
3d6192e9
...
...
@@ -32,6 +32,9 @@ NS_ASSUME_NONNULL_BEGIN
//Whether to enable accessibility support. Default value is Yes.
-
(
BOOL
)
accessibilityEnable
;
// flutter模块是否还可以pop
-
(
void
)
flutterCanPop
:(
BOOL
)
canpop
;
@required
-
(
void
)
openPage
:(
NSString
*
)
name
params
:(
NSDictionary
*
)
params
...
...
ios/Classes/Container/FLBFlutterViewContainer.m
View file @
3d6192e9
...
...
@@ -283,6 +283,8 @@ static NSUInteger kInstanceCounter = 0;
//Invalidate obsolete screenshot.
[
FLBStackCache
.
sharedInstance
invalidate
:
self
.
uniqueIDString
];
[
Service_NavigationService
canPopPageName
:
_name
params
:
_params
uniqueId:
[
self
uniqueIDString
]];
}
#pragma mark - Life circle methods
...
...
ios/Classes/Messaging/Generated/NavigationService/handlers/NavigationService_flutterCanPop.h
0 → 100644
View file @
3d6192e9
//
// NavigationService_canPop.h
// flutter_boost
//
// Created by ZhongCheng Guo on 2019/6/5.
//
#import "FlutterServiceCallHandler.h"
NS_ASSUME_NONNULL_BEGIN
@interface
NavigationService_flutterCanPop
:
FlutterServiceCallHandler
@end
NS_ASSUME_NONNULL_END
ios/Classes/Messaging/Generated/NavigationService/handlers/NavigationService_flutterCanPop.mm
0 → 100644
View file @
3d6192e9
//
// NavigationService_canPop.m
// flutter_boost
//
// Created by ZhongCheng Guo on 2019/6/5.
//
#import "NavigationService_flutterCanPop.h"
#import "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
ios/Classes/Messaging/Generated/NavigationService/service/Service_NavigationService.h
View file @
3d6192e9
...
...
@@ -34,4 +34,6 @@
+
(
void
)
didDisappearPageContainer
:(
void
(
^
)(
NSNumber
*
))
result
pageName
:(
NSString
*
)
pageName
params
:(
NSDictionary
*
)
params
uniqueId
:(
NSString
*
)
uniqueId
;
+
(
void
)
didInitPageContainer
:(
void
(
^
)(
NSNumber
*
))
result
pageName
:(
NSString
*
)
pageName
params
:(
NSDictionary
*
)
params
uniqueId
:(
NSString
*
)
uniqueId
;
+
(
void
)
willDeallocPageContainer
:(
void
(
^
)(
NSNumber
*
))
result
pageName
:(
NSString
*
)
pageName
params
:(
NSDictionary
*
)
params
uniqueId
:(
NSString
*
)
uniqueId
;
@end
\ No newline at end of file
// 获取flutter的canPop
+
(
void
)
canPopPageName
:(
NSString
*
)
pageName
params
:(
NSDictionary
*
)
params
uniqueId
:(
NSString
*
)
uniqueId
;
@end
ios/Classes/Messaging/Generated/NavigationService/service/Service_NavigationService.mm
View file @
3d6192e9
...
...
@@ -136,6 +136,14 @@
}
}];
}
+
(
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
\ No newline at end of file
@end
lib/AIOService/NavigationService/handlers/NavigationService_canPop.dart
0 → 100644
View file @
3d6192e9
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
lib/AIOService/NavigationService/service/NavigationService.dart
View file @
3d6192e9
...
...
@@ -93,4 +93,10 @@
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
lib/AIOService/NavigationService/service/NavigationServiceRegister.dart
View file @
3d6192e9
...
...
@@ -30,6 +30,7 @@
import
'../handlers/NavigationService_didDisappearPageContainer.dart'
;
import
'../handlers/NavigationService_didInitPageContainer.dart'
;
import
'../handlers/NavigationService_willDeallocPageContainer.dart'
;
import
'../handlers/NavigationService_canPop.dart'
;
class
NavigationServiceRegister
{
...
...
@@ -43,6 +44,7 @@
NavigationService_didDisappearPageContainer
.
regsiter
();
NavigationService_didInitPageContainer
.
regsiter
();
NavigationService_willDeallocPageContainer
.
regsiter
();
NavigationService_canPop
.
regsiter
();
}
}
\ No newline at end of file
lib/container/container_manager.dart
View file @
3d6192e9
...
...
@@ -28,6 +28,7 @@ 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
'package:flutter_boost/container/navigator_observer.dart'
;
enum
ContainerOperation
{
Push
,
Onstage
,
Pop
,
Remove
}
...
...
@@ -100,6 +101,8 @@ class ContainerManagerState extends State<BoostContainerManager> {
assert
(
widget
.
initNavigator
!=
null
);
_onstage
=
BoostContainer
.
copy
(
widget
.
initNavigator
);
FlutterBoost
.
containerManager
.
navigatorObserver
.
addBoostNavigatorObserver
(
NavigatorCanPopObserver
());
WidgetsBinding
.
instance
.
addPostFrameCallback
((
_
)
{
setState
(()
{});
});
...
...
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