amap_search_fluttify

This commit is contained in:
2024-11-17 15:59:37 +08:00
commit 731cf46ce1
435 changed files with 218481 additions and 0 deletions

43
example/.gitignore vendored Normal file
View File

@ -0,0 +1,43 @@
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/
migrate_working_dir/
# IntelliJ related
*.iml
*.ipr
*.iws
.idea/
# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/
# Flutter/Dart/Pub related
**/doc/api/
**/ios/Flutter/.last_build_id
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.pub-cache/
.pub/
/build/
# Symbolication related
app.*.symbols
# Obfuscation related
app.*.map.json
# Android Studio will place build artifacts here
/android/app/debug
/android/app/profile
/android/app/release

16
example/README.md Normal file
View File

@ -0,0 +1,16 @@
# amap_search_fluttify_example
Demonstrates how to use the amap_search_fluttify plugin.
## Getting Started
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
For help getting started with Flutter development, view the
[online documentation](https://docs.flutter.dev/), which offers tutorials,
samples, guidance on mobile development, and a full API reference.

View File

@ -0,0 +1,29 @@
# This file configures the analyzer, which statically analyzes Dart code to
# check for errors, warnings, and lints.
#
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
# invoked from the command line by running `flutter analyze`.
# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.
include: package:flutter_lints/flutter.yaml
linter:
# The lint rules applied to this project can be customized in the
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
# included above or to enable additional rules. A list of all available lints
# and their documentation is published at
# https://dart-lang.github.io/linter/lints/index.html.
#
# Instead of disabling a lint rule for the entire project in the
# section below, it can also be suppressed for a single line of code
# or a specific dart file by using the `// ignore: name_of_lint` and
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
rules:
# avoid_print: false # Uncomment to disable the `avoid_print` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options

View File

@ -0,0 +1,69 @@
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
compileSdkVersion flutter.compileSdkVersion
ndkVersion flutter.ndkVersion
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "me.yohom.amap_search_fluttify_example"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
minSdkVersion 21
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
signingConfigs {
release {
keyAlias 'amap_search_test'
keyPassword 'amap_search_test'
storeFile file('../amap_search_test.jks')
storePassword 'amap_search_test'
}
}
buildTypes {
debug {
signingConfig signingConfigs.release
}
release {
signingConfig signingConfigs.release
}
}
}
flutter {
source '../..'
}

View File

@ -0,0 +1,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="me.yohom.amap_search_fluttify_example">
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>

View File

@ -0,0 +1,52 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="me.yohom.amap_search_fluttify_example">
<!--允许程序打开网络套接字-->
<uses-permission android:name="android.permission.INTERNET" />
<!--允许程序设置内置sd卡的写权限-->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<!--允许程序获取网络状态-->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<!--允许程序访问WiFi网络信息-->
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<!--允许程序读写手机状态和身份-->
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<!--允许程序访问CellID或WiFi热点来获取粗略的位置-->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<application
android:label="amap_search_fluttify_example"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">
<meta-data android:name="com.amap.api.v2.apikey"
android:value="c50f89a05a0a5c8e11ab5383f4d13952"/>
<activity
android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name="flutterEmbedding"
android:value="2" />
</application>
</manifest>

View File

@ -0,0 +1,6 @@
package me.yohom.amap_search_fluttify_example;
import io.flutter.embedding.android.FlutterActivity;
public class MainActivity extends FlutterActivity {
}

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="?android:colorBackground" />
<!-- You can insert your own image assets here -->
<!-- <item>
<bitmap
android:gravity="center"
android:src="@mipmap/launch_image" />
</item> -->
</layer-list>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@android:color/white" />
<!-- You can insert your own image assets here -->
<!-- <item>
<bitmap
android:gravity="center"
android:src="@mipmap/launch_image" />
</item> -->
</layer-list>

Binary file not shown.

After

Width:  |  Height:  |  Size: 544 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 442 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 721 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
the Flutter engine draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
Flutter UI initializes, as well as behind your Flutter UI while its
running.
This Theme is only used starting with V2 of Flutter's Android embedding. -->
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item>
</style>
</resources>

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
the Flutter engine draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
Flutter UI initializes, as well as behind your Flutter UI while its
running.
This Theme is only used starting with V2 of Flutter's Android embedding. -->
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item>
</style>
</resources>

View File

@ -0,0 +1,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="me.yohom.amap_search_fluttify_example">
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>

View File

@ -0,0 +1,31 @@
buildscript {
ext.kotlin_version = '1.6.10'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.1.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
google()
mavenCentral()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}

View File

@ -0,0 +1,3 @@
org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
android.enableJetifier=true

View File

@ -0,0 +1,6 @@
#Fri Jun 23 08:50:38 CEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip

View File

@ -0,0 +1,11 @@
include ':app'
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
def properties = new Properties()
assert localPropertiesFile.exists()
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"

View File

@ -0,0 +1,26 @@
<?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>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>App</string>
<key>CFBundleIdentifier</key>
<string>io.flutter.flutter.app</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>App</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>9.0</string>
</dict>
</plist>

View File

@ -0,0 +1,2 @@
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
#include "Generated.xcconfig"

View File

@ -0,0 +1,2 @@
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "Generated.xcconfig"

40
example/ios/Podfile Normal file
View File

@ -0,0 +1,40 @@
source 'https://gitee.com/mirrors/CocoaPods-Specs.git' # 指定源
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}
def flutter_root
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
unless File.exist?(generated_xcode_build_settings_path)
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end
File.foreach(generated_xcode_build_settings_path) do |line|
matches = line.match(/FLUTTER_ROOT\=(.*)/)
return matches[1].strip if matches
end
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
flutter_ios_podfile_setup
target 'Runner' do
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
end
end

79
example/ios/Podfile.lock Normal file
View File

