Commit 7d518c89 authored by 林生雨's avatar 林生雨

commit

parent 12d0bb1a
/Users/apple/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_boost-0.0.420
\ No newline at end of file
/Users/apple/.pub-cache/hosted/pub.flutter-io.cn/flutter_boost-0.0.420
\ No newline at end of file
/Users/apple/Downloads/flutter/.pub-cache/git/flutter_plugin-31f0e00d6a02ebbfa022be8770e397f36bcb10ce
\ No newline at end of file
/Users/apple/.pub-cache/git/flutter_plugin-31f0e00d6a02ebbfa022be8770e397f36bcb10ce
\ No newline at end of file
/Users/apple/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider-1.3.0
\ No newline at end of file
/Users/apple/.pub-cache/hosted/pub.flutter-io.cn/path_provider-1.3.0
\ No newline at end of file
/Users/apple/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/sqflite-1.1.6+5
\ No newline at end of file
/Users/apple/.pub-cache/hosted/pub.flutter-io.cn/sqflite-1.1.6+5
\ No newline at end of file
/Users/apple/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/xservice_kit-0.0.29
\ No newline at end of file
/Users/apple/.pub-cache/hosted/pub.flutter-io.cn/xservice_kit-0.0.29
\ No newline at end of file
......@@ -2,6 +2,21 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSCameraUsageDescription</key>
<string>照相机</string>
<key>NSContactsUsageDescription</key>
<string>contactsDesciption</string>
<key>NSMicrophoneUsageDescription</key>
<string>麦克风</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>相册11</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>相册</string>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -2,6 +2,21 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSCameraUsageDescription</key>
<string>照相机</string>
<key>NSContactsUsageDescription</key>
<string>contactsDesciption</string>
<key>NSMicrophoneUsageDescription</key>
<string>麦克风</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>相册11</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>相册</string>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
......
......@@ -61,7 +61,10 @@ FLUTTER_EXPORT
*/
- (void)sendOnChannel:(NSString*)channel
message:(NSData* _Nullable)message
binaryReply:(FlutterBinaryReply _Nullable)callback;
binaryReply:(FlutterBinaryReply _Nullable)callback
// TODO: Add macOS support for replies once
// https://github.com/flutter/flutter/issues/18852 is fixed.
API_UNAVAILABLE(macos);
/**
* Registers a message handler for incoming binary messages from the Flutter side
......
......@@ -103,7 +103,11 @@ FLUTTER_EXPORT
* @param message The message. Must be supported by the codec of this channel.
* @param callback A callback to be invoked with the message reply from Flutter.
*/
- (void)sendMessage:(id _Nullable)message reply:(FlutterReply _Nullable)callback;
- (void)sendMessage:(id _Nullable)message
reply:(FlutterReply _Nullable)callback
// TODO: Add macOS support for replies once
// https://github.com/flutter/flutter/issues/18852 is fixed.
API_UNAVAILABLE(macos);
/**
* Registers a message handler with this channel.
......
......@@ -38,7 +38,8 @@
* One of these methods must be invoked before calling `-setViewController:`.
*/
FLUTTER_EXPORT
@interface FlutterEngine : NSObject <FlutterTextureRegistry, FlutterPluginRegistry>
@interface FlutterEngine
: NSObject <FlutterBinaryMessenger, FlutterTextureRegistry, FlutterPluginRegistry>
/**
* Initialize this FlutterEngine with a `FlutterDartProject`.
*
......@@ -236,19 +237,6 @@ FLUTTER_EXPORT
*/
@property(nonatomic, readonly) NSURL* observatoryUrl;
/**
* The `FlutterBinaryMessenger` associated with this FlutterEngine (used for communicating with
* channels).
*/
@property(nonatomic, readonly) NSObject<FlutterBinaryMessenger>* binaryMessenger;
/**
* The UI Isolate ID of of the engine.
*
* This property will be nil if the engine is not running.
*/
@property(nonatomic, readonly, copy) NSString* isolateId;
@end
#endif // FLUTTER_FLUTTERENGINE_H_
......@@ -21,7 +21,7 @@ FLUTTER_EXPORT
*
* `delegate` will only referenced weakly.
*/
- (void)addDelegate:(NSObject<FlutterApplicationLifeCycleDelegate>*)delegate;
- (void)addDelegate:(NSObject<FlutterPlugin>*)delegate;
/**
* Calls all plugins registered for `UIApplicationDelegate` callbacks.
......@@ -39,6 +39,31 @@ FLUTTER_EXPORT
- (BOOL)application:(UIApplication*)application
willFinishLaunchingWithOptions:(NSDictionary*)launchOptions;
/**
* Calls all plugins registered for `UIApplicationDelegate` callbacks.
*/
- (void)applicationDidBecomeActive:(UIApplication*)application;
/**
* Calls all plugins registered for `UIApplicationDelegate` callbacks.
*/
- (void)applicationWillResignActive:(UIApplication*)application;
/**
* Calls all plugins registered for `UIApplicationDelegate` callbacks.
*/
- (void)applicationDidEnterBackground:(UIApplication*)application;
/**
* Calls all plugins registered for `UIApplicationDelegate` callbacks.
*/
- (void)applicationWillEnterForeground:(UIApplication*)application;
/**
* Calls all plugins registered for `UIApplicationDelegate` callbacks.
*/
- (void)applicationWillTerminate:(UIApplication*)application;
/**
* Called if this plugin has been registered for `UIApplicationDelegate` callbacks.
*/
......
......@@ -29,21 +29,20 @@ extern NSNotificationName const FlutterSemanticsUpdateNotification;
/**
* A `UIViewController` implementation for Flutter views.
*
* Dart execution, channel communication, texture registration, and plugin registration are all
* handled by `FlutterEngine`. Calls on this class to those members all proxy through to the
* `FlutterEngine` attached FlutterViewController.
* Dart execution, channel communication, texture registration, and plugin registration
* are all handled by `FlutterEngine`. Calls on this class to those members all proxy
* through to the `FlutterEngine` attached FlutterViewController.
*
* A FlutterViewController can be initialized either with an already-running `FlutterEngine` via
* the `initWithEngine:` initializer, or it can be initialized with a `FlutterDartProject` that
* will be used to implicitly spin up a new `FlutterEngine`. Creating a `FlutterEngine before
* showing a `FlutterViewController` can be used to pre-initialize the Dart VM and to prepare the
* isolate in order to reduce the latency to the first rendered frame. Holding a `FlutterEngine`
* independently of FlutterViewControllers can also be used to not to lose Dart-related state and
* asynchronous tasks when navigating back and forth between a FlutterViewController and other
* `UIViewController`s.
* A FlutterViewController can be initialized either with an already-running `FlutterEngine`,
* or it can be initialized with a `FlutterDartProject` that will be used to spin up
* a new `FlutterEngine`. Developers looking to present and hide FlutterViewControllers
* in native iOS applications will usually want to maintain the `FlutterEngine` instance
* so as not to lose Dart-related state and asynchronous tasks when navigating back and
* forth between a FlutterViewController and other `UIViewController`s.
*/
FLUTTER_EXPORT
@interface FlutterViewController : UIViewController <FlutterTextureRegistry, FlutterPluginRegistry>
@interface FlutterViewController
: UIViewController <FlutterBinaryMessenger, FlutterTextureRegistry, FlutterPluginRegistry>
/**
* Initializes this FlutterViewController with the specified `FlutterEngine`.
......@@ -132,14 +131,6 @@ FLUTTER_EXPORT
*/
- (id<FlutterPluginRegistry>)pluginRegistry;
/**
* True if at least one frame has rendered and the ViewController has appeared.
*
* This property is reset to false when the ViewController disappears. It is
* guaranteed to only alternate between true and false for observers.
*/
@property(nonatomic, readonly, getter=isDisplayingFlutterUI) BOOL displayingFlutterUI;
/**
* Specifies the view to use as a splash screen. Flutter's rendering is asynchronous, so the first
* frame rendered by the Flutter application might not immediately appear when theFlutter view is
......@@ -174,14 +165,6 @@ FLUTTER_EXPORT
*/
@property(weak, nonatomic, readonly) FlutterEngine* engine;
/**
* The `FlutterBinaryMessenger` associated with this FlutterViewController (used for communicating
* with channels).
*
* This is just a convenient way to get the |FlutterEngine|'s binary messenger.
*/
@property(nonatomic, readonly) NSObject<FlutterBinaryMessenger>* binaryMessenger;
@end
#endif // FLUTTER_FLUTTERVIEWCONTROLLER_H_
......@@ -22,9 +22,5 @@
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>8.0</string>
<key>FlutterEngine</key>
<string>b863200c37df4ed378042de11c4e9ff34e4e58c9</string>
<key>ClangVersion</key>
<string>Fuchsia clang version 8.0.0 (based on LLVM 8.0.0svn)</string>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>files</key>
<dict>
<key>Headers/Flutter.h</key>
<data>
LQBk1GD+u1YEANQovLVv2R/uUag=
</data>
<key>Headers/FlutterAppDelegate.h</key>
<data>
VQRY5CUL6CLzdXzfScbDvTdpElA=
</data>
<key>Headers/FlutterBinaryMessenger.h</key>
<data>
3TKVS3KoBmkupZxin9YbnrPtMCk=
</data>
<key>Headers/FlutterCallbackCache.h</key>
<data>
v6UEJmd8GTKddiiNFrVRsY9DAZo=
</data>
<key>Headers/FlutterChannels.h</key>
<data>
VA9uQqBQMxHCYJHnGCv1UPch4S0=
</data>
<key>Headers/FlutterCodecs.h</key>
<data>
/PGN0simzUo4u/YhIKuBq/r8rww=
</data>
<key>Headers/FlutterDartProject.h</key>
<data>
buhHk6WXrZ6JBOHQgjXCYITi+xU=
</data>
<key>Headers/FlutterEngine.h</key>
<data>
AdZsTJVwLyqWvLg0GGXL63DxLwA=
</data>
<key>Headers/FlutterHeadlessDartRunner.h</key>
<data>
M8/dhQH3VcQVHupUxQ1dGsbG3Ek=
</data>
<key>Headers/FlutterMacros.h</key>
<data>
Ez4684e7XzQ8vidzmRvJh3qCNxk=
</data>
<key>Headers/FlutterPlatformViews.h</key>
<data>
14j1xmP4V+DT37g/he3ZhpoeOig=
</data>
<key>Headers/FlutterPlugin.h</key>
<data>
maoHSos7SW7cnlOzz+gFyKQiG/s=
</data>
<key>Headers/FlutterPluginAppLifeCycleDelegate.h</key>
<data>
gctJ/r455gE8/rQYDs4lB3RUOkI=
</data>
<key>Headers/FlutterTexture.h</key>
<data>
1LdQETkD4xmsSZETVBywMxxLPwM=
</data>
<key>Headers/FlutterViewController.h</key>
<data>
1iNZtmSzviLXO3AyP98IfgOStLs=
</data>
<key>Info.plist</key>
<data>
mmIimfQR8J/7o8WT4YOSt84JO2I=
</data>
<key>Modules/module.modulemap</key>
<data>
wJV5dCKEGl+FAtDc8wJJh/fvKXs=
</data>
<key>icudtl.dat</key>
<data>
cjDelfr3ugTDn3+r5icq6Ge1n4Q=
</data>
</dict>
<key>files2</key>
<dict>
<key>Headers/Flutter.h</key>
<dict>
<key>hash</key>
<data>
LQBk1GD+u1YEANQovLVv2R/uUag=
</data>
<key>hash2</key>
<data>
8ZWbAXinM+GRkpUfLzcvsat4nccJ7ZNgGrAhy0iglXs=
</data>
</dict>
<key>Headers/FlutterAppDelegate.h</key>
<dict>
<key>hash</key>
<data>
VQRY5CUL6CLzdXzfScbDvTdpElA=
</data>
<key>hash2</key>
<data>
TYSAedf2/9SM/60199M+eUXHFYq5f85akCVmksptiNg=
</data>
</dict>
<key>Headers/FlutterBinaryMessenger.h</key>
<dict>
<key>hash</key>
<data>
3TKVS3KoBmkupZxin9YbnrPtMCk=
</data>
<key>hash2</key>
<data>
USlivwosbaNJJAtX2mpOdBVwZE9osgj/I3NnC9DCS04=
</data>
</dict>
<key>Headers/FlutterCallbackCache.h</key>
<dict>
<key>hash</key>
<data>
v6UEJmd8GTKddiiNFrVRsY9DAZo=
</data>
<key>hash2</key>
<data>
5i4mQAU2+ZEryb3POeTu9hkEM1IZkS/uLLxqLrcXRv0=
</data>
</dict>
<key>Headers/FlutterChannels.h</key>
<dict>
<key>hash</key>
<data>
VA9uQqBQMxHCYJHnGCv1UPch4S0=
</data>
<key>hash2</key>
<data>
Vjqn7PZHV00y0Cwe+UNlt+OGrzooaDBa5tZfqKvrAIY=
</data>
</dict>
<key>Headers/FlutterCodecs.h</key>
<dict>
<key>hash</key>
<data>
/PGN0simzUo4u/YhIKuBq/r8rww=
</data>
<key>hash2</key>
<data>
GbPPDQfdsjagMceW1kC1jPNF+b4DsZJtbTzbB4ohtR8=
</data>
</dict>
<key>Headers/FlutterDartProject.h</key>
<dict>
<key>hash</key>
<data>
buhHk6WXrZ6JBOHQgjXCYITi+xU=
</data>
<key>hash2</key>
<data>
CH/IbvOeuO5i1POUHyFrDUlrdIiZzHMN54RPuzGXxPE=
</data>
</dict>
<key>Headers/FlutterEngine.h</key>
<dict>
<key>hash</key>
<data>
AdZsTJVwLyqWvLg0GGXL63DxLwA=
</data>
<key>hash2</key>
<data>
JhX0RJjHUfm6ThgTGwDCcmK1+Z9dMlnv9Jiq0jCSIUw=
</data>
</dict>
<key>Headers/FlutterHeadlessDartRunner.h</key>
<dict>
<key>hash</key>
<data>
M8/dhQH3VcQVHupUxQ1dGsbG3Ek=
</data>
<key>hash2</key>
<data>
2LUPyCMVHwKeIFZP9I5vV64Kl7unE39yisrUZVrUiVo=
</data>
</dict>
<key>Headers/FlutterMacros.h</key>
<dict>
<key>hash</key>
<data>
Ez4684e7XzQ8vidzmRvJh3qCNxk=
</data>
<key>hash2</key>
<data>
Lkv4JVLTujcNJRJvmOh5VX+fZHuEvj7MAwT8cSOlJnc=
</data>
</dict>
<key>Headers/FlutterPlatformViews.h</key>
<dict>
<key>hash</key>
<data>
14j1xmP4V+DT37g/he3ZhpoeOig=
</data>
<key>hash2</key>
<data>
WtX5LuTXzU9cYk6a/IwuJNP7tIvt2/I+sFiRK1SryNg=
</data>
</dict>
<key>Headers/FlutterPlugin.h</key>
<dict>
<key>hash</key>
<data>
maoHSos7SW7cnlOzz+gFyKQiG/s=
</data>
<key>hash2</key>
<data>
zVbxlG7MdrPSwtAajDCXzGiZsYEfvRpPlva7i1yMjUk=
</data>
</dict>
<key>Headers/FlutterPluginAppLifeCycleDelegate.h</key>
<dict>
<key>hash</key>
<data>
gctJ/r455gE8/rQYDs4lB3RUOkI=
</data>
<key>hash2</key>
<data>
0NeMhrK4y2kLHg0c8MGwANiCI5BUXUcz6iisREtmIuQ=
</data>
</dict>
<key>Headers/FlutterTexture.h</key>
<dict>
<key>hash</key>
<data>
1LdQETkD4xmsSZETVBywMxxLPwM=
</data>
<key>hash2</key>
<data>
7BCnkj4wcr2olEbhMVyuYZSgMXDx0XpJQ6/WdwMLdmE=
</data>
</dict>
<key>Headers/FlutterViewController.h</key>
<dict>
<key>hash</key>
<data>
1iNZtmSzviLXO3AyP98IfgOStLs=
</data>
<key>hash2</key>
<data>
LWq4OdgIuM3854RYisDOh7XYZtEB4HOm46p6QJ7WOdg=
</data>
</dict>
<key>Modules/module.modulemap</key>
<dict>
<key>hash</key>
<data>
wJV5dCKEGl+FAtDc8wJJh/fvKXs=
</data>
<key>hash2</key>
<data>
0VjriRpZ7AZZaP/0mMAPMJPhi6LoMB4MhXzL5j24tGs=
</data>
</dict>
<key>icudtl.dat</key>
<dict>
<key>hash</key>
<data>
cjDelfr3ugTDn3+r5icq6Ge1n4Q=
</data>
<key>hash2</key>
<data>
INkC1JLiLe7AB9SqeZRmj6oaRlkPwCvM96J3pilvsnc=
</data>
</dict>
</dict>
<key>rules</key>
<dict>
<key>^.*</key>
<true/>
<key>^.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^Base\.lproj/</key>
<dict>
<key>weight</key>
<real>1010</real>
</dict>
<key>^version.plist$</key>
<true/>
</dict>
<key>rules2</key>
<dict>
<key>.*\.dSYM($|/)</key>
<dict>
<key>weight</key>
<real>11</real>
</dict>
<key>^(.*/)?\.DS_Store$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>2000</real>
</dict>
<key>^.*</key>
<true/>
<key>^.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^Base\.lproj/</key>
<dict>
<key>weight</key>
<real>1010</real>
</dict>
<key>^Info\.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^PkgInfo$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^embedded\.provisionprofile$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
<key>^version\.plist$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
</dict>
</dict>
</plist>
......@@ -43,7 +43,7 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/xservice_kit/ios"
SPEC CHECKSUMS:
Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
Flutter: 58dd7d1b27887414a370fcccb9e645c08ffd7a6a
flutter_boost: 0e85ea37c74ed39ee7b91a35612afa1605557484
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
gengmei_flutter_plugin: 9461e8644c06c4a0e38292ddcca1cc55e6ac6156
......
......@@ -15,7 +15,7 @@
"tag": "1.0.0"
},
"platforms": {
"ios": "8.0"
"ios": "7.0"
},
"vendored_frameworks": "Flutter.framework"
}
......@@ -43,7 +43,7 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/xservice_kit/ios"
SPEC CHECKSUMS:
Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
Flutter: 58dd7d1b27887414a370fcccb9e645c08ffd7a6a
flutter_boost: 0e85ea37c74ed39ee7b91a35612afa1605557484
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
gengmei_flutter_plugin: 9461e8644c06c4a0e38292ddcca1cc55e6ac6156
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -364,7 +364,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
......@@ -444,7 +444,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
......@@ -494,7 +494,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
......
......@@ -27,8 +27,6 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
......@@ -38,11 +36,11 @@
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
buildConfiguration = "Release"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
......@@ -61,8 +59,6 @@
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Profile"
......
......@@ -3,4 +3,8 @@
@interface AppDelegate : FlutterAppDelegate
/**
*flutter 管道
*/
@property(nonatomic,strong)FlutterEventSink _flutterEvent;
@end
#include "AppDelegate.h"
#include "GeneratedPluginRegistrant.h"
@interface AppDelegate()<FlutterStreamHandler>
@end
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application
......@@ -17,9 +20,14 @@
(FlutterViewController*)self.window.rootViewController;
FlutterMethodChannel* buryChannel = [FlutterMethodChannel
methodChannelWithName:@"flutter_bury_channel"
methodChannelWithName:@"flutter_channel"
binaryMessenger:controller];
FlutterEventChannel* flutterEvent=[FlutterEventChannel
eventChannelWithName:@"flutter_channel_event" binaryMessenger:controller];
[flutterEvent setStreamHandler:self];
[buryChannel setMethodCallHandler:^(FlutterMethodCall* call,
FlutterResult result) {
NSLog(@" ME %@ argue %@",call.method,call.arguments);
......@@ -60,27 +68,26 @@
}else if([call.method isEqualToString:@"INIT_PARAMS"]){
NSMutableDictionary * map=[[NSMutableDictionary alloc] init];
NSMutableDictionary *dict = [[NSMutableDictionary alloc] init];
[dict setObject:@"sessionid=9odo0sov71x66ke9dlphibnq9i9gduxj;_gtid=3fbe9b78d2cb11e98bc1525400e82fab5270; _gm_token=db88861568285036" forKey:@"cookie"];
[dict setObject:@"sessionid=9odo0sov71x66ke9dlphibnq9i9gduxj;_gtid=3fbe9b78d2cb11e98bc1525400e82fab5270; _gm_token=db88861568285036" forKey:@"Cookie"];
[dict setObject:@"debug" forKey:@"buildConfig"];
//HERE
// [dict setObject:@"172.30.9.84:6666" forKey:@"proxy"];
result(dict);
}else if([call.method isEqualToString:@"UPLOAD_IMG"]){
// NSString* path=call.arguments[@"path"];
// NSString* token=call.arguments[@"token"];
// [[ALUpLoadManager shareInstance] setImage:path token:token block:^(NSString *url) {
// result(url);
// NSLog(@"!!!OKK %@",url);
// } failBlock:^(NSString *message) {
// NSLog(@"!!!ERROR %@",message);
// result([FlutterError errorWithCode:@"11" message:message details:message]);
// }];
// NSData *data = [NSData dataWithContentsOfFile:path];
// UIImage * printerImg = [UIImage imageWithData:data];
result(@"2019/10/17/1156/44dbb13ac6d9");
}
}];
}
#pragma mark - FlutterStreamHandler
- (FlutterError* _Nullable)onListenWithArguments:(id _Nullable)arguments
eventSink:(FlutterEventSink)eventSink{
self._flutterEvent = eventSink;
return nil;
}
- (FlutterError* _Nullable)onCancelWithArguments:(id _Nullable)arguments {
return nil;
}
@end
......@@ -2,6 +2,21 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSCameraUsageDescription</key>
<string>照相机</string>
<key>NSContactsUsageDescription</key>
<string>contactsDesciption</string>
<key>NSMicrophoneUsageDescription</key>
<string>麦克风</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>相册11</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>相册</string>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
......
......@@ -62,39 +62,21 @@ class AlbumModel extends BaseModel {
var map = (event as Map);
// var list = map[_nowDirName];
_mainValue.forEach((k, itemList) {
for (int i = 0; i < itemList.length; i++) {
if (map[k] == null || map[k][i] == null) {
continue;
}
var newPath = map[k][i]["path"] as String;
if ((itemList[i].path == null || itemList[i].path.isEmpty) &&
newPath != null) {
itemList[i].path = newPath;
}
var realPath = map[k][i]["realPath"] as String;
if ((itemList[i].realPath == null || itemList[i].realPath.isEmpty) &&
realPath != null) {
itemList[i].realPath = realPath;
var key = map[k];
if (key != null) {
for (int i = 0; i < itemList.length; i++) {
if (key[i] == null) {
continue;
}
if (itemList[i].path == null) {
itemList[i].path = key[i]["path"];
}
if (itemList[i].realPath == null) {
itemList[i].realPath = key[i]["realPath"];
}
}
}
});
// var recordList=_mainValue[_nowDirName];
// List<ScanImageItem> tempList = new List();
// if (list != null && !list.isEmpty) {
//// for (int i = 0; i < albumLive.data.length; i++) {
//// if (list[i]["path"] != null) {
//// albumLive.data[i].path = list[i]["path"];
//// }
//// }
// for (var item in list) {
// ScanImageItem scanImageItem = new ScanImageItem();
// scanImageItem.path = item["path"];
// scanImageItem.size = item["size"];
// scanImageItem.realPath = item["realPath"];
// tempList.add(scanImageItem);
// }
// }
// print("EVENTTTT !! ${tempList.length} ${tempList}");
albumLive.notifyView(_mainValue[_nowDirName]);
}
......
......@@ -106,6 +106,14 @@ class ServiceGenerator extends GeneratorForAnnotation<ServiceCenter> {
}
});
""");
// mapBuffer.write("""
// .map((value){
// if(value!=null&&value.statusCode==200){
// Map map = json.decode(value.toString());
// return ${methodElement.returnType.name}.fromJson(map);
// }
// });
// """);
methodBuffer.write("""
Observable<${methodElement.returnType.name}> ${methodElement.name}(${tempParams == null ? "" : tempParams}){
......
......@@ -19,52 +19,45 @@ class MessageModel extends BaseModel {
MessageModel(this.page, this.count);
init(BuildContext context) {
getMyMessage(page, count);
getUnreadMessage(0, likeUnreadMessageLive);
getUnreadMessage(1, followUnreadMessageLive);
getLatestMessage();
getMyMessage(context, page, count);
getUnreadMessage(context, 0, likeUnreadMessageLive);
getUnreadMessage(context, 1, followUnreadMessageLive);
getLatestMessage(context);
}
getMyMessage(page, count, [callback]){
MessageRepository.getInstance()
.getMyMessage(page, count)
.listen((value) {
getMyMessage(BuildContext context, page, count, [callback]) {
MessageRepository.getInstance().getMyMessage(page, count).listen((value) {
if (value != null) {
if(page > 1) {
if (page > 1) {
myMessageList.data?.addAll(value.data);
} else {
myMessageList = value;
}
if(callback != null) callback(value);
if (callback != null) callback(value);
myMessageLive.notifyView(myMessageList);
}
}).onError((error) {
Toast.show(error, "${error.toString()}");
Toast.show(context, "${error.toString()}");
});
}
getUnreadMessage(type, dataLive) {
MessageRepository.getInstance()
.getUnreadMessage(type)
.listen((value) {
getUnreadMessage(BuildContext context, type, dataLive) {
MessageRepository.getInstance().getUnreadMessage(type).listen((value) {
if (value != null) {
dataLive.notifyView(value);
}
}).onError((error) {
Toast.show(error, "${error.toString()}");
Toast.show(context, "${error.toString()}");
});
}
getLatestMessage() {
MessageRepository.getInstance()
.getLatestMessage()
.listen((value) {
getLatestMessage(BuildContext context) {
MessageRepository.getInstance().getLatestMessage().listen((value) {
if (value != null) {
latestMessageLive.notifyView(value);
}
}).onError((error) {
Toast.show(error, "${error.toString()}");
Toast.show(context, "${error.toString()}");
});
}
......
......@@ -7,7 +7,10 @@ import 'dart:async';
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:gmalpha_flutter/Annotations/RouterCenterRestore.mark.dart';
import 'package:gmalpha_flutter/commonModel/cache/CacheManager.dart';
import 'package:gmalpha_flutter/commonModel/eventbus/GlobalEventBus.dart';
import 'package:gmalpha_flutter/commonModel/eventbus/event/LoginEvent.dart';
import 'package:gmalpha_flutter/commonModel/net/Api.dart';
import 'package:gmalpha_flutter/commonModel/net/DioUtil.dart';
import 'package:rxdart/rxdart.dart';
......@@ -17,7 +20,9 @@ const NET_TYPE = "GET_NET_TYPE";
const INIT_PARAMS = "INIT_PARAMS";
const UPLOAD_IMG = "UPLOAD_IMG";
const USER_LOGOUT = "USER_LOGOUT";
const platform = const MethodChannel('flutter_bury_channel');
const platform = const MethodChannel('flutter_channel');
const eventChannel = const EventChannel('flutter_channel_event');
StreamSubscription _listen;
void jumpToH5(String jumpToName, Map params) {
Map map = {"page_name": jumpToName};
......@@ -66,6 +71,8 @@ Observable<bool> userLogout() {
}
void initParams(VoidCallback callback) {
_listen =
eventChannel.receiveBroadcastStream().listen(_onEvent, onError: _onError);
platform.invokeMethod(INIT_PARAMS, null).then((value) {
print("lsy INITPARAMS !! $value");
Api.getInstance().initBuildConfig(value);
......@@ -75,6 +82,27 @@ void initParams(VoidCallback callback) {
});
}
void _onEvent(Object event) {
print("ONEVENT !!!! ${event}");
if (event == null) {
return;
}
String cookie = (event as Map)["Cookie"];
if (cookie != null) {
Api.getInstance().setDioCookie(event);
}
String userID = (event as Map)["userId"];
if (userID != null) {
RouterCenterImpl().findUserRouter().loginChangeUserID(userID);
}
GlobalEventBus().event.fire(LoginEvent(userID, cookie));
}
void _onError(Object error) {
print("ERROR $error");
}
void initBuried(VoidCallback call) {
getBuriedInfo().then((value) {
Map temp = new Map<String, dynamic>.from(value);
......
/*
* @author lsy
* @date 2019-10-24
**/
import 'package:event_bus/event_bus.dart';
class GlobalEventBus{
EventBus event;
factory GlobalEventBus() => _getInstance();
static GlobalEventBus get instance => _getInstance();
static GlobalEventBus _instance;
GlobalEventBus._internal() {
// 创建对象
event = EventBus();
}
static GlobalEventBus _getInstance() {
if (_instance == null) {
_instance = GlobalEventBus._internal();
}
return _instance;
}
}
\ No newline at end of file
/*
* @author lsy
* @date 2019-10-24
**/
class LoginEvent {
final String userID;
final String cookie;
LoginEvent(this.userID, this.cookie);
}
......@@ -58,8 +58,9 @@ class Api {
print("baseUrl --> $baseUrl");
DioUtil().setConfig(HttpConfig(
options: BaseOptions(
baseUrl: baseUrl,
)));
baseUrl: baseUrl,
),
nativeCookie: {"Cookie": params["Cookie"]}));
return true;
}
......
......@@ -391,7 +391,7 @@ class DioUtil {
options.connectTimeout = 10 * 1000;
options.receiveTimeout = 20 * 1000;
// options.contentType = ContentType.parse('application/x-www-form-urlencoded');
options.contentType = ContentType.json;
// options.contentType = ContentType.json;
options.responseType = ResponseType.plain;
options.baseUrl = APP_HOST_DEBUG + "/";
Map<String, dynamic> headers = Map<String, dynamic>();
......
......@@ -15,7 +15,18 @@ import 'package:gmalpha_flutter/messageModel/home/message_home.dart';
import 'commonModel/GMBase.dart';
void main() {
initParams(() => runApp(MyApp()));
initParams(() {
runZoned(() {
runApp(MyApp());
}, onError: (Object obj, StackTrace stack) {
var details = makeDetails(obj, stack);
reportError(details);
});
});
}
void reportError(FlutterErrorDetails details) {
print("flutter error ==> $details");
}
class MyApp extends StatefulWidget {
......@@ -34,20 +45,20 @@ class _MyAppState extends State<MyApp> {
super.initState();
FlutterBoost.singleton.registerPageBuilders({
'comment_suggest': (pageName, params, _) {
if (!Api.getInstance().setDioCookie(params) ||
params["fromPage"] == null) {
return ErrorPage("出错:需要传递的参数为空");
}
// if (!Api.getInstance().setDioCookie(params) ||
// params["fromPage"] == null) {
// return ErrorPage("出错:需要传递的参数为空");
// }
return RouterCenterImpl()
.findUserRouter()
?.getCommentPage(params["fromPage"]);
},
'message_home': (pageName, params, _) {
print("PARAMS!! ${params}");
if (!Api.getInstance().setDioCookie(params) ||
params["fromPage"] == null) {
return ErrorPage("出错:需要传递的参数为空");
}
// if (!Api.getInstance().setDioCookie(params) ||
// params["fromPage"] == null) {
// return ErrorPage("出错:需要传递的参数为空");
// }
return RouterCenterImpl()
.findNewMessageRouter()
?.getMessagePage(params["fromPage"]);
......@@ -69,64 +80,64 @@ class _MyAppState extends State<MyApp> {
},
"prestige": (pageName, params, _) {
print("PARAMS!! ${params}");
if (!Api.getInstance().setDioCookie(params) ||
params["fromPage"] == null) {
return ErrorPage("出错:需要传递的参数为空");
}
// if (!Api.getInstance().setDioCookie(params) ||
// params["fromPage"] == null) {
// return ErrorPage("出错:需要传递的参数为空");
// }
int userId = int.parse(params["userId"]);
return RouterCenterImpl().findPrestigeRouter()?.getReputationsPage(
userId, params["userName"], params["fromPage"]);
},
"user_setting": (pageName, params, _) {
print("PARAMS!! ${params}");
if (!Api.getInstance().setDioCookie(params) ||
params["fromPage"] == null) {
return ErrorPage("出错:需要传递的参数为空");
}
// if (!Api.getInstance().setDioCookie(params) ||
// params["fromPage"] == null) {
// return ErrorPage("出错:需要传递的参数为空");
// }
return RouterCenterImpl()
.findUserRouter()
?.getUserSettingPage(params["userId"] ?? "", params["fromPage"]);
},
"activity_report": (pageName, params, _) {
print("PARAMS!! ${params}");
if (!Api.getInstance().setDioCookie(params) ||
params["fromPage"] == null) {
return ErrorPage("出错:需要传递的参数为空");
}
// if (!Api.getInstance().setDioCookie(params) ||
// params["fromPage"] == null) {
// return ErrorPage("出错:需要传递的参数为空");
// }
return RouterCenterImpl()
.findActivityReportRouter()
?.getActivityReportPage(
params["survey_record_id"] == null
? null
: int.parse(params["survey_record_id"]),
params["template_id"] == null
? null
: int.parse(params["template_id"]),
params["fromPage"]);
params["survey_record_id"] == null
? null
: int.parse(params["survey_record_id"]),
params["template_id"] == null
? null
: int.parse(params["template_id"]),
params["fromPage"]);
},
"message_focus": (pageName, params, _) {
if (!Api.getInstance().setDioCookie(params) ||
params["fromPage"] == null) {
return ErrorPage("出错:需要传递的参数为空");
}
// if (!Api.getInstance().setDioCookie(params) ||
// params["fromPage"] == null) {
// return ErrorPage("出错:需要传递的参数为空");
// }
return RouterCenterImpl()
.findNewMessageRouter()
?.getFocusPage(params["fromPage"]);
},
"message_attention": (pageName, params, _) {
if (!Api.getInstance().setDioCookie(params) ||
params["fromPage"] == null) {
return ErrorPage("出错:需要传递的参数为空");
}
// if (!Api.getInstance().setDioCookie(params) ||
// params["fromPage"] == null) {
// return ErrorPage("出错:需要传递的参数为空");
// }
return RouterCenterImpl()
.findNewMessageRouter()
?.getAttentionPage(params["fromPage"]);
},
"message_like": (pageName, params, _) {
if (!Api.getInstance().setDioCookie(params) ||
params["fromPage"] == null) {
return ErrorPage("出错:需要传递的参数为空");
}
// if (!Api.getInstance().setDioCookie(params) ||
// params["fromPage"] == null) {
// return ErrorPage("出错:需要传递的参数为空");
// }
return RouterCenterImpl()
.findNewMessageRouter()
?.getLikePage(params["fromPage"]);
......@@ -145,7 +156,7 @@ class _MyAppState extends State<MyApp> {
// return TestPage();
// },
// },
builder: buildOnce,
builder: FlutterBoost.init(),
theme: new ThemeData(
primaryColor: Colors.white,
backgroundColor: Color(0xFFEFEFEF),
......
......@@ -15,4 +15,6 @@ abstract class UserRouter implements RouterBaser {
Widget getUserSettingPage(String userID, String refer);
Widget getCommentPage(String refer);
void loginChangeUserID(String userId);
}
......@@ -6,19 +6,28 @@ import 'package:flutter/src/widgets/framework.dart';
import 'package:gmalpha_flutter/userModel/UserRouter.dart';
import 'package:gmalpha_flutter/userModel/page/comment/CommentSuggestPage.dart';
import 'package:gmalpha_flutter/userModel/page/userSetting/UserSettingPage.dart';
import 'package:gmalpha_flutter/userModel/service/remote/entity/UserEntity.user.dart';
class UserRouterImpl implements UserRouter {
@override
Widget getUserPage() {
}
Widget getUserPage() {}
@override
Widget getUserSettingPage(String userID, String refer) {
return UserSettingPage(userID,refer);
return UserSettingPage(userID, refer);
}
@override
Widget getCommentPage(String refer) {
return CommentSuggestPage(refer);
}
@override
void loginChangeUserID(String userId) {
UserEntityImpl().getuserId().listen((value) {
if (value != userId) {
UserEntityImpl().saveuserId("");
}
});
}
}
......@@ -162,7 +162,6 @@ class UserSettingModel extends BaseModel {
}
void save(BuildContext context) {
popLoadingDialog(context, true, "加载中");
if (selectImgPath != null) {
UserRepository.getInstance().getUploadToken(1).listen((data) {
uploadImage(context, data.data?.token);
......@@ -200,7 +199,7 @@ class UserSettingModel extends BaseModel {
.settingUserInfo(countryId, name, head, userid, age)
.listen((data) {
if (data != null) {
dismissLoadingDialog(context);
Navigator.pop(context);
UserEntityImpl().saveage(data?.data?.age);
UserEntityImpl().saveprofilePic(head);
UserEntityImpl().savenickName(name);
......
......@@ -59,7 +59,6 @@ class UserState extends BasePage<UserSettingPage> {
}, () {
logoutPicker.dismiss(context);
});
logoutPicker.setPicker(userLogoutPicker);
}
@override
......@@ -94,6 +93,8 @@ class UserState extends BasePage<UserSettingPage> {
} else {
return GestureDetector(
onTap: () {
logoutPicker.setPicker(baseLoadingItem);
logoutPicker.show(context);
_model.save(context);
},
child: Padding(
......@@ -244,6 +245,7 @@ class UserState extends BasePage<UserSettingPage> {
right: ScreenUtil.instance.setWidth(30)),
child: OutlineButton(
onPressed: () {
logoutPicker.setPicker(userLogoutPicker);
logoutPicker.show(context);
},
child: baseText("退出登入", 14, ALColors.Color323232),
......
......@@ -24,10 +24,11 @@ dependencies:
flutter:
sdk: flutter
cupertino_icons: ^0.1.2
dio: ^2.1.0
dio: ^2.2.2
rxdart: ^0.22.0 #链式编程
pull_to_refresh: ^1.5.0
flutter_boost: ^0.0.420
event_bus: ^1.1.0
# gengmei_flutter_plugin: ^0.0.731
# flutter_boost:
# git:
......@@ -38,7 +39,7 @@ dependencies:
gengmei_flutter_plugin:
git:
url: 'git@git.wanmeizhensuo.com:linshengyu/flutter_plugin.git'
ref: "31f0e00d6a02ebbfa022be8770e397f36bcb10ce"
ref: "703b4906beabe5fa9ba4e5e76a5b43799a25f89b"
protobuf: ^0.14.4
grpc: ^2.1.2
flutter_svg: ^0.14.1
......
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