Skip to content

Commit

Permalink
完成地图页面的功能,跳转百度、高德、腾讯地图导航,使用webview_flutter来做webview加载
Browse files Browse the repository at this point in the history
  • Loading branch information
ningyuwen committed May 6, 2019
1 parent 8b4f533 commit de27407
Show file tree
Hide file tree
Showing 40 changed files with 6,852 additions and 1,872 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import com.jzoom.amaplocation.AmapLocationPlugin;
import io.flutter.plugins.connectivity.ConnectivityPlugin;
import com.github.marekchen.flutterqq.FlutterQqPlugin;
import com.flutter_webview_plugin.FlutterWebviewPlugin;
import io.github.ponnamkarthik.toast.fluttertoast.FluttertoastPlugin;
import io.flutter.plugins.imagepicker.ImagePickerPlugin;
import com.bigbug.mmkvflutter.MmkvFlutterPlugin;
Expand All @@ -14,6 +13,7 @@
import io.flutter.plugins.sharedpreferences.SharedPreferencesPlugin;
import com.tekartik.sqflite.SqflitePlugin;
import io.flutter.plugins.urllauncher.UrlLauncherPlugin;
import io.flutter.plugins.webviewflutter.WebViewFlutterPlugin;

/**
* Generated file. Do not edit.
Expand All @@ -26,7 +26,6 @@ public static void registerWith(PluginRegistry registry) {
AmapLocationPlugin.registerWith(registry.registrarFor("com.jzoom.amaplocation.AmapLocationPlugin"));
ConnectivityPlugin.registerWith(registry.registrarFor("io.flutter.plugins.connectivity.ConnectivityPlugin"));
FlutterQqPlugin.registerWith(registry.registrarFor("com.github.marekchen.flutterqq.FlutterQqPlugin"));
FlutterWebviewPlugin.registerWith(registry.registrarFor("com.flutter_webview_plugin.FlutterWebviewPlugin"));
FluttertoastPlugin.registerWith(registry.registrarFor("io.github.ponnamkarthik.toast.fluttertoast.FluttertoastPlugin"));
ImagePickerPlugin.registerWith(registry.registrarFor("io.flutter.plugins.imagepicker.ImagePickerPlugin"));
MmkvFlutterPlugin.registerWith(registry.registrarFor("com.bigbug.mmkvflutter.MmkvFlutterPlugin"));
Expand All @@ -36,6 +35,7 @@ public static void registerWith(PluginRegistry registry) {
SharedPreferencesPlugin.registerWith(registry.registrarFor("io.flutter.plugins.sharedpreferences.SharedPreferencesPlugin"));
SqflitePlugin.registerWith(registry.registrarFor("com.tekartik.sqflite.SqflitePlugin"));
UrlLauncherPlugin.registerWith(registry.registrarFor("io.flutter.plugins.urllauncher.UrlLauncherPlugin"));
WebViewFlutterPlugin.registerWith(registry.registrarFor("io.flutter.plugins.webviewflutter.WebViewFlutterPlugin"));
}

private static boolean alreadyRegisteredWith(PluginRegistry registry) {
Expand Down
2 changes: 1 addition & 1 deletion ios/.symlinks/plugins/fluttertoast
2 changes: 1 addition & 1 deletion ios/.symlinks/plugins/image_picker
1 change: 0 additions & 1 deletion ios/.symlinks/plugins/simple_permissions

This file was deleted.

Binary file modified ios/Flutter/App.framework/App
Binary file not shown.
Binary file modified ios/Flutter/Flutter.framework/Flutter
Binary file not shown.
3 changes: 3 additions & 0 deletions ios/Flutter/Flutter.framework/Headers/Flutter.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
/**
BREAKING CHANGES:
December 17, 2018:
- Changed designated initializer on FlutterEngine
October 5, 2018:
- Removed FlutterNavigationController.h/.mm
- Changed return signature of `FlutterDartHeadlessCodeRunner.run*` from void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 9 additions & 2 deletions ios/Flutter/Flutter.framework/Headers/FlutterChannels.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -234,7 +238,10 @@ FLUTTER_EXPORT
*/
- (void)invokeMethod:(NSString*)method
arguments:(id _Nullable)arguments
result:(FlutterResult _Nullable)callback;
result:(FlutterResult _Nullable)callback
// TODO: Add macOS support for replies once
// https://github.com/flutter/flutter/issues/18852 is fixed.
API_UNAVAILABLE(macos);