@ -0,0 +1,79 @@
PODS:
- amap_core_fluttify (0.0.1):
- AMapFoundation-NO-IDFA (~> 1.6.9)
- Flutter
- foundation_fluttify
- amap_search_fluttify (0.0.1):
- AMapSearch-NO-IDFA (= 9.2.0)
- Flutter
- foundation_fluttify
- AMapFoundation-NO-IDFA (1.6.9)
- AMapSearch-NO-IDFA (9.2.0):
- AMapFoundation-NO-IDFA (~> 1.6.9)
- core_location_fluttify (0.0.1):
- Flutter
- foundation_fluttify
- Flutter (1.0.0)
- FMDB (2.7.5):
- FMDB/standard (= 2.7.5)
- FMDB/standard (2.7.5)
- foundation_fluttify (0.0.1):
- Flutter
- path_provider_ios (0.0.1):
- Flutter
- permission_handler_apple (9.0.4):
- Flutter
- sqflite (0.0.2):
- Flutter
- FMDB (>= 2.7.5)
DEPENDENCIES:
- amap_core_fluttify (from `.symlinks/plugins/amap_core_fluttify/ios`)
- amap_search_fluttify (from `.symlinks/plugins/amap_search_fluttify/ios`)
- core_location_fluttify (from `.symlinks/plugins/core_location_fluttify/ios`)
- Flutter (from `Flutter`)
- foundation_fluttify (from `.symlinks/plugins/foundation_fluttify/ios`)
- path_provider_ios (from `.symlinks/plugins/path_provider_ios/ios`)
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
- sqflite (from `.symlinks/plugins/sqflite/ios`)
SPEC REPOS:
https://gitee.com/mirrors/CocoaPods-Specs.git:
- AMapFoundation-NO-IDFA
- AMapSearch-NO-IDFA
- FMDB
EXTERNAL SOURCES:
amap_core_fluttify:
:path: ".symlinks/plugins/amap_core_fluttify/ios"
amap_search_fluttify:
:path: ".symlinks/plugins/amap_search_fluttify/ios"
core_location_fluttify:
:path: ".symlinks/plugins/core_location_fluttify/ios"
Flutter:
:path: Flutter
foundation_fluttify:
:path: ".symlinks/plugins/foundation_fluttify/ios"
path_provider_ios:
:path: ".symlinks/plugins/path_provider_ios/ios"
permission_handler_apple:
:path: ".symlinks/plugins/permission_handler_apple/ios"
sqflite:
:path: ".symlinks/plugins/sqflite/ios"
SPEC CHECKSUMS:
amap_core_fluttify: b84657ba39ee287a4b96bbcc0a6e67612cc3808f
amap_search_fluttify: cfab91aa65730337fff54705aae0423ea752fc91
AMapFoundation-NO-IDFA: cc2ec7a2828ef292358ad594b7ee0ae21a7f097b
AMapSearch-NO-IDFA: 9df378c88d50083346412ee3e0a10e2c451c7139
core_location_fluttify: 9466a411ea7d22c6349c7e6a767ae4623f01eb1d
Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
foundation_fluttify: 0c45145e3fad1fb99188e4979daed5b24cd9b278
path_provider_ios: 14f3d2fd28c4fdb42f44e0f751d12861c43cee02
permission_handler_apple: 44366e37eaf29454a1e7b1b7d736c2cceaeb17ce
sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904
PODFILE CHECKSUM: febb83c8a930141d95caab555982aeda42924994
COCOAPODS: 1.11.3

View File

@ -0,0 +1,533 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objects = {
/* Begin PBXBuildFile section */
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
C0B36C54DB5DBC10D79240BB /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 180D186A924BD5A7CCAAEA21 /* libPods-Runner.a */; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
9705A1C41CF9048500538489 /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* 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>"; };
180D186A924BD5A7CCAAEA21 /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; };
28AD679E3FA43023F7CCD9D8 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
E1197FAC12FF2CEA10980272 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
F82654A1512C05C7ABC37DB9 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
97C146EB1CF9000F007C117D /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
C0B36C54DB5DBC10D79240BB /* libPods-Runner.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
13127E28C69117CB1D457D3D /* Pods */ = {
isa = PBXGroup;
children = (
28AD679E3FA43023F7CCD9D8 /* Pods-Runner.debug.xcconfig */,
F82654A1512C05C7ABC37DB9 /* Pods-Runner.release.xcconfig */,
E1197FAC12FF2CEA10980272 /* Pods-Runner.profile.xcconfig */,
);
name = Pods;
path = Pods;
sourceTree = "<group>";
};
7F0C698E17349BD2A011B0D9 /* Frameworks */ = {
isa = PBXGroup;
children = (
180D186A924BD5A7CCAAEA21 /* libPods-Runner.a */,
);
name = Frameworks;
sourceTree = "<group>";
};
9740EEB11CF90186004384FC /* Flutter */ = {
isa = PBXGroup;
children = (
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
9740EEB21CF90195004384FC /* Debug.xcconfig */,
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
9740EEB31CF90195004384FC /* Generated.xcconfig */,
);
name = Flutter;
sourceTree = "<group>";
};
97C146E51CF9000F007C117D = {
isa = PBXGroup;
children = (
9740EEB11CF90186004384FC /* Flutter */,
97C146F01CF9000F007C117D /* Runner */,
97C146EF1CF9000F007C117D /* Products */,
13127E28C69117CB1D457D3D /* Pods */,
7F0C698E17349BD2A011B0D9 /* Frameworks */,
);
sourceTree = "<group>";
};
97C146EF1CF9000F007C117D /* Products */ = {
isa = PBXGroup;
children = (
97C146EE1CF9000F007C117D /* Runner.app */,
);
name = Products;
sourceTree = "<group>";
};
97C146F01CF9000F007C117D /* Runner */ = {
isa = PBXGroup;
children = (
7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */,
7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */,
97C146FA1CF9000F007C117D /* Main.storyboard */,
97C146FD1CF9000F007C117D /* Assets.xcassets */,
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
97C147021CF9000F007C117D /* Info.plist */,
97C146F11CF9000F007C117D /* Supporting Files */,
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
);
path = Runner;
sourceTree = "<group>";
};
97C146F11CF9000F007C117D /* Supporting Files */ = {
isa = PBXGroup;
children = (
97C146F21CF9000F007C117D /* main.m */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
97C146ED1CF9000F007C117D /* Runner */ = {
isa = PBXNativeTarget;
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
63C43029C85D2994500C7A9F /* [CP] Check Pods Manifest.lock */,
9740EEB61CF901F6004384FC /* Run Script */,
97C146EA1CF9000F007C117D /* Sources */,
97C146EB1CF9000F007C117D /* Frameworks */,
97C146EC1CF9000F007C117D /* Resources */,
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
);
buildRules = (
);
dependencies = (
);
name = Runner;
productName = Runner;
productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1300;
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
CreatedOnToolsVersion = 7.3.1;
};
};
};
buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 97C146E51CF9000F007C117D;
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
97C146ED1CF9000F007C117D /* Runner */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
97C146EC1CF9000F007C117D /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Thin Binary";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
};
63C43029C85D2994500C7A9F /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
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;
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Run Script";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
97C146EA1CF9000F007C117D /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */,
97C146F31CF9000F007C117D /* main.m in Sources */,
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
97C146FA1CF9000F007C117D /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
97C146FB1CF9000F007C117D /* Base */,
);
name = Main.storyboard;
sourceTree = "<group>";
};
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
isa = PBXVariantGroup;
children = (
97C147001CF9000F007C117D /* Base */,
);
name = LaunchScreen.storyboard;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
249021D3217E4FDB00AE95B9 /* Profile */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Profile;
};
249021D4217E4FDB00AE95B9 /* Profile */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = X5P24RK5QW;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = me.yohom.amapSearchFluttifyExample;
PRODUCT_NAME = "$(TARGET_NAME)";
VERSIONING_SYSTEM = "apple-generic";
};
name = Profile;
};
97C147031CF9000F007C117D /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
97C147041CF9000F007C117D /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
97C147061CF9000F007C117D /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = X5P24RK5QW;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = me.yohom.amapSearchFluttifyExample;
PRODUCT_NAME = "$(TARGET_NAME)";
VERSIONING_SYSTEM = "apple-generic";
};
name = Debug;
};
97C147071CF9000F007C117D /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = X5P24RK5QW;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = me.yohom.amapSearchFluttifyExample;
PRODUCT_NAME = "$(TARGET_NAME)";
VERSIONING_SYSTEM = "apple-generic";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
isa = XCConfigurationList;
buildConfigurations = (
97C147031CF9000F007C117D /* Debug */,
97C147041CF9000F007C117D /* Release */,
249021D3217E4FDB00AE95B9 /* Profile */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
isa = XCConfigurationList;
buildConfigurations = (
97C147061CF9000F007C117D /* Debug */,
97C147071CF9000F007C117D /* Release */,
249021D4217E4FDB00AE95B9 /* Profile */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 97C146E61CF9000F007C117D /* Project object */;
}

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:">
</FileRef>
</Workspace>

View File

@ -0,0 +1,8 @@
<?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>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>

View File

@ -0,0 +1,8 @@
<?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>PreviewsEnabled</key>
<false/>
</dict>
</plist>

View File

@ -0,0 +1,87 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Profile"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:Runner.xcodeproj">
</FileRef>
<FileRef
location = "group:Pods/Pods.xcodeproj">
</FileRef>
</Workspace>

View File

@ -0,0 +1,8 @@
<?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>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>

View File

@ -0,0 +1,8 @@
<?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>PreviewsEnabled</key>
<false/>
</dict>
</plist>

View File

@ -0,0 +1,6 @@
#import <Flutter/Flutter.h>
#import <UIKit/UIKit.h>
@interface AppDelegate : FlutterAppDelegate
@end

View File

@ -0,0 +1,13 @@
#import "AppDelegate.h"
#import "GeneratedPluginRegistrant.h"
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[GeneratedPluginRegistrant registerWithRegistry:self];
// Override point for customization after application launch.
return [super application:application didFinishLaunchingWithOptions:launchOptions];
}
@end

