Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Geolocator #3179

Merged
merged 18 commits into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion client/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ if (flutterVersionName == null) {
android {
namespace "com.appveyor.flet"
compileSdkVersion flutter.compileSdkVersion
ndkVersion flutter.ndkVersion
ndkVersion "25.1.8937393"
FeodorFitsner marked this conversation as resolved.
Show resolved Hide resolved

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
Expand Down
2 changes: 2 additions & 0 deletions client/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<application android:label="Flet" android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">
<activity android:name=".MainActivity" android:exported="true" android:launchMode="singleTop"
Expand Down
14 changes: 13 additions & 1 deletion client/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ PODS:
- DKImagePickerController/PhotoGallery
- Flutter
- Flutter (1.0.0)
- geolocator_apple (1.2.0):
- Flutter
- integration_test (0.0.1):
- Flutter
- media_kit_libs_ios_video (1.0.4):
Expand All @@ -49,6 +51,8 @@ PODS:
- path_provider_foundation (0.0.1):
- Flutter
- FlutterMacOS
- permission_handler_apple (9.3.0):
- Flutter
- record_darwin (1.0.0):
- Flutter
- FlutterMacOS
Expand Down Expand Up @@ -78,12 +82,14 @@ DEPENDENCIES:
- audioplayers_darwin (from `.symlinks/plugins/audioplayers_darwin/ios`)
- file_picker (from `.symlinks/plugins/file_picker/ios`)
- Flutter (from `Flutter`)
- geolocator_apple (from `.symlinks/plugins/geolocator_apple/ios`)
- integration_test (from `.symlinks/plugins/integration_test/ios`)
- media_kit_libs_ios_video (from `.symlinks/plugins/media_kit_libs_ios_video/ios`)
- media_kit_native_event_loop (from `.symlinks/plugins/media_kit_native_event_loop/ios`)
- media_kit_video (from `.symlinks/plugins/media_kit_video/ios`)
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
- record_darwin (from `.symlinks/plugins/record_darwin/ios`)
- rive_common (from `.symlinks/plugins/rive_common/ios`)
- screen_brightness_ios (from `.symlinks/plugins/screen_brightness_ios/ios`)
Expand All @@ -108,6 +114,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/file_picker/ios"
Flutter:
:path: Flutter
geolocator_apple:
:path: ".symlinks/plugins/geolocator_apple/ios"
integration_test:
:path: ".symlinks/plugins/integration_test/ios"
media_kit_libs_ios_video:
Expand All @@ -120,6 +128,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/package_info_plus/ios"
path_provider_foundation:
:path: ".symlinks/plugins/path_provider_foundation/darwin"
permission_handler_apple:
:path: ".symlinks/plugins/permission_handler_apple/ios"
record_darwin:
:path: ".symlinks/plugins/record_darwin/ios"
rive_common:
Expand All @@ -143,14 +153,16 @@ SPEC CHECKSUMS:
audioplayers_darwin: 877d9a4d06331c5c374595e46e16453ac7eafa40
DKImagePickerController: b512c28220a2b8ac7419f21c491fc8534b7601ac
DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179
file_picker: 15fd9539e4eb735dc54bae8c0534a7a9511a03de
file_picker: 09aa5ec1ab24135ccd7a1621c46c84134bfd6655
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
geolocator_apple: 6cbaf322953988e009e5ecb481f07efece75c450
integration_test: 13825b8a9334a850581300559b8839134b124670
media_kit_libs_ios_video: a5fe24bc7875ccd6378a0978c13185e1344651c1
media_kit_native_event_loop: e6b2ab20cf0746eb1c33be961fcf79667304fa2a
media_kit_video: 5da63f157170e5bf303bf85453b7ef6971218a2e
package_info_plus: 115f4ad11e0698c8c1c5d8a689390df880f47e85
path_provider_foundation: 3784922295ac71e43754bd15e0653ccfd36a147c
permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2
record_darwin: 1f6619f2abac4d1ca91d3eeab038c980d76f1517
rive_common: c537b4eed761e903a9403d93c347b69bd7a4762f
screen_brightness_ios: 715ca807df953bf676d339f11464e438143ee625
Expand Down
18 changes: 18 additions & 0 deletions client/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
58A4996EE779406784CD4C79 /* [CP] Embed Pods Frameworks */,
2297FE9C08FD9A4A6B4637CC /* [CP] Copy Pods Resources */,
);
buildRules = (
);
Expand Down Expand Up @@ -197,6 +198,23 @@
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
2297FE9C08FD9A4A6B4637CC /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
showEnvVarsInLog = 0;
};
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
Expand Down
2 changes: 2 additions & 0 deletions client/ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,7 @@
</dict>
<key>NSMicrophoneUsageDescription</key>
<string>Audio Recording</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>This app needs access to location when open.</string>
</dict>
</plist>
3 changes: 3 additions & 0 deletions client/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import 'package:flet/flet.dart';
import 'package:flet_audio/flet_audio.dart' as flet_audio;
import 'package:flet_audio_recorder/flet_audio_recorder.dart'
as flet_audio_recorder;
import 'package:flet_geolocator/flet_geolocator.dart' as flet_geolocator;
import 'package:flet_permission_handler/flet_permission_handler.dart' as flet_permission_handler;
import 'package:flet_lottie/flet_lottie.dart' as flet_lottie;
import 'package:flet_map/flet_map.dart' as flet_map;
Expand All @@ -27,6 +28,7 @@ void main([List<String>? args]) async {
WidgetsFlutterBinding.ensureInitialized();
flet_audio.ensureInitialized();
flet_audio_recorder.ensureInitialized();
flet_geolocator.ensureInitialized();
flet_permission_handler.ensureInitialized();
flet_lottie.ensureInitialized();
flet_map.ensureInitialized();
Expand Down Expand Up @@ -92,6 +94,7 @@ void main([List<String>? args]) async {
createControlFactories: [
flet_audio.createControl,
flet_audio_recorder.createControl,
flet_geolocator.createControl,
flet_permission_handler.createControl,
flet_lottie.createControl,
flet_map.createControl,
Expand Down
2 changes: 2 additions & 0 deletions client/macos/Flutter/GeneratedPluginRegistrant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import FlutterMacOS
import Foundation

import audioplayers_darwin
import geolocator_apple
import media_kit_libs_macos_video
import media_kit_video
import package_info_plus
Expand All @@ -22,6 +23,7 @@ import window_to_front

func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
AudioplayersDarwinPlugin.register(with: registry.registrar(forPlugin: "AudioplayersDarwinPlugin"))
GeolocatorPlugin.register(with: registry.registrar(forPlugin: "GeolocatorPlugin"))
MediaKitLibsMacosVideoPlugin.register(with: registry.registrar(forPlugin: "MediaKitLibsMacosVideoPlugin"))
MediaKitVideoPlugin.register(with: registry.registrar(forPlugin: "MediaKitVideoPlugin"))
FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin"))
Expand Down
2 changes: 2 additions & 0 deletions client/macos/Runner/DebugProfile.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@
<true/>
<key>com.apple.security.device.audio-input</key>
<true/>
<key>com.apple.security.personal-information.location</key>
<true/>
</dict>
</plist>
2 changes: 2 additions & 0 deletions client/macos/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,7 @@
<string>NSApplication</string>
<key>NSMicrophoneUsageDescription</key>
<string>Audio Recording</string>
<key>NSLocationUsageDescription</key>
<string>This app needs access to location.</string>
</dict>
</plist>
2 changes: 2 additions & 0 deletions client/macos/Runner/Release.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@
<true/>
<key>com.apple.security.device.audio-input</key>
<true/>
<key>com.apple.security.personal-information.location</key>
<true/>
</dict>
</plist>
55 changes: 55 additions & 0 deletions client/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,13 @@ packages:
relative: true
source: path
version: "0.22.1"
flet_geolocator:
dependency: "direct main"
description:
path: "../packages/flet_geolocator"
relative: true
source: path
version: "0.23.0"
flet_lottie:
dependency: "direct main"
description:
Expand Down Expand Up @@ -375,6 +382,54 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
geolocator:
dependency: transitive
description:
name: geolocator
sha256: "694ec58afe97787b5b72b8a0ab78c1a9244811c3c10e72c4362ef3c0ceb005cd"
url: "https://pub.dev"
source: hosted
version: "11.0.0"
geolocator_android:
dependency: transitive
description:
name: geolocator_android
sha256: f15d1536cd01b1399578f1da1eb5d566e7a718db6a3648f2c24d2e2f859f0692
url: "https://pub.dev"
source: hosted
version: "4.5.4"
geolocator_apple:
dependency: transitive
description:
name: geolocator_apple
sha256: bc2aca02423ad429cb0556121f56e60360a2b7d694c8570301d06ea0c00732fd
url: "https://pub.dev"
source: hosted
version: "2.3.7"
geolocator_platform_interface:
dependency: transitive
description:
name: geolocator_platform_interface
sha256: "009a21c4bc2761e58dccf07c24f219adaebe0ff707abdfd40b0a763d4003fab9"
url: "https://pub.dev"
source: hosted
version: "4.2.2"
geolocator_web:
dependency: transitive
description:
name: geolocator_web
sha256: "49d8f846ebeb5e2b6641fe477a7e97e5dd73f03cbfef3fd5c42177b7300fb0ed"
url: "https://pub.dev"
source: hosted
version: "3.0.0"
geolocator_windows:
dependency: transitive
description:
name: geolocator_windows
sha256: "53da08937d07c24b0d9952eb57a3b474e29aae2abf9dd717f7e1230995f13f0e"
url: "https://pub.dev"
source: hosted
version: "0.2.3"
graphs:
dependency: transitive
description:
Expand Down
2 changes: 2 additions & 0 deletions client/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ dependencies:
path: ../packages/flet_audio_recorder
flet_permission_handler:
path: ../packages/flet_permission_handler
flet_geolocator:
path: ../packages/flet_geolocator
flet_video:
path: ../packages/flet_video
flet_webview:
Expand Down
3 changes: 3 additions & 0 deletions client/windows/flutter/generated_plugin_registrant.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "generated_plugin_registrant.h"

#include <audioplayers_windows/audioplayers_windows_plugin.h>
#include <geolocator_windows/geolocator_windows.h>
#include <media_kit_libs_windows_video/media_kit_libs_windows_video_plugin_c_api.h>
#include <media_kit_video/media_kit_video_plugin_c_api.h>
#include <permission_handler_windows/permission_handler_windows_plugin.h>
Expand All @@ -21,6 +22,8 @@
void RegisterPlugins(flutter::PluginRegistry* registry) {
AudioplayersWindowsPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("AudioplayersWindowsPlugin"));
GeolocatorWindowsRegisterWithRegistrar(
registry->GetRegistrarForPlugin("GeolocatorWindows"));
MediaKitLibsWindowsVideoPluginCApiRegisterWithRegistrar(
registry->GetRegistrarForPlugin("MediaKitLibsWindowsVideoPluginCApi"));
MediaKitVideoPluginCApiRegisterWithRegistrar(
Expand Down
1 change: 1 addition & 0 deletions client/windows/flutter/generated_plugins.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

list(APPEND FLUTTER_PLUGIN_LIST
audioplayers_windows
geolocator_windows
media_kit_libs_windows_video
media_kit_video
permission_handler_windows
Expand Down
31 changes: 31 additions & 0 deletions packages/flet_geolocator/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# 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
# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock.
/pubspec.lock
**/doc/api/
.dart_tool/
build/
.flutter-plugins
.flutter-plugins-dependencies
3 changes: 3 additions & 0 deletions packages/flet_geolocator/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# 0.23.0

Initial release of the package.
Loading