/**
* Registers a handler for method calls from the Flutter side.
Expand Down
29 changes: 27 additions & 2 deletions ios/Flutter/Flutter.framework/Headers/FlutterDartProject.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,26 @@ FLUTTER_EXPORT
- (instancetype)initFromDefaultSourceForConfiguration FLUTTER_UNAVAILABLE("Use -init instead.");

/**
* Returns the file name for the given asset.
* The returned file name can be used to access the asset in the application's main bundle.
* Returns the file name for the given asset. If the bundle with the identifier
* "io.flutter.flutter.app" exists, it will try use that bundle; otherwise, it
* will use the main bundle. To specify a different bundle, use
* `-lookupKeyForAsset:asset:fromBundle`.
*
* @param asset The name of the asset. The name can be hierarchical.
* @return the file name to be used for lookup in the main bundle.
*/
+ (NSString*)lookupKeyForAsset:(NSString*)asset;

/**
* Returns the file name for the given asset.
* The returned file name can be used to access the asset in the supplied bundle.
*
* @param asset The name of the asset. The name can be hierarchical.
* @param bundle The `NSBundle` to use for looking up the asset.
* @return the file name to be used for lookup in the main bundle.
*/
+ (NSString*)lookupKeyForAsset:(NSString*)asset fromBundle:(NSBundle*)bundle;

/**
* Returns the file name for the given asset which originates from the specified package.
* The returned file name can be used to access the asset in the application's main bundle.
Expand All @@ -44,6 +56,19 @@ FLUTTER_EXPORT
*/
+ (NSString*)lookupKeyForAsset:(NSString*)asset fromPackage:(NSString*)package;

/**
* Returns the file name for the given asset which originates from the specified package.
* The returned file name can be used to access the asset in the specified bundle.
*
* @param asset The name of the asset. The name can be hierarchical.
* @param package The name of the package from which the asset originates.
* @param bundle The bundle to use when doing the lookup.
* @return the file name to be used for lookup in the main bundle.
*/
+ (NSString*)lookupKeyForAsset:(NSString*)asset
fromPackage:(NSString*)package
fromBundle:(NSBundle*)bundle;

/**
* Returns the default identifier for the bundle where we expect to find the Flutter Dart
* application.
Expand Down
38 changes: 37 additions & 1 deletion ios/Flutter/Flutter.framework/Headers/FlutterEngine.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,27 @@
FLUTTER_EXPORT
@interface FlutterEngine
: NSObject <FlutterBinaryMessenger, FlutterTextureRegistry, FlutterPluginRegistry>
/**
* Initialize this FlutterEngine with a `FlutterDartProject`.
*
* If the FlutterDartProject is not specified, the FlutterEngine will attempt to locate
* the project in a default location (the flutter_assets folder in the iOS application
* bundle).
*
* A newly initialized engine will not run the `FlutterDartProject` until either
* `-runWithEntrypoint:` or `-runWithEntrypoint:libraryURI:` is called.
*
* FlutterEngine created with this method will have allowHeadlessExecution set to `YES`.
* This means that the engine will continue to run regardless of whether a `FlutterViewController`
* is attached to it or not, until `-destroyContext:` is called or the process finishes.
*
* @param labelPrefix The label prefix used to identify threads for this instance. Should
* be unique across FlutterEngine instances, and is used in instrumentation to label
* the threads used by this FlutterEngine.
* @param projectOrNil The `FlutterDartProject` to run.
*/
- (instancetype)initWithName:(NSString*)labelPrefix project:(FlutterDartProject*)projectOrNil;

/**
* Initialize this FlutterEngine with a `FlutterDartProject`.
*
Expand All @@ -54,16 +75,21 @@ FLUTTER_EXPORT
* be unique across FlutterEngine instances, and is used in instrumentation to label
* the threads used by this FlutterEngine.
* @param projectOrNil The `FlutterDartProject` to run.
* @param allowHeadlessExecution Whether or not to allow this instance to continue
* running after passing a nil `FlutterViewController` to `-setViewController:`.
*/
- (instancetype)initWithName:(NSString*)labelPrefix
project:(FlutterDartProject*)projectOrNil NS_DESIGNATED_INITIALIZER;
project:(FlutterDartProject*)projectOrNil
allowHeadlessExecution:(BOOL)allowHeadlessExecution NS_DESIGNATED_INITIALIZER;