View File

@ -0,0 +1,122 @@
{
"images" : [
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-App-20x20@2x.png",
"scale" : "2x"
},
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-App-20x20@3x.png",
"scale" : "3x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@1x.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@3x.png",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-App-40x40@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-App-40x40@3x.png",
"scale" : "3x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-App-60x60@2x.png",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-App-60x60@3x.png",
"scale" : "3x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-App-20x20@1x.png",
"scale" : "1x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-App-20x20@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-App-29x29@1x.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-App-29x29@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-App-40x40@1x.png",
"scale" : "1x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-App-40x40@2x.png",
"scale" : "2x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-App-76x76@1x.png",
"scale" : "1x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-App-76x76@2x.png",
"scale" : "2x"
},
{
"size" : "83.5x83.5",
"idiom" : "ipad",
"filename" : "Icon-App-83.5x83.5@2x.png",
"scale" : "2x"
},
{
"size" : "1024x1024",
"idiom" : "ios-marketing",
"filename" : "Icon-App-1024x1024@1x.png",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 564 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

@ -0,0 +1,23 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "LaunchImage.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "LaunchImage@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "LaunchImage@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 B

View File

@ -0,0 +1,5 @@
# Launch Screen Assets
You can customize the launch screen with your own desired assets by replacing the image files in this directory.
You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.

View File

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Ydg-fD-yQy"/>
<viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
</imageView>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/>
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/>
</constraints>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
<resources>
<image name="LaunchImage" width="168" height="185"/>
</resources>
</document>

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
</dependencies>
<scenes>
<!--Flutter View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="FlutterViewController" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
</scene>
</scenes>
</document>

View File

@ -0,0 +1,47 @@
<?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>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>amap_search_fluttify_example</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(FLUTTER_BUILD_NAME)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
</dict>
</plist>

View File

@ -0,0 +1,9 @@
#import <Flutter/Flutter.h>
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
int main(int argc, char* argv[]) {
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}

View File

@ -0,0 +1,145 @@
import 'package:amap_search_fluttify/amap_search_fluttify.dart';
import 'package:amap_search_fluttify_example/widgets/function_item.widget.dart';
import 'package:core_location_fluttify/core_location_fluttify.dart';
import 'package:decorated_flutter/decorated_flutter.dart';
import 'package:flutter/material.dart';
class GetAddressDescScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
resizeToAvoidBottomInset: false,
appBar: AppBar(title: const Text('获取地址描述数据')),
body: ListView(
children: <Widget>[
const FunctionItem(
label: '地理编码(地址转坐标)',
sublabel: 'AddressEncodeScreen',
target: AddressEncodeScreen(),
),
FunctionItem(
label: '逆地理编码(坐标转地址)',
sublabel: 'AddressDecodeScreen',
target: AddressDecodeScreen(),
),
],
),
);
}
}
/// 地理编码(地址转坐标)
class AddressEncodeScreen extends StatefulWidget {
const AddressEncodeScreen({Key? key}) : super(key: key);
@override
_AddressEncodeScreenState createState() => _AddressEncodeScreenState();
}
class _AddressEncodeScreenState extends State<AddressEncodeScreen> {
final _keywordController = TextEditingController(text: '阿里巴巴');
final _cityController = TextEditingController(text: '杭州');
List<Geocode> _geocodeList = [];
@override
Widget build(BuildContext context) {
return Scaffold(
resizeToAvoidBottomInset: false,
appBar: AppBar(title: const Text('地理编码(地址转坐标)')),
body: DecoratedColumn(
padding: const EdgeInsets.all(kSpace16),
children: <Widget>[
TextFormField(
controller: _keywordController,
decoration: const InputDecoration(hintText: '输入关键字'),
),
TextFormField(
controller: _cityController,
decoration: const InputDecoration(hintText: '输入城市'),
),
RaisedButton(
onPressed: () async {
final geocodeList = await AmapSearch.instance.searchGeocode(
_keywordController.text,
city: _cityController.text,
);
setState(() {
_geocodeList = geocodeList;
});
},
child: const Text('搜索'),
),
if (_geocodeList.isNotEmpty) Text(_geocodeList.toString()),
],
),
);
}
}
/// 逆地理编码(坐标转地址)
class AddressDecodeScreen extends StatefulWidget {
@override
_AddressDecodeScreenState createState() => _AddressDecodeScreenState();
}
class _AddressDecodeScreenState extends State<AddressDecodeScreen> {
final _latController = TextEditingController(text: '39.9824');
final _lngController = TextEditingController(text: '116.3053');
final _radiusController = TextEditingController(text: '200.0');
ReGeocode? _reGeocode;
@override
Widget build(BuildContext context) {
return Scaffold(
resizeToAvoidBottomInset: false,
appBar: AppBar(title: const Text('逆地理编码(坐标转地址)')),
body: DecoratedColumn(
padding: const EdgeInsets.all(kSpace16),
children: <Widget>[
DecoratedRow(
children: <Widget>[
Flexible(
child: TextFormField(
controller: _latController,
decoration: const InputDecoration(hintText: '输入纬度'),
),
),
Flexible(
child: TextFormField(
controller: _lngController,
decoration: const InputDecoration(hintText: '输入经度'),
),
),
],
),
TextFormField(
controller: _radiusController,
decoration: const InputDecoration(hintText: '输入范围半径'),
),
RaisedButton(
onPressed: () async {
final reGeocodeList = await AmapSearch.instance.searchReGeocode(
LatLng(
double.parse(_latController.text),
double.parse(_lngController.text),
),
radius: 200.0,
);
setState(() {
_reGeocode = reGeocodeList;
});
},
child: const Text('搜索'),
),
Expanded(
child: SingleChildScrollView(
child: Text(_reGeocode?.toString() ?? ''),
),
),
],
),
);
}
}

