├── .github
├── ISSUE_TEMPLATE
│ ├── ---.md
│ └── bug-report.md
└── workflows
│ └── CI.yml
├── .gitignore
├── .metadata
├── CHANGELOG.md
├── LICENSE
├── README.md
├── android
├── .gitignore
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
├── settings.gradle
└── src
│ └── main
│ ├── AndroidManifest.xml
│ └── kotlin
│ └── me
│ └── yohom
│ └── location_picker_fluttify
│ └── LocationPickerFluttifyPlugin.kt
├── example
├── .flutter-plugins-dependencies
├── .gitignore
├── .metadata
├── README.md
├── android
│ ├── app
│ │ ├── build.gradle
│ │ └── src
│ │ │ ├── debug
│ │ │ └── AndroidManifest.xml
│ │ │ ├── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── kotlin
│ │ │ │ └── me
│ │ │ │ │ └── yohom
│ │ │ │ │ └── location_picker_fluttify_example
│ │ │ │ │ └── MainActivity.kt
│ │ │ └── res
│ │ │ │ ├── drawable
│ │ │ │ └── launch_background.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ └── values
│ │ │ │ └── styles.xml
│ │ │ └── profile
│ │ │ └── AndroidManifest.xml
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradle
│ │ └── wrapper
│ │ │ └── gradle-wrapper.properties
│ └── settings.gradle
├── ios
│ ├── Flutter
│ │ ├── AppFrameworkInfo.plist
│ │ ├── Debug.xcconfig
│ │ ├── Flutter.podspec
│ │ └── Release.xcconfig
│ ├── Podfile
│ ├── Runner.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ └── Runner.xcscheme
│ ├── Runner.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── Runner
│ │ ├── AppDelegate.h
│ │ ├── AppDelegate.m
│ │ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ ├── Contents.json
│ │ │ ├── Icon-App-1024x1024@1x.png
│ │ │ ├── Icon-App-20x20@1x.png
│ │ │ ├── Icon-App-20x20@2x.png
│ │ │ ├── Icon-App-20x20@3x.png
│ │ │ ├── Icon-App-29x29@1x.png
│ │ │ ├── Icon-App-29x29@2x.png
│ │ │ ├── Icon-App-29x29@3x.png
│ │ │ ├── Icon-App-40x40@1x.png
│ │ │ ├── Icon-App-40x40@2x.png
│ │ │ ├── Icon-App-40x40@3x.png
│ │ │ ├── Icon-App-60x60@2x.png
│ │ │ ├── Icon-App-60x60@3x.png
│ │ │ ├── Icon-App-76x76@1x.png
│ │ │ ├── Icon-App-76x76@2x.png
│ │ │ └── Icon-App-83.5x83.5@2x.png
│ │ └── LaunchImage.imageset
│ │ │ ├── Contents.json
│ │ │ ├── LaunchImage.png
│ │ │ ├── LaunchImage@2x.png
│ │ │ ├── LaunchImage@3x.png
│ │ │ └── README.md
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── main.m
├── lib
│ └── main.dart
├── pubspec.lock
├── pubspec.yaml
└── test
│ └── widget_test.dart
├── images
├── 1.5x
│ ├── wechat_locate.png
│ └── wechat_locator.png
├── 2.0x
│ ├── wechat_locate.png
│ └── wechat_locator.png
├── 3.0x
│ ├── wechat_locate.png
│ └── wechat_locator.png
├── wechat_locate.png
└── wechat_locator.png
├── ios
├── .gitignore
├── Assets
│ └── .gitkeep
├── Classes
│ ├── LocationPickerFluttifyPlugin.h
│ └── LocationPickerFluttifyPlugin.m
└── location_picker_fluttify.podspec
├── lib
├── location_picker_fluttify.dart
└── src
│ ├── bloc
│ └── location_picker.bloc.dart
│ ├── ui
│ ├── route
│ │ └── decorated_route.route.dart
│ ├── screen
│ │ ├── candidates.widget.dart
│ │ ├── location_picker.screen.dart
│ │ ├── locator.widget.dart
│ │ ├── map_view.widget.dart
│ │ └── pointer.widget.dart
│ └── widget
│ │ ├── candidate_poi.widget.dart
│ │ ├── nonvisual
│ │ └── auto_close_keyboard.widget.dart
│ │ └── visual
│ │ ├── decorated
│ │ ├── decorated_flex.widget.dart
│ │ ├── decorated_text.widget.dart
│ │ ├── decorated_widget.widget.dart
│ │ └── fractional_screen.widget.dart
│ │ ├── placeholder
│ │ ├── empty_placeholder.widget.dart
│ │ ├── error_placeholder.widget.dart
│ │ └── loading.widget.dart
│ │ ├── preferred
│ │ ├── async_list_view.widget.dart
│ │ ├── debounce_text_field.widget.dart
│ │ ├── flat_text.widget.dart
│ │ ├── free
│ │ │ ├── free_bottom_sheet.widget.dart
│ │ │ ├── free_check_box.widget.dart
│ │ │ ├── free_dialog.widget.dart
│ │ │ └── tap_tooltip.widget.dart
│ │ ├── preferred_async_builder.widget.dart
│ │ └── primary_icon.widget.dart
│ │ └── special_affect
│ │ ├── blur.widget.dart
│ │ ├── carousel.widget.dart
│ │ ├── dot_indicator.widget.dart
│ │ ├── form_sheet.widget.dart
│ │ ├── gradient_button.widget.dart
│ │ ├── notification_badge.widget.dart
│ │ ├── rating_bar.widget.dart
│ │ ├── snap_list.widget.dart
│ │ └── unknown_route.screen.dart
│ └── utils
│ ├── bloc
│ ├── bloc.dart
│ ├── bloc_io.dart
│ └── bloc_provider.widget.dart
│ ├── empty_util.dart
│ ├── log.dart
│ ├── objects.dart
│ ├── permissions.dart
│ └── value.dart
├── pubspec.lock
├── pubspec.yaml
└── test
└── location_picker_fluttify_test.dart
/.github/ISSUE_TEMPLATE/---.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: 新功能
3 | about: 添加功能
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | **功能描述**
11 |
12 | **Native端对应字段/方法**
13 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug-report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: 遇到了bug.
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | **插件版本**
11 |
12 | **遇到bug的平台(Android/iOS)**
13 |
14 | **描述bug**
15 |
16 | **复现步骤**
17 |
18 | **期望行为**
19 |
20 | **截图**
21 |
22 | **flutter doctor**
23 |
--------------------------------------------------------------------------------
/.github/workflows/CI.yml:
--------------------------------------------------------------------------------
1 | name: CI
2 | on: [push]
3 | jobs:
4 | build:
5 | runs-on: macos-latest
6 | steps:
7 | - uses: actions/checkout@v1
8 | - uses: actions/setup-java@v1
9 | with:
10 | java-version: '12.x'
11 | - uses: subosito/flutter-action@v1
12 | with:
13 | channel: 'stable'
14 | - run: flutter pub get
15 | - run: flutter test
16 | - run: cd example; flutter build apk; flutter build ios --no-codesign;
17 |
18 |
19 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | .dart_tool/
3 |
4 | .packages
5 | .pub/
6 |
7 | build/
8 |
--------------------------------------------------------------------------------
/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: 68587a0916366e9512a78df22c44163d041dd5f3
8 | channel: stable
9 |
10 | project_type: plugin
11 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ## 0.0.3
2 | - enhance: 地图移动结束动画在获取到poi之前执行
3 | - enhance: 更新依赖
4 |
5 | ## 0.0.2
6 | - 移动地图后中心跳动
7 | - 拆分widget, 引入BLoC架构
8 |
9 | ## 0.0.1
10 | - mvp
11 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | TODO: Add your license here.
2 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # 位置选择器
2 |
3 | 一个位置选择器, 基于高德[地图插件](https://github.com/fluttify-project/amap_map_fluttify)和[搜索插件](https://github.com/fluttify-project/amap_search_fluttify), 目标是和微信的位置选择器一模一样的同时, 提供尽可能高的可定制化.
--------------------------------------------------------------------------------
/android/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/workspace.xml
5 | /.idea/libraries
6 | .DS_Store
7 | /build
8 | /captures
9 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | group 'me.yohom.location_picker_fluttify'
2 | version '1.0-SNAPSHOT'
3 |
4 | buildscript {
5 | ext.kotlin_version = '1.3.50'
6 | repositories {
7 | google()
8 | jcenter()
9 | }
10 |
11 | dependencies {
12 | classpath 'com.android.tools.build:gradle:3.5.0'
13 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
14 | }
15 | }
16 |
17 | rootProject.allprojects {
18 | repositories {
19 | google()
20 | jcenter()
21 | }
22 | }
23 |
24 | apply plugin: 'com.android.library'
25 | apply plugin: 'kotlin-android'
26 |
27 | android {
28 | compileSdkVersion 28
29 |
30 | sourceSets {
31 | main.java.srcDirs += 'src/main/kotlin'
32 | }
33 | defaultConfig {
34 | minSdkVersion 16
35 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
36 | }
37 | lintOptions {
38 | disable 'InvalidPackage'
39 | }
40 | }
41 |
42 | dependencies {
43 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
44 | }
45 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 |
3 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | zipStoreBase=GRADLE_USER_HOME
4 | zipStorePath=wrapper/dists
5 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
6 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'location_picker_fluttify'
2 |
--------------------------------------------------------------------------------
/android/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
--------------------------------------------------------------------------------
/android/src/main/kotlin/me/yohom/location_picker_fluttify/LocationPickerFluttifyPlugin.kt:
--------------------------------------------------------------------------------
1 | package me.yohom.location_picker_fluttify
2 |
3 | import io.flutter.plugin.common.MethodCall
4 | import io.flutter.plugin.common.MethodChannel
5 | import io.flutter.plugin.common.MethodChannel.MethodCallHandler
6 | import io.flutter.plugin.common.MethodChannel.Result
7 | import io.flutter.plugin.common.PluginRegistry.Registrar
8 |
9 | class LocationPickerFluttifyPlugin: MethodCallHandler {
10 | companion object {
11 | @JvmStatic
12 | fun registerWith(registrar: Registrar) {
13 | val channel = MethodChannel(registrar.messenger(), "location_picker_fluttify")
14 | channel.setMethodCallHandler(LocationPickerFluttifyPlugin())
15 | }
16 | }
17 |
18 | override fun onMethodCall(call: MethodCall, result: Result) {
19 | if (call.method == "getPlatformVersion") {
20 | result.success("Android ${android.os.Build.VERSION.RELEASE}")
21 | } else {
22 | result.notImplemented()
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/example/.flutter-plugins-dependencies:
--------------------------------------------------------------------------------
1 | {"_info":"// This is a generated file; do not edit or check into version control.","dependencyGraph":[{"name":"amap_core_fluttify","dependencies":["foundation_fluttify"]},{"name":"amap_map_fluttify","dependencies":["amap_core_fluttify","url_launcher"]},{"name":"amap_search_fluttify","dependencies":["amap_core_fluttify"]},{"name":"foundation_fluttify","dependencies":[]},{"name":"location_picker_fluttify","dependencies":["amap_map_fluttify","amap_search_fluttify","permission_handler"]},{"name":"permission_handler","dependencies":[]},{"name":"url_launcher","dependencies":["url_launcher_web","url_launcher_macos"]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]}]}
--------------------------------------------------------------------------------
/example/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 |
12 | # IntelliJ related
13 | *.iml
14 | *.ipr
15 | *.iws
16 | .idea/
17 |
18 | # The .vscode folder contains launch configuration and tasks you configure in
19 | # VS Code which you may wish to be included in version control, so this line
20 | # is commented out by default.
21 | #.vscode/
22 |
23 | # Flutter/Dart/Pub related
24 | **/doc/api/
25 | .dart_tool/
26 | .flutter-plugins
27 | .packages
28 | .pub-cache/
29 | .pub/
30 | /build/
31 |
32 | # Android related
33 | **/android/**/gradle-wrapper.jar
34 | **/android/.gradle
35 | **/android/captures/
36 | **/android/gradlew
37 | **/android/gradlew.bat
38 | **/android/local.properties
39 | **/android/**/GeneratedPluginRegistrant.java
40 |
41 | # iOS/XCode related
42 | **/ios/**/*.mode1v3
43 | **/ios/**/*.mode2v3
44 | **/ios/**/*.moved-aside
45 | **/ios/**/*.pbxuser
46 | **/ios/**/*.perspectivev3
47 | **/ios/**/*sync/
48 | **/ios/**/.sconsign.dblite
49 | **/ios/**/.tags*
50 | **/ios/**/.vagrant/
51 | **/ios/**/DerivedData/
52 | **/ios/**/Icon?
53 | **/ios/**/Pods/
54 | **/ios/**/.symlinks/
55 | **/ios/**/profile
56 | **/ios/**/xcuserdata
57 | **/ios/.generated/
58 | **/ios/Flutter/App.framework
59 | **/ios/Flutter/Flutter.framework
60 | **/ios/Flutter/Generated.xcconfig
61 | **/ios/Flutter/app.flx
62 | **/ios/Flutter/app.zip
63 | **/ios/Flutter/flutter_assets/
64 | **/ios/Flutter/flutter_export_environment.sh
65 | **/ios/ServiceDefinitions.json
66 | **/ios/Runner/GeneratedPluginRegistrant.*
67 |
68 | # Exceptions to above rules.
69 | !**/ios/**/default.mode1v3
70 | !**/ios/**/default.mode2v3
71 | !**/ios/**/default.pbxuser
72 | !**/ios/**/default.perspectivev3
73 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
74 |
--------------------------------------------------------------------------------
/example/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: 68587a0916366e9512a78df22c44163d041dd5f3
8 | channel: stable
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/example/README.md:
--------------------------------------------------------------------------------
1 | # location_picker_fluttify_example
2 |
3 | Demonstrates how to use the location_picker_fluttify plugin.
4 |
5 | ## Getting Started
6 |
7 | This project is a starting point for a Flutter application.
8 |
9 | A few resources to get you started if this is your first Flutter project:
10 |
11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
13 |
14 | For help getting started with Flutter, view our
15 | [online documentation](https://flutter.dev/docs), which offers tutorials,
16 | samples, guidance on mobile development, and a full API reference.
17 |
--------------------------------------------------------------------------------
/example/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | def localProperties = new Properties()
2 | def localPropertiesFile = rootProject.file('local.properties')
3 | if (localPropertiesFile.exists()) {
4 | localPropertiesFile.withReader('UTF-8') { reader ->
5 | localProperties.load(reader)
6 | }
7 | }
8 |
9 | def flutterRoot = localProperties.getProperty('flutter.sdk')
10 | if (flutterRoot == null) {
11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12 | }
13 |
14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15 | if (flutterVersionCode == null) {
16 | flutterVersionCode = '1'
17 | }
18 |
19 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
20 | if (flutterVersionName == null) {
21 | flutterVersionName = '1.0'
22 | }
23 |
24 | apply plugin: 'com.android.application'
25 | apply plugin: 'kotlin-android'
26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27 |
28 | android {
29 | compileSdkVersion 28
30 |
31 | sourceSets {
32 | main.java.srcDirs += 'src/main/kotlin'
33 | }
34 |
35 | lintOptions {
36 | disable 'InvalidPackage'
37 | }
38 |
39 | defaultConfig {
40 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
41 | applicationId "me.yohom.location_picker_fluttify_example"
42 | minSdkVersion 16
43 | targetSdkVersion 28
44 | versionCode flutterVersionCode.toInteger()
45 | versionName flutterVersionName
46 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
47 | }
48 |
49 | buildTypes {
50 | release {
51 | // TODO: Add your own signing config for the release build.
52 | // Signing with the debug keys for now, so `flutter run --release` works.
53 | signingConfig signingConfigs.debug
54 | }
55 | }
56 | }
57 |
58 | flutter {
59 | source '../..'
60 | }
61 |
62 | dependencies {
63 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
64 | testImplementation 'junit:junit:4.12'
65 | androidTestImplementation 'androidx.test.ext:junit:1.1.1'
66 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
67 | }
68 |
--------------------------------------------------------------------------------
/example/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
9 |
13 |
14 |
17 |
18 |
25 |
29 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/example/android/app/src/main/kotlin/me/yohom/location_picker_fluttify_example/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package me.yohom.location_picker_fluttify_example
2 |
3 | import android.os.Bundle
4 |
5 | import io.flutter.app.FlutterActivity
6 | import io.flutter.plugins.GeneratedPluginRegistrant
7 |
8 | class MainActivity: FlutterActivity() {
9 | override fun onCreate(savedInstanceState: Bundle?) {
10 | super.onCreate(savedInstanceState)
11 | GeneratedPluginRegistrant.registerWith(this)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fluttify-project/location_picker_fluttify/f8fa890353ab4e7df090427337453c836cb54cb1/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fluttify-project/location_picker_fluttify/f8fa890353ab4e7df090427337453c836cb54cb1/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fluttify-project/location_picker_fluttify/f8fa890353ab4e7df090427337453c836cb54cb1/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fluttify-project/location_picker_fluttify/f8fa890353ab4e7df090427337453c836cb54cb1/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fluttify-project/location_picker_fluttify/f8fa890353ab4e7df090427337453c836cb54cb1/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
--------------------------------------------------------------------------------
/example/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.3.50'
3 | repositories {
4 | google()
5 | jcenter()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:3.5.0'
10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11 | }
12 | }
13 |
14 | allprojects {
15 | repositories {
16 | google()
17 | jcenter()
18 | }
19 | }
20 |
21 | rootProject.buildDir = '../build'
22 | subprojects {
23 | project.buildDir = "${rootProject.buildDir}/${project.name}"
24 | }
25 | subprojects {
26 | project.evaluationDependsOn(':app')
27 | }
28 |
29 | task clean(type: Delete) {
30 | delete rootProject.buildDir
31 | }
32 |
--------------------------------------------------------------------------------
/example/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 |
3 | android.enableR8=true
4 | android.useAndroidX=true
5 | android.enableJetifier=true
6 |
--------------------------------------------------------------------------------
/example/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Jun 23 08:50:38 CEST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
7 |
--------------------------------------------------------------------------------
/example/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
4 |
5 | def plugins = new Properties()
6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
7 | if (pluginsFile.exists()) {
8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
9 | }
10 |
11 | plugins.each { name, path ->
12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
13 | include ":$name"
14 | project(":$name").projectDir = pluginDirectory
15 | }
16 |
--------------------------------------------------------------------------------
/example/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 8.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/example/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/example/ios/Flutter/Flutter.podspec:
--------------------------------------------------------------------------------
1 | #
2 | # NOTE: This podspec is NOT to be published. It is only used as a local source!
3 | #
4 |
5 | Pod::Spec.new do |s|
6 | s.name = 'Flutter'
7 | s.version = '1.0.0'
8 | s.summary = 'High-performance, high-fidelity mobile apps.'
9 | s.description = <<-DESC
10 | Flutter provides an easy and productive way to build and deploy high-performance mobile apps for Android and iOS.
11 | DESC
12 | s.homepage = 'https://flutter.io'
13 | s.license = { :type => 'MIT' }
14 | s.author = { 'Flutter Dev Team' => 'flutter-dev@googlegroups.com' }
15 | s.source = { :git => 'https://github.com/flutter/engine', :tag => s.version.to_s }
16 | s.ios.deployment_target = '8.0'
17 | s.vendored_frameworks = 'Flutter.framework'
18 | end
19 |
--------------------------------------------------------------------------------
/example/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/example/ios/Podfile:
--------------------------------------------------------------------------------
1 | # Uncomment this line to define a global platform for your project
2 | # platform :ios, '9.0'
3 |
4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true'
6 |
7 | project 'Runner', {
8 | 'Debug' => :debug,
9 | 'Profile' => :release,
10 | 'Release' => :release,
11 | }
12 |
13 | def parse_KV_file(file, separator='=')
14 | file_abs_path = File.expand_path(file)
15 | if !File.exists? file_abs_path
16 | return [];
17 | end
18 | generated_key_values = {}
19 | skip_line_start_symbols = ["#", "/"]
20 | File.foreach(file_abs_path) do |line|
21 | next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
22 | plugin = line.split(pattern=separator)
23 | if plugin.length == 2
24 | podname = plugin[0].strip()
25 | path = plugin[1].strip()
26 | podpath = File.expand_path("#{path}", file_abs_path)
27 | generated_key_values[podname] = podpath
28 | else
29 | puts "Invalid plugin specification: #{line}"
30 | end
31 | end
32 | generated_key_values
33 | end
34 |
35 | target 'Runner' do
36 | # Flutter Pod
37 |
38 | copied_flutter_dir = File.join(__dir__, 'Flutter')
39 | copied_framework_path = File.join(copied_flutter_dir, 'Flutter.framework')
40 | copied_podspec_path = File.join(copied_flutter_dir, 'Flutter.podspec')
41 | unless File.exist?(copied_framework_path) && File.exist?(copied_podspec_path)
42 | # Copy Flutter.framework and Flutter.podspec to Flutter/ to have something to link against if the xcode backend script has not run yet.
43 | # That script will copy the correct debug/profile/release version of the framework based on the currently selected Xcode configuration.
44 | # CocoaPods will not embed the framework on pod install (before any build phases can generate) if the dylib does not exist.
45 |
46 | generated_xcode_build_settings_path = File.join(copied_flutter_dir, 'Generated.xcconfig')
47 | unless File.exist?(generated_xcode_build_settings_path)
48 | raise "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first"
49 | end
50 | generated_xcode_build_settings = parse_KV_file(generated_xcode_build_settings_path)
51 | cached_framework_dir = generated_xcode_build_settings['FLUTTER_FRAMEWORK_DIR'];
52 |
53 | unless File.exist?(copied_framework_path)
54 | FileUtils.cp_r(File.join(cached_framework_dir, 'Flutter.framework'), copied_flutter_dir)
55 | end
56 | unless File.exist?(copied_podspec_path)
57 | FileUtils.cp(File.join(cached_framework_dir, 'Flutter.podspec'), copied_flutter_dir)
58 | end
59 | end
60 |
61 | # Keep pod path relative so it can be checked into Podfile.lock.
62 | pod 'Flutter', :path => 'Flutter'
63 |
64 | # Plugin Pods
65 |
66 | # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
67 | # referring to absolute paths on developers' machines.
68 | system('rm -rf .symlinks')
69 | system('mkdir -p .symlinks/plugins')
70 | plugin_pods = parse_KV_file('../.flutter-plugins')
71 | plugin_pods.each do |name, path|
72 | symlink = File.join('.symlinks', 'plugins', name)
73 | File.symlink(path, symlink)
74 | pod name, :path => File.join(symlink, 'ios')
75 | end
76 | end
77 |
78 | # Prevent Cocoapods from embedding a second Flutter framework and causing an error with the new Xcode build system.
79 | install! 'cocoapods', :disable_input_output_paths => true
80 |
81 | post_install do |installer|
82 | installer.pods_project.targets.each do |target|
83 | target.build_configurations.each do |config|
84 | config.build_settings['ENABLE_BITCODE'] = 'NO'
85 | end
86 | end
87 | end
88 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
54 |
56 |
62 |
63 |
64 |
65 |
66 |
67 |
73 |
75 |
81 |
82 |
83 |
84 |
86 |
87 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/example/ios/Runner/AppDelegate.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | @interface AppDelegate : FlutterAppDelegate
5 |
6 | @end
7 |
--------------------------------------------------------------------------------
/example/ios/Runner/AppDelegate.m:
--------------------------------------------------------------------------------
1 | #include "AppDelegate.h"
2 | #include "GeneratedPluginRegistrant.h"
3 |
4 | @implementation AppDelegate
5 |
6 | - (BOOL)application:(UIApplication *)application
7 | didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
8 | [GeneratedPluginRegistrant registerWithRegistry:self];
9 | // Override point for customization after application launch.
10 | return [super application:application didFinishLaunchingWithOptions:launchOptions];
11 | }
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "20x20",
5 | "idiom" : "iphone",
6 | "filename" : "Icon-App-20x20@2x.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "Icon-App-20x20@3x.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "Icon-App-29x29@1x.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "29x29",
23 | "idiom" : "iphone",
24 | "filename" : "Icon-App-29x29@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "29x29",
29 | "idiom" : "iphone",
30 | "filename" : "Icon-App-29x29@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "40x40",
35 | "idiom" : "iphone",
36 | "filename" : "Icon-App-40x40@2x.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "40x40",
41 | "idiom" : "iphone",
42 | "filename" : "Icon-App-40x40@3x.png",
43 | "scale" : "3x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "Icon-App-60x60@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "60x60",
53 | "idiom" : "iphone",
54 | "filename" : "Icon-App-60x60@3x.png",
55 | "scale" : "3x"
56 | },
57 | {
58 | "size" : "20x20",
59 | "idiom" : "ipad",
60 | "filename" : "Icon-App-20x20@1x.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "20x20",
65 | "idiom" : "ipad",
66 | "filename" : "Icon-App-20x20@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "29x29",
71 | "idiom" : "ipad",
72 | "filename" : "Icon-App-29x29@1x.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "29x29",
77 | "idiom" : "ipad",
78 | "filename" : "Icon-App-29x29@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "40x40",
83 | "idiom" : "ipad",
84 | "filename" : "Icon-App-40x40@1x.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "40x40",
89 | "idiom" : "ipad",
90 | "filename" : "Icon-App-40x40@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "76x76",
95 | "idiom" : "ipad",
96 | "filename" : "Icon-App-76x76@1x.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "76x76",
101 | "idiom" : "ipad",
102 | "filename" : "Icon-App-76x76@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "83.5x83.5",
107 | "idiom" : "ipad",
108 | "filename" : "Icon-App-83.5x83.5@2x.png",
109 | "scale" : "2x"
110 | },
111 | {
112 | "size" : "1024x1024",
113 | "idiom" : "ios-marketing",
114 | "filename" : "Icon-App-1024x1024@1x.png",
115 | "scale" : "1x"
116 | }
117 | ],
118 | "info" : {
119 | "version" : 1,
120 | "author" : "xcode"
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fluttify-project/location_picker_fluttify/f8fa890353ab4e7df090427337453c836cb54cb1/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fluttify-project/location_picker_fluttify/f8fa890353ab4e7df090427337453c836cb54cb1/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fluttify-project/location_picker_fluttify/f8fa890353ab4e7df090427337453c836cb54cb1/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fluttify-project/location_picker_fluttify/f8fa890353ab4e7df090427337453c836cb54cb1/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fluttify-project/location_picker_fluttify/f8fa890353ab4e7df090427337453c836cb54cb1/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fluttify-project/location_picker_fluttify/f8fa890353ab4e7df090427337453c836cb54cb1/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fluttify-project/location_picker_fluttify/f8fa890353ab4e7df090427337453c836cb54cb1/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fluttify-project/location_picker_fluttify/f8fa890353ab4e7df090427337453c836cb54cb1/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fluttify-project/location_picker_fluttify/f8fa890353ab4e7df090427337453c836cb54cb1/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fluttify-project/location_picker_fluttify/f8fa890353ab4e7df090427337453c836cb54cb1/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fluttify-project/location_picker_fluttify/f8fa890353ab4e7df090427337453c836cb54cb1/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fluttify-project/location_picker_fluttify/f8fa890353ab4e7df090427337453c836cb54cb1/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fluttify-project/location_picker_fluttify/f8fa890353ab4e7df090427337453c836cb54cb1/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fluttify-project/location_picker_fluttify/f8fa890353ab4e7df090427337453c836cb54cb1/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fluttify-project/location_picker_fluttify/f8fa890353ab4e7df090427337453c836cb54cb1/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchImage.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchImage@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "LaunchImage@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fluttify-project/location_picker_fluttify/f8fa890353ab4e7df090427337453c836cb54cb1/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fluttify-project/location_picker_fluttify/f8fa890353ab4e7df090427337453c836cb54cb1/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fluttify-project/location_picker_fluttify/f8fa890353ab4e7df090427337453c836cb54cb1/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md:
--------------------------------------------------------------------------------
1 | # Launch Screen Assets
2 |
3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory.
4 |
5 | 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.
--------------------------------------------------------------------------------
/example/ios/Runner/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/example/ios/Runner/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/example/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | location_picker_fluttify_example
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | $(FLUTTER_BUILD_NAME)
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(FLUTTER_BUILD_NUMBER)
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UISupportedInterfaceOrientations
30 |
31 | UIInterfaceOrientationPortrait
32 | UIInterfaceOrientationLandscapeLeft
33 | UIInterfaceOrientationLandscapeRight
34 |
35 | UISupportedInterfaceOrientations~ipad
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationPortraitUpsideDown
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 | UIViewControllerBasedStatusBarAppearance
43 |
44 | io.flutter.embedded_views_preview
45 | YES
46 | NSLocationWhenInUseUsageDescription
47 | 需要定位权限
48 | LSApplicationQueriesSchemes
49 |
50 | iosamap
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/example/ios/Runner/main.m:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 | #import "AppDelegate.h"
4 |
5 | int main(int argc, char* argv[]) {
6 | @autoreleasepool {
7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/example/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/cupertino.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:location_picker_fluttify/location_picker_fluttify.dart';
4 |
5 | Future main() async {
6 | await enableFluttifyLog(false);
7 | await AmapCore.init('0a536ec318043a4b61e7b2a8796fba41');
8 | runApp(MyApp());
9 | }
10 |
11 | class MyApp extends StatelessWidget {
12 | @override
13 | Widget build(BuildContext context) {
14 | return MaterialApp(home: HomeScreen());
15 | }
16 | }
17 |
18 | class HomeScreen extends StatefulWidget {
19 | @override
20 | _HomeScreenState createState() => _HomeScreenState();
21 | }
22 |
23 | class _HomeScreenState extends State {
24 | String _title;
25 |
26 | @override
27 | Widget build(BuildContext context) {
28 | return Scaffold(
29 | body: Column(
30 | crossAxisAlignment: CrossAxisAlignment.stretch,
31 | mainAxisAlignment: MainAxisAlignment.center,
32 | children: [
33 | RaisedButton(
34 | onPressed: () => _handleShowPicker(context),
35 | child: Text('地址选择器'),
36 | ),
37 | if (_title != null) Text(_title, textAlign: TextAlign.center),
38 | ],
39 | ),
40 | );
41 | }
42 |
43 | Future _handleShowPicker(BuildContext context) async {
44 | final poi = await showLocationPicker(
45 | context,
46 | poiBuilder: (context, poi) async {
47 | return CandidatePoi(
48 | onTap: () => Navigator.pop(context, poi),
49 | title: Text(
50 | await poi.title,
51 | style: TextStyle(color: Colors.black, fontSize: 18),
52 | ),
53 | subtitle: Text(
54 | await poi.address,
55 | overflow: TextOverflow.ellipsis,
56 | ),
57 | );
58 | },
59 | );
60 | poi.title.then((title) => setState(() => _title = title));
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/example/pubspec.lock:
--------------------------------------------------------------------------------
1 | # Generated by pub
2 | # See https://dart.dev/tools/pub/glossary#lockfile
3 | packages:
4 | after_layout:
5 | dependency: transitive
6 | description:
7 | name: after_layout
8 | url: "https://pub.dartlang.org"
9 | source: hosted
10 | version: "1.0.7+2"
11 | amap_core_fluttify:
12 | dependency: transitive
13 | description:
14 | name: amap_core_fluttify
15 | url: "https://pub.dartlang.org"
16 | source: hosted
17 | version: "0.3.0+e26c0fa"
18 | amap_map_fluttify:
19 | dependency: transitive
20 | description:
21 | name: amap_map_fluttify
22 | url: "https://pub.dartlang.org"
23 | source: hosted
24 | version: "0.14.2+e26c0fa"
25 | amap_search_fluttify:
26 | dependency: transitive
27 | description:
28 | name: amap_search_fluttify
29 | url: "https://pub.dartlang.org"
30 | source: hosted
31 | version: "0.5.0+acdcd89"
32 | archive:
33 | dependency: transitive
34 | description:
35 | name: archive
36 | url: "https://pub.dartlang.org"
37 | source: hosted
38 | version: "2.0.11"
39 | args:
40 | dependency: transitive
41 | description:
42 | name: args
43 | url: "https://pub.dartlang.org"
44 | source: hosted
45 | version: "1.5.2"
46 | async:
47 | dependency: transitive
48 | description:
49 | name: async
50 | url: "https://pub.dartlang.org"
51 | source: hosted
52 | version: "2.4.0"
53 | boolean_selector:
54 | dependency: transitive
55 | description:
56 | name: boolean_selector
57 | url: "https://pub.dartlang.org"
58 | source: hosted
59 | version: "1.0.5"
60 | charcode:
61 | dependency: transitive
62 | description:
63 | name: charcode
64 | url: "https://pub.dartlang.org"
65 | source: hosted
66 | version: "1.1.2"
67 | collection:
68 | dependency: transitive
69 | description:
70 | name: collection
71 | url: "https://pub.dartlang.org"
72 | source: hosted
73 | version: "1.14.11"
74 | convert:
75 | dependency: transitive
76 | description:
77 | name: convert
78 | url: "https://pub.dartlang.org"
79 | source: hosted
80 | version: "2.1.1"
81 | crypto:
82 | dependency: transitive
83 | description:
84 | name: crypto
85 | url: "https://pub.dartlang.org"
86 | source: hosted
87 | version: "2.1.3"
88 | cupertino_icons:
89 | dependency: "direct main"
90 | description:
91 | name: cupertino_icons
92 | url: "https://pub.dartlang.org"
93 | source: hosted
94 | version: "0.1.2"
95 | flutter:
96 | dependency: "direct main"
97 | description: flutter
98 | source: sdk
99 | version: "0.0.0"
100 | flutter_test:
101 | dependency: "direct dev"
102 | description: flutter
103 | source: sdk
104 | version: "0.0.0"
105 | flutter_web_plugins:
106 | dependency: transitive
107 | description: flutter
108 | source: sdk
109 | version: "0.0.0"
110 | foundation_fluttify:
111 | dependency: transitive
112 | description:
113 | name: foundation_fluttify
114 | url: "https://pub.dartlang.org"
115 | source: hosted
116 | version: "0.3.0"
117 | image:
118 | dependency: transitive
119 | description:
120 | name: image
121 | url: "https://pub.dartlang.org"
122 | source: hosted
123 | version: "2.1.4"
124 | location_picker_fluttify:
125 | dependency: "direct dev"
126 | description:
127 | path: ".."
128 | relative: true
129 | source: path
130 | version: "0.0.3"
131 | matcher:
132 | dependency: transitive
133 | description:
134 | name: matcher
135 | url: "https://pub.dartlang.org"
136 | source: hosted
137 | version: "0.12.6"
138 | meta:
139 | dependency: transitive
140 | description:
141 | name: meta
142 | url: "https://pub.dartlang.org"
143 | source: hosted
144 | version: "1.1.8"
145 | path:
146 | dependency: transitive
147 | description:
148 | name: path
149 | url: "https://pub.dartlang.org"
150 | source: hosted
151 | version: "1.6.4"
152 | pedantic:
153 | dependency: transitive
154 | description:
155 | name: pedantic
156 | url: "https://pub.dartlang.org"
157 | source: hosted
158 | version: "1.8.0+1"
159 | permission_handler:
160 | dependency: transitive
161 | description:
162 | name: permission_handler
163 | url: "https://pub.dartlang.org"
164 | source: hosted
165 | version: "4.0.0"
166 | petitparser:
167 | dependency: transitive
168 | description:
169 | name: petitparser
170 | url: "https://pub.dartlang.org"
171 | source: hosted
172 | version: "2.4.0"
173 | plugin_platform_interface:
174 | dependency: transitive
175 | description:
176 | name: plugin_platform_interface
177 | url: "https://pub.dartlang.org"
178 | source: hosted
179 | version: "1.0.1"
180 | quiver:
181 | dependency: transitive
182 | description:
183 | name: quiver
184 | url: "https://pub.dartlang.org"
185 | source: hosted
186 | version: "2.0.5"
187 | rxdart:
188 | dependency: transitive
189 | description:
190 | name: rxdart
191 | url: "https://pub.dartlang.org"
192 | source: hosted
193 | version: "0.23.1"
194 | sky_engine:
195 | dependency: transitive
196 | description: flutter
197 | source: sdk
198 | version: "0.0.99"
199 | source_span:
200 | dependency: transitive
201 | description:
202 | name: source_span
203 | url: "https://pub.dartlang.org"
204 | source: hosted
205 | version: "1.5.5"
206 | stack_trace:
207 | dependency: transitive
208 | description:
209 | name: stack_trace
210 | url: "https://pub.dartlang.org"
211 | source: hosted
212 | version: "1.9.3"
213 | stream_channel:
214 | dependency: transitive
215 | description:
216 | name: stream_channel
217 | url: "https://pub.dartlang.org"
218 | source: hosted
219 | version: "2.0.0"
220 | string_scanner:
221 | dependency: transitive
222 | description:
223 | name: string_scanner
224 | url: "https://pub.dartlang.org"
225 | source: hosted
226 | version: "1.0.5"
227 | term_glyph:
228 | dependency: transitive
229 | description:
230 | name: term_glyph
231 | url: "https://pub.dartlang.org"
232 | source: hosted
233 | version: "1.1.0"
234 | test_api:
235 | dependency: transitive
236 | description:
237 | name: test_api
238 | url: "https://pub.dartlang.org"
239 | source: hosted
240 | version: "0.2.11"
241 | typed_data:
242 | dependency: transitive
243 | description:
244 | name: typed_data
245 | url: "https://pub.dartlang.org"
246 | source: hosted
247 | version: "1.1.6"
248 | url_launcher:
249 | dependency: transitive
250 | description:
251 | name: url_launcher
252 | url: "https://pub.dartlang.org"
253 | source: hosted
254 | version: "5.4.1"
255 | url_launcher_macos:
256 | dependency: transitive
257 | description:
258 | name: url_launcher_macos
259 | url: "https://pub.dartlang.org"
260 | source: hosted
261 | version: "0.0.1+2"
262 | url_launcher_platform_interface:
263 | dependency: transitive
264 | description:
265 | name: url_launcher_platform_interface
266 | url: "https://pub.dartlang.org"
267 | source: hosted
268 | version: "1.0.4"
269 | url_launcher_web:
270 | dependency: transitive
271 | description:
272 | name: url_launcher_web
273 | url: "https://pub.dartlang.org"
274 | source: hosted
275 | version: "0.1.0+2"
276 | vector_math:
277 | dependency: transitive
278 | description:
279 | name: vector_math
280 | url: "https://pub.dartlang.org"
281 | source: hosted
282 | version: "2.0.8"
283 | xml:
284 | dependency: transitive
285 | description:
286 | name: xml
287 | url: "https://pub.dartlang.org"
288 | source: hosted
289 | version: "3.5.0"
290 | sdks:
291 | dart: ">=2.6.0 <3.0.0"
292 | flutter: ">=1.12.13 <2.0.0"
293 |
--------------------------------------------------------------------------------
/example/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: location_picker_fluttify_example
2 | description: Demonstrates how to use the location_picker_fluttify plugin.
3 | publish_to: 'none'
4 |
5 | environment:
6 | sdk: ">=2.2.2 <3.0.0"
7 |
8 | dependencies:
9 | flutter:
10 | sdk: flutter
11 | cupertino_icons: ^0.1.2
12 |
13 | dev_dependencies:
14 | flutter_test:
15 | sdk: flutter
16 | location_picker_fluttify:
17 | path: ../
18 |
19 | flutter:
20 | uses-material-design: true
--------------------------------------------------------------------------------
/example/test/widget_test.dart:
--------------------------------------------------------------------------------
1 | // This is a basic Flutter widget test.
2 | //
3 | // To perform an interaction with a widget in your test, use the WidgetTester
4 | // utility that Flutter provides. For example, you can send tap and scroll
5 | // gestures. You can also use WidgetTester to find child widgets in the widget
6 | // tree, read text, and verify that the values of widget properties are correct.
7 |
8 | import 'package:flutter/material.dart';
9 | import 'package:flutter_test/flutter_test.dart';
10 |
11 | import 'package:location_picker_fluttify_example/main.dart';
12 |
13 | void main() {
14 | testWidgets('Verify Platform version', (WidgetTester tester) async {
15 | // Build our app and trigger a frame.
16 | await tester.pumpWidget(MyApp());
17 |
18 | // Verify that platform version is retrieved.
19 | expect(
20 | find.byWidgetPredicate(
21 | (Widget widget) => widget is Text &&
22 | widget.data.startsWith('Running on:'),
23 | ),
24 | findsOneWidget,
25 | );
26 | });
27 | }
28 |
--------------------------------------------------------------------------------
/images/1.5x/wechat_locate.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fluttify-project/location_picker_fluttify/f8fa890353ab4e7df090427337453c836cb54cb1/images/1.5x/wechat_locate.png
--------------------------------------------------------------------------------
/images/1.5x/wechat_locator.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fluttify-project/location_picker_fluttify/f8fa890353ab4e7df090427337453c836cb54cb1/images/1.5x/wechat_locator.png
--------------------------------------------------------------------------------
/images/2.0x/wechat_locate.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fluttify-project/location_picker_fluttify/f8fa890353ab4e7df090427337453c836cb54cb1/images/2.0x/wechat_locate.png
--------------------------------------------------------------------------------
/images/2.0x/wechat_locator.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fluttify-project/location_picker_fluttify/f8fa890353ab4e7df090427337453c836cb54cb1/images/2.0x/wechat_locator.png
--------------------------------------------------------------------------------
/images/3.0x/wechat_locate.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fluttify-project/location_picker_fluttify/f8fa890353ab4e7df090427337453c836cb54cb1/images/3.0x/wechat_locate.png
--------------------------------------------------------------------------------
/images/3.0x/wechat_locator.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fluttify-project/location_picker_fluttify/f8fa890353ab4e7df090427337453c836cb54cb1/images/3.0x/wechat_locator.png
--------------------------------------------------------------------------------
/images/wechat_locate.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fluttify-project/location_picker_fluttify/f8fa890353ab4e7df090427337453c836cb54cb1/images/wechat_locate.png
--------------------------------------------------------------------------------
/images/wechat_locator.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fluttify-project/location_picker_fluttify/f8fa890353ab4e7df090427337453c836cb54cb1/images/wechat_locator.png
--------------------------------------------------------------------------------
/ios/.gitignore:
--------------------------------------------------------------------------------
1 | .idea/
2 | .vagrant/
3 | .sconsign.dblite
4 | .svn/
5 |
6 | .DS_Store
7 | *.swp
8 | profile
9 |
10 | DerivedData/
11 | build/
12 | GeneratedPluginRegistrant.h
13 | GeneratedPluginRegistrant.m
14 |
15 | .generated/
16 |
17 | *.pbxuser
18 | *.mode1v3
19 | *.mode2v3
20 | *.perspectivev3
21 |
22 | !default.pbxuser
23 | !default.mode1v3
24 | !default.mode2v3
25 | !default.perspectivev3
26 |
27 | xcuserdata
28 |
29 | *.moved-aside
30 |
31 | *.pyc
32 | *sync/
33 | Icon?
34 | .tags*
35 |
36 | /Flutter/Generated.xcconfig
37 | /Flutter/flutter_export_environment.sh
--------------------------------------------------------------------------------
/ios/Assets/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fluttify-project/location_picker_fluttify/f8fa890353ab4e7df090427337453c836cb54cb1/ios/Assets/.gitkeep
--------------------------------------------------------------------------------
/ios/Classes/LocationPickerFluttifyPlugin.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @interface LocationPickerFluttifyPlugin : NSObject
4 | @end
5 |
--------------------------------------------------------------------------------
/ios/Classes/LocationPickerFluttifyPlugin.m:
--------------------------------------------------------------------------------
1 | #import "LocationPickerFluttifyPlugin.h"
2 |
3 | @implementation LocationPickerFluttifyPlugin
4 | + (void)registerWithRegistrar:(NSObject*)registrar {
5 | FlutterMethodChannel* channel = [FlutterMethodChannel
6 | methodChannelWithName:@"location_picker_fluttify"
7 | binaryMessenger:[registrar messenger]];
8 | LocationPickerFluttifyPlugin* instance = [[LocationPickerFluttifyPlugin alloc] init];
9 | [registrar addMethodCallDelegate:instance channel:channel];
10 | }
11 |
12 | - (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result {
13 | if ([@"getPlatformVersion" isEqualToString:call.method]) {
14 | result([@"iOS " stringByAppendingString:[[UIDevice currentDevice] systemVersion]]);
15 | } else {
16 | result(FlutterMethodNotImplemented);
17 | }
18 | }
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/ios/location_picker_fluttify.podspec:
--------------------------------------------------------------------------------
1 | #
2 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
3 | #
4 | Pod::Spec.new do |s|
5 | s.name = 'location_picker_fluttify'
6 | s.version = '0.0.1'
7 | s.summary = 'A Location Picker. Based on `amap_x_fluttify` plugins.'
8 | s.description = <<-DESC
9 | A Location Picker. Based on `amap_x_fluttify` plugins.
10 | DESC
11 | s.homepage = 'http://example.com'
12 | s.license = { :file => '../LICENSE' }
13 | s.author = { 'Your Company' => 'email@example.com' }
14 | s.source = { :path => '.' }
15 | s.source_files = 'Classes/**/*'
16 | s.public_header_files = 'Classes/**/*.h'
17 | s.dependency 'Flutter'
18 |
19 | s.ios.deployment_target = '8.0'
20 | end
21 |
22 |
--------------------------------------------------------------------------------
/lib/location_picker_fluttify.dart:
--------------------------------------------------------------------------------
1 | library location_picker_fluttify;
2 |
3 | import 'package:amap_search_fluttify/amap_search_fluttify.dart';
4 | import 'package:flutter/material.dart';
5 | import 'package:location_picker_fluttify/src/bloc/location_picker.bloc.dart';
6 | import 'package:location_picker_fluttify/src/ui/route/decorated_route.route.dart';
7 |
8 | import 'src/ui/screen/location_picker.screen.dart';
9 |
10 | export 'package:amap_map_fluttify/amap_map_fluttify.dart';
11 | export 'package:amap_search_fluttify/amap_search_fluttify.dart';
12 |
13 | export 'src/ui/widget/candidate_poi.widget.dart';
14 |
15 | Future showLocationPicker(
16 | BuildContext context, {
17 | @required PoiBuilder poiBuilder,
18 | Widget center,
19 | Widget locate,
20 | AlignmentGeometry locateAlignment = AlignmentDirectional.bottomEnd,
21 | Duration maskDelay = const Duration(milliseconds: 800),
22 | }) {
23 | return Navigator.push(
24 | context,
25 | DecoratedRoute(
26 | bloc: LocationPickerBLoC(),
27 | screen: LocationPickerScreen(
28 | poiBuilder: poiBuilder,
29 | pointer: center,
30 | locator: locate,
31 | locateAlignment: locateAlignment,
32 | maskDelay: maskDelay,
33 | ),
34 | ),
35 | );
36 | }
37 |
--------------------------------------------------------------------------------
/lib/src/bloc/location_picker.bloc.dart:
--------------------------------------------------------------------------------
1 | import 'package:location_picker_fluttify/location_picker_fluttify.dart';
2 | import 'package:location_picker_fluttify/src/utils/bloc/bloc.dart';
3 | import 'package:location_picker_fluttify/src/utils/bloc/bloc_io.dart';
4 |
5 | class LocationPickerBLoC extends LocalBLoC with _ComponentMixin {
6 | LocationPickerBLoC() : super('位置选择 BLoC');
7 | }
8 |
9 | mixin _ComponentMixin on LocalBLoC {
10 | @override
11 | List get disposeBag => [poiList];
12 |
13 | final poiList = ListIO(semantics: 'poi列表');
14 |
15 | final moveEnd = IO