/**
* The default initializer is not available for this object.
* Callers must use `-[FlutterEngine initWithName:project:]`.
*/
- (instancetype)init NS_UNAVAILABLE;

+ (instancetype)new NS_UNAVAILABLE;

/**
* Runs a Dart program on an Isolate from the main Dart library (i.e. the library that
* contains `main()`).
Expand Down Expand Up @@ -97,6 +123,16 @@ FLUTTER_EXPORT
*/
- (BOOL)runWithEntrypoint:(NSString*)entrypoint libraryURI:(NSString*)uri;

/**
* Destroy running context for an engine.
*
* This method can be used to force the FlutterEngine object to release all resources.
* After sending this message, the object will be in an unusable state until it is deallocated.
* Accessing properties or sending messages to it will result in undefined behavior or runtime
* errors.
*/
- (void)destroyContext;

/**
* Sets the `FlutterViewController` for this instance. The FlutterEngine must be
* running (e.g. a successful call to `-runWithEntrypoint:` or `-runWithEntrypoint:libraryURI`)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,25 @@ FLUTTER_DEPRECATED("FlutterEngine should be used rather than FlutterHeadlessDart
* be unique across FlutterEngine instances
* @param projectOrNil The `FlutterDartProject` to run.
*/
- (instancetype)initWithName:(NSString*)labelPrefix project:(FlutterDartProject*)projectOrNil;

/**
* Iniitalize this FlutterHeadlessDartRunner with a `FlutterDartProject`.
*
* If the FlutterDartProject is not specified, the FlutterHeadlessDartRunner will attempt to locate
* the project in a default location.
*
* A newly initialized engine will not run the `FlutterDartProject` until either
* `-runWithEntrypoint:` or `-runWithEntrypoint:libraryURI` is called.
*
* @param labelPrefix The label prefix used to identify threads for this instance. Should
* be unique across FlutterEngine instances
* @param projectOrNil The `FlutterDartProject` to run.
* @param allowHeadlessExecution Must be set to `YES`.
*/
- (instancetype)initWithName:(NSString*)labelPrefix
project:(FlutterDartProject*)projectOrNil NS_DESIGNATED_INITIALIZER;
project:(FlutterDartProject*)projectOrNil
allowHeadlessExecution:(BOOL)allowHeadlessExecution NS_DESIGNATED_INITIALIZER;

/**
* Not recommended for use - will initialize with a default label ("io.flutter.headless")
Expand Down
24 changes: 24 additions & 0 deletions ios/Flutter/Flutter.framework/Headers/FlutterPlugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,17 @@

NS_ASSUME_NONNULL_BEGIN
@protocol FlutterPluginRegistrar;
@protocol FlutterPluginRegistry;

/**
* A plugin registration callback.
*
* Used for registering plugins with additional instances of
* `FlutterPluginRegistry`.
*
* @param registry The registry to register plugins with.
*/
typedef void (*FlutterPluginRegistrantCallback)(NSObject<FlutterPluginRegistry>* registry);

/**
* Implemented by the iOS part of a Flutter plugin.
Expand Down Expand Up @@ -44,6 +55,19 @@ NS_ASSUME_NONNULL_BEGIN
*/
+ (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar>*)registrar;
@optional
/**
* Set a callback for registering plugins to an additional `FlutterPluginRegistry`,
* including headless `FlutterEngine` instances.
*
* This method is typically called from within an application's `AppDelegate` at
* startup to allow for plugins which create additional `FlutterEngine` instances
* to register the application's plugins.
*
* @param callback A callback for registering some set of plugins with a
* `FlutterPluginRegistry`.
*/
+ (void)setPluginRegistrantCallback:(FlutterPluginRegistrantCallback)callback;
@optional
/**
* Called if this plugin has been registered to receive `FlutterMethodCall`s.
*
Expand Down
5 changes: 5 additions & 0 deletions ios/Flutter/Flutter.framework/Headers/FlutterViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,11 @@ FLUTTER_EXPORT
*/
@property(nonatomic, getter=isViewOpaque) BOOL viewOpaque;

/**
* The `FlutterEngine` instance for this view controller.
*/
@property(weak, nonatomic, readonly) FlutterEngine* engine;

@end

#endif // FLUTTER_FLUTTERVIEWCONTROLLER_H_
Loading

0 comments on commit de27407

Please sign in to comment.