View File

@ -0,0 +1,50 @@
import 'package:amap_search_fluttify/amap_search_fluttify.dart';
import 'package:amap_search_fluttify_example/widgets/scrollable_text.widget.dart';
import 'package:decorated_flutter/decorated_flutter.dart';
import 'package:flutter/material.dart';
/// 获取公交数据
class GetBusInfoScreen extends StatefulWidget {
@override
_GetBusInfoScreenState createState() => _GetBusInfoScreenState();
}
class _GetBusInfoScreenState extends State<GetBusInfoScreen> {
final _keywordController = TextEditingController(text: '武林广场');
final _cityController = TextEditingController(text: '杭州');
String _busStation = '';
@override
Widget build(BuildContext context) {
return Scaffold(
resizeToAvoidBottomInset: false,
appBar: AppBar(title: const Text('获取公交数据')),
body: DecoratedColumn(
padding: const EdgeInsets.all(kSpace16),
children: <Widget>[
TextFormField(
controller: _keywordController,
decoration: const InputDecoration(hintText: '输入公交站点名称'),
),
TextFormField(
controller: _cityController,
decoration: const InputDecoration(hintText: '输入城市'),
),
RaisedButton(
onPressed: () async {
final busStation = await AmapSearch.instance.searchBusStation(
stationName: _keywordController.text,
city: _cityController.text,
);
_busStation = await busStation.toFutureString();
setState(() {});
},
child: const Text('搜索'),
),
Expanded(child: ScrollableText(_busStation)),
],
),
);
}
}

View File

@ -0,0 +1,45 @@
import 'package:amap_search_fluttify/amap_search_fluttify.dart';
import 'package:decorated_flutter/decorated_flutter.dart';
import 'package:flutter/material.dart';
/// 获取行政区划数据
class GetDistrictInfoScreen extends StatefulWidget {
@override
_GetDistrictInfoScreenState createState() => _GetDistrictInfoScreenState();
}
class _GetDistrictInfoScreenState extends State<GetDistrictInfoScreen> {
final _keywordController = TextEditingController(text: '西湖区');
String _district = '';
@override
Widget build(BuildContext context) {
return Scaffold(
resizeToAvoidBottomInset: false,
appBar: AppBar(title: const Text('获取行政区划数据')),
body: DecoratedColumn(
padding: const EdgeInsets.all(kSpace16),
children: <Widget>[
TextFormField(
controller: _keywordController,
decoration: const InputDecoration(hintText: '输入地区'),
),
RaisedButton(
onPressed: () async {
final district = await AmapSearch.instance.searchDistrict(
_keywordController.text,
showBoundary: true,
showChild: true,
);
_district = district.toString();
setState(() {});
},
child: const Text('搜索'),
),
Expanded(child: SingleChildScrollView(child: Text(_district))),
],
),
);
}
}

View File

@ -0,0 +1,234 @@
import 'package:amap_search_fluttify/amap_search_fluttify.dart';
import 'package:amap_search_fluttify_example/widgets/function_item.widget.dart';
import 'package:amap_search_fluttify_example/widgets/scrollable_text.widget.dart';
import 'package:core_location_fluttify/core_location_fluttify.dart';
import 'package:decorated_flutter/decorated_flutter.dart';
import 'package:flutter/material.dart';
class GetPoiScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
resizeToAvoidBottomInset: false,
appBar: AppBar(title: const Text('获取POI数据')),
body: ListView(
children: <Widget>[
FunctionItem(
label: '关键字检索POI',
sublabel: 'KeywordPoiScreen',
target: KeywordPoiScreen(),
),
FunctionItem(
label: '周边检索POI',
sublabel: 'AroundPoiScreen',
target: AroundPoiScreen(),
),
FunctionItem(
label: '输入提示',
sublabel: 'InputTipScreen',
target: InputTipScreen(),
),
],
),
);
}
}
/// 关键字检索POI
class KeywordPoiScreen extends StatefulWidget {
@override
_KeywordPoiScreenState createState() => _KeywordPoiScreenState();
}
class _KeywordPoiScreenState extends State<KeywordPoiScreen> {
final _keywordController = TextEditingController(text: '肯德基');
final _cityController = TextEditingController(text: '杭州');
int _page = 1;
List<String> _poiTitleList = [];
@override
Widget build(BuildContext context) {
return Scaffold(
resizeToAvoidBottomInset: false,
appBar: AppBar(title: const Text('关键字检索POI')),
body: DecoratedColumn(
padding: const EdgeInsets.all(kSpace16),
children: <Widget>[
TextFormField(
controller: _keywordController,
decoration: const InputDecoration(hintText: '输入关键字'),
),
TextFormField(
controller: _cityController,
decoration: const InputDecoration(hintText: '输入城市'),
),
ElevatedButton(
onPressed: () async {
final poiList = await AmapSearch.instance.searchKeyword(
_keywordController.text,
city: _cityController.text,
);
setState(() {
_poiTitleList = poiList.map((it) => it.toString()).toList();
});
},
child: const Text('搜索'),
),
ElevatedButton(
onPressed: () async {
final poiList = await AmapSearch.instance.searchKeyword(
_keywordController.text,
city: _cityController.text,
page: ++_page,
);
setState(() {
_poiTitleList = poiList.map((it) => it.toString()).toList();
});
},
child: const Text('下一页'),
),
Expanded(child: ScrollableText(_poiTitleList.join("\n"))),
],
),
);
}
}
/// 附近检索POI
class AroundPoiScreen extends StatefulWidget {
@override
_AroundPoiScreenState createState() => _AroundPoiScreenState();
}
class _AroundPoiScreenState extends State<AroundPoiScreen> {
final _keywordController = TextEditingController();
final _typeController = TextEditingController();
final _latController = TextEditingController(text: '29.08');
final _lngController = TextEditingController(text: '119.65');
int _page = 1;
List<String> _poiTitleList = [];
@override
Widget build(BuildContext context) {
return Scaffold(
resizeToAvoidBottomInset: false,
appBar: AppBar(title: const Text('周边检索POI')),
body: DecoratedColumn(
padding: const EdgeInsets.all(kSpace16),
children: <Widget>[
TextFormField(
controller: _keywordController,
decoration: const InputDecoration(hintText: '输入关键字'),
),
TextFormField(
controller: _typeController,
decoration: const InputDecoration(hintText: '输入类别'),
),
DecoratedRow(
children: <Widget>[
Flexible(
child: TextField(
controller: _latController,
decoration: const InputDecoration(hintText: '输入纬度'),
),
),
SPACE_4_HORIZONTAL,
Flexible(
child: TextField(
controller: _lngController,
decoration: const InputDecoration(hintText: '输入经度'),
),
),
],
),
RaisedButton(
onPressed: () async {
final poiList = await AmapSearch.instance.searchAround(
LatLng(
double.tryParse(_latController.text) ?? 29.08,
double.tryParse(_lngController.text) ?? 119.65,
),
keyword: _keywordController.text,
type: _typeController.text,
);
setState(() {
_poiTitleList = poiList.map((it) => it.toString()).toList();
});
},
child: const Text('搜索'),
),
RaisedButton(
onPressed: () async {
final poiList = await AmapSearch.instance.searchAround(
LatLng(
double.tryParse(_latController.text) ?? 29.08,
double.tryParse(_lngController.text) ?? 119.65,
),
keyword: _keywordController.text,
type: _typeController.text,
page: ++_page,
);
setState(() {
_poiTitleList = poiList.map((it) => it.toString()).toList();
});
},
child: const Text('下一页'),
),
Expanded(child: ScrollableText(_poiTitleList.join("\n"))),
],
),
);
}
}
/// 输入提示
class InputTipScreen extends StatefulWidget {
@override
_InputTipScreenState createState() => _InputTipScreenState();
}
class _InputTipScreenState extends State<InputTipScreen> {
final _keywordController = TextEditingController(text: '肯德基');
final _cityController = TextEditingController(text: '杭州');
List<InputTip> _inputTipList = [];
@override
Widget build(BuildContext context) {
return Scaffold(
resizeToAvoidBottomInset: false,
appBar: AppBar(title: const Text('输入内容自动提示')),
body: DecoratedColumn(
padding: const EdgeInsets.all(kSpace16),
children: <Widget>[
TextFormField(
controller: _keywordController,
decoration: const InputDecoration(hintText: '输入关键字'),
),
TextFormField(
controller: _cityController,
decoration: const InputDecoration(hintText: '输入所在城市'),
),
RaisedButton(
onPressed: () async {
final inputTipList = await AmapSearch.instance.fetchInputTips(
_keywordController.text,
city: _cityController.text,
);
setState(() => _inputTipList = inputTipList);
},
child: const Text('搜索'),
),
Expanded(child: ScrollableText(_inputTipList.join("\n"))),
],
),
);
}
}

View File

@ -0,0 +1,42 @@
import 'package:amap_search_fluttify/amap_search_fluttify.dart';
import 'package:decorated_flutter/decorated_flutter.dart';
import 'package:flutter/material.dart';
/// 获取天气数据
class GetWeatherInfoScreen extends StatefulWidget {
@override
_GetWeatherInfoScreenState createState() => _GetWeatherInfoScreenState();
}
class _GetWeatherInfoScreenState extends State<GetWeatherInfoScreen> {
final _keywordController = TextEditingController(text: '杭州');
String _district = '';
@override
Widget build(BuildContext context) {
return Scaffold(
resizeToAvoidBottomInset: false,
appBar: AppBar(title: const Text('获取天气数据')),
body: DecoratedColumn(
padding: const EdgeInsets.all(kSpace16),
children: <Widget>[
TextFormField(
controller: _keywordController,
decoration: const InputDecoration(hintText: '输入地区'),
),
RaisedButton(
onPressed: () async {
final district = await AmapSearch.instance
.searchDistrict(_keywordController.text);
_district = district.toString();
setState(() {});
},
child: const Text('搜索'),
),
Expanded(child: SingleChildScrollView(child: Text(_district))),
],
),
);
}
}

129
example/lib/main.dart Normal file
View File

@ -0,0 +1,129 @@
import 'package:amap_search_fluttify/amap_search_fluttify.dart';
import 'package:flutter/material.dart';
import 'get_map_data/get_address_desc.screen.dart';
import 'get_map_data/get_bus_info.screen.dart';
import 'get_map_data/get_district_info.screen.dart';
import 'get_map_data/get_poi.screen.dart';
import 'get_map_data/get_weather_info.screen.dart';
import 'route_plan/route_bus.screen.dart';
import 'route_plan/route_drive.screen.dart';
import 'route_plan/route_ride.screen.dart';
import 'route_plan/route_walk.screen.dart';
import 'widgets/function_group.widget.dart';
import 'widgets/function_item.widget.dart';
import 'widgets/todo.screen.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await AmapSearch.instance.init('f583e0d5b70400167993615c3adc3ced');
await AmapSearch.instance.updatePrivacyShow(true);
await AmapSearch.instance.updatePrivacyAgree(true);
runApp(MyApp());
}
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
@override
Widget build(BuildContext context) {
return const MaterialApp(home: Home());
}
}
class Home extends StatelessWidget {
const Home({
Key? key,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text('AMaps examples')),
body: ListView(
children: <Widget>[
FunctionGroup(
headLabel: '获取地图数据',
children: <Widget>[
FunctionItem(
label: '获取POI数据',
sublabel: 'GetPoiScreen',
target: GetPoiScreen(),
),
FunctionItem(
label: '获取地址描述数据',
sublabel: 'GetAddressDescScreen',
target: GetAddressDescScreen(),
),
FunctionItem(
label: '获取行政区划数据',
sublabel: 'GetDistrictInfoScreen',
target: GetDistrictInfoScreen(),
),
FunctionItem(
label: '获取公交数据',
sublabel: 'GetBusInfoScreenScreen',
target: GetBusInfoScreen(),
),
FunctionItem(
label: '后获取天气数据',
sublabel: 'GetWeatherInfoScreen',
target: GetWeatherInfoScreen(),
),
FunctionItem(
label: '获取业务数据(云图功能)',
sublabel: 'TODO',
target: TodoScreen(),
),
FunctionItem(
label: '获取交通态势信息',
sublabel: 'TODO',
target: TodoScreen(),
),
],
),
FunctionGroup(
headLabel: '出行路线规划',
children: <Widget>[
FunctionItem(
label: '驾车出行路线规划',
sublabel: 'RouteDriveScreen',
target: RouteDriveScreen(),
),
FunctionItem(
label: '步行出行路线规划',
sublabel: 'RouteWalkScreen',
target: RouteWalkScreen(),
),
FunctionItem(
label: '公交出行路线规划',
sublabel: 'RouteBusScreen',
target: RouteBusScreen(),
),
FunctionItem(
label: '骑行出行路线规划',
sublabel: 'RouteRideScreen',
target: RouteRideScreen(),
),
FunctionItem(
label: '货车出行路线规划',
sublabel: 'TODO',
target: TodoScreen(),
),
FunctionItem(
label: '未来出行路线规划',
sublabel: 'TODO',
target: TodoScreen(),
),
],
),
],
),
);
}
}

View File

@ -0,0 +1,97 @@
import 'package:amap_search_fluttify/amap_search_fluttify.dart';
import 'package:core_location_fluttify/core_location_fluttify.dart';
import 'package:decorated_flutter/decorated_flutter.dart';
import 'package:flutter/material.dart';
/// 公交路线规划
class RouteBusScreen extends StatefulWidget {
@override
_RouteBusScreenState createState() => _RouteBusScreenState();
}
class _RouteBusScreenState extends State<RouteBusScreen> {
final _fromLatController = TextEditingController(text: '30.219933');
final _fromLngController = TextEditingController(text: '120.023728');
final _toLatController = TextEditingController(text: '30.27065');
final _toLngController = TextEditingController(text: '120.163117');
String _routeResult = '';
@override
Widget build(BuildContext context) {
return Scaffold(
resizeToAvoidBottomInset: false,
appBar: AppBar(title: const Text('公交路线规划')),
body: DecoratedColumn(
padding: const EdgeInsets.all(kSpace16),
children: <Widget>[
DecoratedRow(
itemSpacing: kSpace8,
children: <Widget>[
const Text('起点:'),
Flexible(
child: TextFormField(
controller: _fromLatController,
keyboardType: TextInputType.number,
decoration: const InputDecoration(hintText: '输入出发点纬度'),
),
),
Flexible(
child: TextFormField(
controller: _fromLngController,
keyboardType: TextInputType.number,
decoration: const InputDecoration(hintText: '输入出发点经度'),
),
),
],
),
DecoratedRow(
itemSpacing: kSpace8,
children: <Widget>[
const Text('终点:'),
Flexible(
child: TextFormField(
controller: _toLatController,
keyboardType: TextInputType.number,
decoration: const InputDecoration(hintText: '输入终点纬度'),
),
),
Flexible(
child: TextFormField(
controller: _toLngController,
keyboardType: TextInputType.number,
decoration: const InputDecoration(hintText: '输入终点经度'),
),
),
],
),
RaisedButton(
onPressed: () async {
final routeResult = await AmapSearch.instance.searchBusRoute(
from: LatLng(
double.parse(_fromLatController.text),
double.parse(_fromLngController.text),
),
to: LatLng(
double.parse(_toLatController.text),
double.parse(_toLngController.text),
),
city: '杭州',
);
routeResult
.toFutureString()
.then((it) => setState(() => _routeResult = it));
},
child: const Text('搜索'),
),
Expanded(
child: SingleChildScrollView(
child: Text(_routeResult),
),
),
],
),
);
}
}

View File

@ -0,0 +1,100 @@
import 'package:amap_search_fluttify/amap_search_fluttify.dart';
import 'package:core_location_fluttify/core_location_fluttify.dart';
import 'package:decorated_flutter/decorated_flutter.dart';
import 'package:flutter/material.dart';
/// 驾车路线规划
class RouteDriveScreen extends StatefulWidget {
@override
_RouteDriveScreenState createState() => _RouteDriveScreenState();
}
class _RouteDriveScreenState extends State<RouteDriveScreen> {
final _fromLatController = TextEditingController(text: '30.219933');
final _fromLngController = TextEditingController(text: '120.023728');
final _toLatController = TextEditingController(text: '30.27065');
final _toLngController = TextEditingController(text: '120.163117');
String _routeResult = '';
@override
Widget build(BuildContext context) {
return Scaffold(
resizeToAvoidBottomInset: false,
appBar: AppBar(title: const Text('驾车路线规划')),
body: DecoratedColumn(
padding: const EdgeInsets.all(kSpace16),
children: <Widget>[
DecoratedRow(
itemSpacing: kSpace8,
children: <Widget>[
const Text('起点:'),
Flexible(
child: TextFormField(
controller: _fromLatController,
keyboardType: TextInputType.number,
decoration: const InputDecoration(hintText: '输入出发点纬度'),
),
),
Flexible(
child: TextFormField(
controller: _fromLngController,
keyboardType: TextInputType.number,
decoration: const InputDecoration(hintText: '输入出发点经度'),
),
),
],
),
DecoratedRow(
itemSpacing: kSpace8,
children: <Widget>[
const Text('终点:'),
Flexible(
child: TextFormField(
controller: _toLatController,
keyboardType: TextInputType.number,
decoration: const InputDecoration(hintText: '输入终点纬度'),
),
),
Flexible(
child: TextFormField(
controller: _toLngController,
keyboardType: TextInputType.number,
decoration: const InputDecoration(hintText: '输入终点经度'),
),
),
],
),
RaisedButton(
onPressed: () async {
try {
final routeResult = await AmapSearch.instance.searchDriveRoute(
from: LatLng(
double.parse(_fromLatController.text),
double.parse(_fromLngController.text),
),
to: LatLng(
double.parse(_toLatController.text),
double.parse(_toLngController.text),
),
);
routeResult
.toFutureString()
.then((it) => setState(() => _routeResult = it));
} catch (e) {
setState(() => _routeResult = e.toString());
}
},
child: const Text('搜索'),
),
Expanded(
child: SingleChildScrollView(
child: Text(_routeResult),
),
),
],
),
);
}
}

View File

@ -0,0 +1,92 @@
import 'package:amap_search_fluttify/amap_search_fluttify.dart';
import 'package:core_location_fluttify/core_location_fluttify.dart';
import 'package:decorated_flutter/decorated_flutter.dart';
import 'package:flutter/material.dart';
/// 骑行路线规划
class RouteRideScreen extends StatefulWidget {
@override
_RouteRideScreenState createState() => _RouteRideScreenState();
}
class _RouteRideScreenState extends State<RouteRideScreen> {
final _fromLatController = TextEditingController(text: '30.219933');
final _fromLngController = TextEditingController(text: '120.023728');
final _toLatController = TextEditingController(text: '30.27065');
final _toLngController = TextEditingController(text: '120.163117');
String _routeResult = '';
@override
Widget build(BuildContext context) {
return Scaffold(
resizeToAvoidBottomInset: false,
appBar: AppBar(title: const Text('骑行路线规划')),
body: DecoratedColumn(
padding: const EdgeInsets.all(kSpace16),
children: <Widget>[
DecoratedRow(
itemSpacing: kSpace8,
children: <Widget>[
const Text('起点:'),
Flexible(
child: TextFormField(
controller: _fromLatController,
keyboardType: TextInputType.number,
decoration: const InputDecoration(hintText: '输入出发点纬度'),
),
),
Flexible(
child: TextFormField(
controller: _fromLngController,
keyboardType: TextInputType.number,
decoration: const InputDecoration(hintText: '输入出发点经度'),
),
),
],
),
DecoratedRow(
itemSpacing: kSpace8,
children: <Widget>[
const Text('终点:'),
Flexible(
child: TextFormField(
controller: _toLatController,
keyboardType: TextInputType.number,
decoration: const InputDecoration(hintText: '输入终点纬度'),
),
),
Flexible(
child: TextFormField(
controller: _toLngController,
keyboardType: TextInputType.number,
decoration: const InputDecoration(hintText: '输入终点经度'),
),
),
],
),
RaisedButton(
onPressed: () async {
final routeResult = await AmapSearch.instance.searchRideRoute(
from: LatLng(
double.parse(_fromLatController.text),
double.parse(_fromLngController.text),
),
to: LatLng(
double.parse(_toLatController.text),
double.parse(_toLngController.text),
),
);
routeResult
.toFutureString()
.then((it) => setState(() => _routeResult = it));
},
child: const Text('搜索'),
),
Expanded(child: SingleChildScrollView(child: Text(_routeResult))),
],
),
);
}
}

View File

@ -0,0 +1,96 @@
import 'package:amap_search_fluttify/amap_search_fluttify.dart';
import 'package:core_location_fluttify/core_location_fluttify.dart';
import 'package:decorated_flutter/decorated_flutter.dart';
import 'package:flutter/material.dart';
/// 步行路线规划
class RouteWalkScreen extends StatefulWidget {
@override
_RouteWalkScreenState createState() => _RouteWalkScreenState();
}
class _RouteWalkScreenState extends State<RouteWalkScreen> {
final _fromLatController = TextEditingController(text: '30.219933');
final _fromLngController = TextEditingController(text: '120.023728');
final _toLatController = TextEditingController(text: '30.27065');
final _toLngController = TextEditingController(text: '120.163117');
String _routeResult = '';
@override
Widget build(BuildContext context) {
return Scaffold(
resizeToAvoidBottomInset: false,
appBar: AppBar(title: const Text('步行路线规划')),
body: DecoratedColumn(
padding: const EdgeInsets.all(kSpace16),
children: <Widget>[
DecoratedRow(
itemSpacing: kSpace8,
children: <Widget>[
const Text('起点:'),
Flexible(
child: TextFormField(
controller: _fromLatController,
keyboardType: TextInputType.number,
decoration: const InputDecoration(hintText: '输入出发点纬度'),
),
),
Flexible(
child: TextFormField(
controller: _fromLngController,
keyboardType: TextInputType.number,
decoration: const InputDecoration(hintText: '输入出发点经度'),
),
),
],
),
DecoratedRow(
itemSpacing: kSpace8,
children: <Widget>[
const Text('终点:'),
Flexible(
child: TextFormField(
controller: _toLatController,
keyboardType: TextInputType.number,
decoration: const InputDecoration(hintText: '输入终点纬度'),
),
),
Flexible(
child: TextFormField(
controller: _toLngController,
keyboardType: TextInputType.number,
decoration: const InputDecoration(hintText: '输入终点经度'),
),
),
],
),
RaisedButton(
onPressed: () async {
final routeResult = await AmapSearch.instance.searchWalkRoute(
from: LatLng(
double.parse(_fromLatController.text),
double.parse(_fromLngController.text),
),
to: LatLng(
double.parse(_toLatController.text),
double.parse(_toLngController.text),
),
);
routeResult
.toFutureString()
.then((it) => setState(() => _routeResult = it));
},
child: const Text('搜索'),
),
Expanded(
child: SingleChildScrollView(
child: Text(_routeResult),
),
),
],
),
);
}
}

View File

@ -0,0 +1,13 @@
import 'package:decorated_flutter/decorated_flutter.dart';
import 'package:permission_handler/permission_handler.dart';
Future<bool> requestPermission() async {
final status = await Permission.location.request();
if (status == PermissionStatus.granted) {
return true;
} else {
toast('需要定位权限!');
return false;
}
}

View File

@ -0,0 +1 @@
export 'misc.dart';

View File

@ -0,0 +1,26 @@
import 'package:flutter/material.dart';
class Button extends StatelessWidget {
const Button({
Key? key,
required this.label,
required this.onPressed,
}) : super(key: key);
final String label;
final ValueChanged<BuildContext> onPressed;
@override
Widget build(BuildContext context) {
return RaisedButton(
padding: const EdgeInsets.symmetric(vertical: 16),
color: Colors.black,
onPressed: () => onPressed(context),
shape: const StadiumBorder(),
child: Text(
label,
style: const TextStyle(color: Colors.white, fontSize: 15),
),
);
}
}

View File

@ -0,0 +1,74 @@
import 'package:flutter/material.dart';
//region space
const kSpaceZero = 0.0;
const kSpaceTiny = 1.0;
const kSpaceSmall = 4.0;
const kSpace8 = 8.0;
const kSpaceLittleBig = 12.0;
const kSpace16 = 16.0;
const kSpaceLarge = 24.0;
const kSpaceHuge = 32.0;
const kSpaceGiant = 64.0;
const SPACE_ZERO = SizedBox.shrink();
const SPACE_TINY = SizedBox(width: kSpaceTiny, height: kSpaceTiny);
const SPACE_TINY_HORIZONTAL = SizedBox(width: kSpaceTiny, height: kSpaceZero);
const SPACE_TINY_VERTICAL = SizedBox(width: kSpaceZero, height: kSpaceTiny);
const SPACE_SMALL = SizedBox(width: kSpaceSmall, height: kSpaceSmall);
const SPACE_4_HORIZONTAL = SizedBox(width: kSpaceSmall, height: kSpaceZero);
const SPACE_SMALL_VERTICAL = SizedBox(width: kSpaceZero, height: kSpaceSmall);
const SPACE_NORMAL = SizedBox(width: kSpace8, height: kSpace8);
const SPACE_NORMAL_HORIZONTAL = SizedBox(width: kSpace8, height: kSpaceZero);
const SPACE_NORMAL_VERTICAL = SizedBox(width: kSpaceZero, height: kSpace8);
const SPACE_LITTLE_BIG =
SizedBox(width: kSpaceLittleBig, height: kSpaceLittleBig);
const SPACE_LITTLE_BIG_HORIZONTAL =
SizedBox(width: kSpaceLittleBig, height: kSpaceZero);
const SPACE_LITTLE_BIG_VERTICAL =
SizedBox(width: kSpaceZero, height: kSpaceLittleBig);
const SPACE_BIG = SizedBox(width: kSpace16, height: kSpace16);
const SPACE_BIG_HORIZONTAL = SizedBox(width: kSpace16, height: kSpaceZero);
const SPACE_BIG_VERTICAL = SizedBox(width: kSpaceZero, height: kSpace16);
const SPACE_LARGE = SizedBox(width: kSpaceLarge, height: kSpaceLarge);
const SPACE_LARGE_HORIZONTAL = SizedBox(width: kSpaceLarge, height: kSpaceZero);
const SPACE_LARGE_VERTICAL = SizedBox(width: kSpaceZero, height: kSpaceLarge);
const SPACE_HUGE = SizedBox(width: kSpaceHuge, height: kSpaceHuge);
const SPACE_HUGE_HORIZONTAL = SizedBox(width: kSpaceHuge, height: kSpaceZero);
const SPACE_HUGE_VERTICAL = SizedBox(width: kSpaceZero, height: kSpaceHuge);
const SPACE_GIANT = SizedBox(width: kSpaceGiant, height: kSpaceGiant);
const SPACE_GIANT_HORIZONTAL = SizedBox(width: kSpaceGiant, height: kSpaceZero);
const SPACE_GIANT_VERTICAL = SizedBox(width: kSpaceZero, height: kSpaceGiant);
const kDividerTiny = Divider(height: kSpaceTiny);
const kDividerSmall = Divider(height: kSpaceSmall);
const kDividerNormal = Divider();
const kDividerLittleBig = Divider(height: kSpaceLittleBig);
const kDividerBig = Divider(height: kSpace16);
const kDividerLarge = Divider(height: kSpaceLarge);
const kDividerHuge = Divider(height: kSpaceHuge);
const kDividerGiant = Divider(height: kSpaceGiant);
//endregion
//region text
const kTextNormal = 16.0;
const kTextBig = 18.0;
//endregion
//region elevation
const kElevationZero = 0.0;
const kElevationTiny = 1.0;
const kElevationSmall = 2.0;
const kElevationNormal = 4.0;
const kElevationBig = 8.0;
const kElevationHuge = 16.0;
const kElevationGiant = 32.0;
//endregion

View File

@ -0,0 +1,36 @@
import 'package:flutter/material.dart';
class FunctionGroup extends StatelessWidget {
const FunctionGroup({
Key? key,
required this.headLabel,
this.children = const [],
}) : super(key: key);
final String headLabel;
final List<Widget> children;
@override
Widget build(BuildContext context) {
return Container(
color: Colors.white,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Padding(
padding:
const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
child: Text(headLabel,
style: Theme.of(context).textTheme.headline6),
),
const Divider(height: 1, indent: 16),
],
), ...children,
],
),
);
}
}

View File

@ -0,0 +1,34 @@
import 'package:flutter/material.dart';
class FunctionItem extends StatelessWidget {
const FunctionItem({
Key? key,
required this.label,
required this.sublabel,
required this.target,
}) : super(key: key);
final String label;
final String sublabel;
final Widget target;
@override
Widget build(BuildContext context) {
return Column(
children: <Widget>[
ListTile(
title: Text(label),
subtitle: Text(sublabel),
trailing: const Icon(Icons.keyboard_arrow_right),
onTap: () {
Navigator.push(
context,
MaterialPageRoute(builder: (_) => target),
);
},
),
const Divider(height: 1, indent: 16),
],
);
}
}

View File

@ -0,0 +1,17 @@
import 'package:decorated_flutter/decorated_flutter.dart';
import 'package:flutter/material.dart';
class FutureText extends StatelessWidget {
const FutureText(this.data, {Key? key}) : super(key: key);
final Future<String> data;
@override
Widget build(BuildContext context) {
return SingleSubscriber<String>(
future: data,
showLoading: false,
builder: (data) => Text(data),
);
}
}

View File

@ -0,0 +1,12 @@
import 'package:flutter/material.dart';
class ScrollableText extends StatelessWidget {
final String data;
const ScrollableText(this.data, {Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return SingleChildScrollView(child: Text(data));
}
}

View File

@ -0,0 +1,209 @@
import 'package:flutter/material.dart';
const SPACE_NORMAL = SizedBox(width: 8, height: 8);
const kDividerTiny = Divider(height: 1);
/// 连续设置
class ContinuousSetting extends StatefulWidget {
const ContinuousSetting({
Key? key,
required this.head,
required this.onChanged,
this.min = 0,
this.max = 1,
}) : super(key: key);
final String head;
final ValueChanged<double> onChanged;
final double min;
final double max;
@override
_ContinuousSettingState createState() => _ContinuousSettingState();
}
class _ContinuousSettingState extends State<ContinuousSetting> {
late double _value;
@override
void initState() {
super.initState();
_value = 0;
}
@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.only(
left: 16,
top: 16,
right: 16,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(widget.head, style: Theme.of(context).textTheme.subtitle1),
SPACE_NORMAL,
Slider(
value: _value,
min: widget.min,
max: widget.max,
onChanged: (_) {},
onChangeEnd: (value) {
setState(() {
_value = value;
widget.onChanged(value);
});
},
),
kDividerTiny,
],
),
);
}
}
/// 离散设置
class DiscreteSetting extends StatelessWidget {
const DiscreteSetting({
Key? key,
required this.head,
required this.options,
required this.onSelected,
}) : super(key: key);
final String head;
final List<String> options;
final ValueChanged<String> onSelected;
@override
Widget build(BuildContext context) {
return Column(
children: <Widget>[
PopupMenuButton<String>(
onSelected: onSelected,
child: Padding(
padding: const EdgeInsets.all(16),
child: Text(head, style: Theme.of(context).textTheme.subtitle1),
),
itemBuilder: (context) {
return options
.map((value) => PopupMenuItem<String>(
value: value,
child: Text(value),
))
.toList();
},
),
kDividerTiny,
],
);
}
}
/// 颜色设置
class ColorSetting extends StatelessWidget {
const ColorSetting({
Key? key,
required this.head,
required this.onSelected,
}) : super(key: key);
final String head;
final ValueChanged<Color?> onSelected;
@override
Widget build(BuildContext context) {
return DiscreteSetting(
head: head,
options: const ['绿色', '红色', '黄色'],
onSelected: (value) {
Color? color;
switch (value) {
case '绿色':
color = Colors.green.withOpacity(0.6);
break;
case '红色':
color = Colors.red.withOpacity(0.6);
break;
case '黄色':
color = Colors.yellow.withOpacity(0.6);
break;
}
onSelected(color);
},
);
}
}
/// 二元设置
class BooleanSetting extends StatefulWidget {
const BooleanSetting({
Key? key,
required this.head,
required this.onSelected,
this.selected = false,
}) : super(key: key);
final String head;
final ValueChanged<bool> onSelected;
final bool selected;
@override
_BooleanSettingState createState() => _BooleanSettingState();
}
class _BooleanSettingState extends State<BooleanSetting> {
late bool _selected;
@override
void initState() {
super.initState();
_selected = widget.selected;
}
@override
Widget build(BuildContext context) {
return Column(
children: <Widget>[
SwitchListTile(
title: Text(widget.head),
value: _selected,
onChanged: (selected) {
setState(() {
_selected = selected;
widget.onSelected(selected);
});
},
),
kDividerTiny,
],
);
}
}
/// 输入文字
class TextSetting extends StatelessWidget {
final String leadingString;
final String hintString;
const TextSetting({
Key? key,
required this.leadingString,
required this.hintString,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return ListTile(
leading: Text(leadingString),
title: TextFormField(
decoration: InputDecoration(
hintText: hintString,
),
),
);
}
}

View File

@ -0,0 +1,11 @@
import 'package:flutter/material.dart';
class TodoScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text('Todo')),
body: const Center(child: Text('Todo')),
);
}
}

22
example/pubspec.yaml Normal file
View File

@ -0,0 +1,22 @@
name: amap_search_fluttify_example
description: Demonstrates how to use the amap_search_fluttify plugin.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
environment:
sdk: ">=2.17.1 <3.0.0"
dependencies:
flutter:
sdk: flutter
permission_handler: ^9.2.0
decorated_flutter: ^0.40.0-dev.0
amap_search_fluttify:
path: ../
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^2.0.0
flutter:
uses-material-design: true

View File

@ -0,0 +1 @@