diff --git a/.circleci/config.yml b/.circleci/config.yml index 4b539b1c0..e5b7bab41 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -40,6 +40,15 @@ commands: fingerprints: - "9d:db:07:0b:62:81:11:c3:46:21:8e:fa:51:99:80:2d" + setup-flutter: + parameters: + app-dir: + type: string + steps: + - flutter/install_sdk_and_pub: + version: 3.27.0 + app-dir: << parameters.app-dir >> + slack-notify-failure-if-any: steps: - slack/notify: @@ -60,23 +69,9 @@ commands: "type": "section", "text": { "type": "mrkdwn", - "text": "`$CIRCLE_JOB` <$CIRCLE_BUILD_URL|failed> for by `$(git log --format='%an' -n 1 $CIRCLE_SHA1)` on $(if [ \"$CIRCLE_BRANCH\" == \"main\" ]; then echo 'the'; fi) `${CIRCLE_TAG:-$CIRCLE_BRANCH}` ${CIRCLE_TAG:+tag}${CIRCLE_BRANCH:+branch}." + "text": "`$CIRCLE_JOB` <$CIRCLE_BUILD_URL|failed> for commit ${CIRCLE_SHA1:0:6} on `${CIRCLE_TAG:-$CIRCLE_BRANCH}` ${CIRCLE_TAG:+tag}${CIRCLE_BRANCH:+branch}." } }, - { - "type": "rich_text", - "elements": [ - { - "type": "rich_text_quote", - "elements": [ - { - "type": "text", - "text": "$(git log --format=%s -n 1 $CIRCLE_SHA1)" - } - ] - } - ] - }, { "type": "section", "fields": [ @@ -90,33 +85,31 @@ commands: } jobs: - build-android: parameters: workspace-path: type: string - default: example/build/app/outputs/apk + default: mapbox_maps_flutter_mobile/example/build/app/outputs/apk docker: - image: cimg/android:2024.01.1 resource_class: 2xlarge steps: - checkout - - flutter/install_sdk_and_pub: - version: 3.24.3 - app-dir: example + - setup-flutter: + app-dir: mapbox_maps_flutter_mobile/example - run: name: ktlint - working_directory: example/android + working_directory: mapbox_maps_flutter_mobile/example/android command: ./gradlew ktlint - run: name: unit test - command: flutter test test + command: flutter test mapbox_maps_flutter_mobile/test - run: - name: "Build Android integration tests" - working_directory: example/android + name: Build Android integration tests + working_directory: mapbox_maps_flutter_mobile/example/android command: | ./gradlew app:assembleAndroidTest --stacktrace - ./gradlew app:assembleDebug -Ptarget=integration_test/all_test.dart -Pdart-defines="$(echo -n "ACCESS_TOKEN=$MAPBOX_ACCESS_TOKEN" | base64 -w 0)" --stacktrace + ./gradlew app:assembleDebug -Ptarget=integration_test/all_test.dart -Pdart-defines="$(echo -n \"ACCESS_TOKEN=$MAPBOX_ACCESS_TOKEN\" | base64 -w 0)" --stacktrace - persist_to_workspace: root: << parameters.workspace-path >> paths: @@ -124,19 +117,18 @@ jobs: - androidTest/debug/app-debug-androidTest.apk - slack-notify-failure-if-any - run-android-tests-firebase: parameters: workspace-path: type: string - default: example/build/app/outputs/apk + default: mapbox_maps_flutter_mobile/example/build/app/outputs/apk executor: firebase-test-runner steps: - attach_workspace: at: << parameters.workspace-path >> - setup-gcloud - run: - name: "Run Android integration tests on Firebase" + name: Run Android integration tests on Firebase no_output_timeout: 20m command: | gcloud firebase test android run --type instrumentation \ @@ -156,34 +148,28 @@ jobs: parameters: workspace-path: type: string - default: example/build/output + default: mapbox_maps_flutter_mobile/example/build/output executor: macos-xcode-latest steps: - checkout - inject-netrc-credentials - add-mapbox-submodules-key - macos/install-rosetta - - flutter/install_sdk_and_pub: - version: 3.24.3 - app-dir: example + - setup-flutter: + app-dir: mapbox_maps_flutter_mobile/example - run: name: swiftlint - working_directory: ios/mapbox_maps_flutter + working_directory: mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter command: HOMEBREW_NO_AUTO_UPDATE=1 brew install swiftlint; swiftlint lint --strict - run: name: unit test - command: flutter test test + command: flutter test mapbox_maps_flutter_mobile/test - run: - name: "Build iOS integration tests" + name: Build iOS integration tests command: | - pushd example - - # required to init configs that pass environment variables to fastlane later - flutter build ios --config-only integration_test/all_test.dart \ - --release --dart-define=ACCESS_TOKEN=${MAPBOX_ACCESS_TOKEN} - - popd # to repo root - + pushd mapbox_maps_flutter_mobile/example + flutter build ios --config-only integration_test/all_test.dart --release --dart-define=ACCESS_TOKEN=${MAPBOX_ACCESS_TOKEN} + popd bundle install bundle exec fastlane build_examples_tests - persist_to_workspace: @@ -196,14 +182,14 @@ jobs: parameters: workspace-path: type: string - default: example/build/output + default: mapbox_maps_flutter_mobile/example/build/output executor: firebase-test-runner steps: - attach_workspace: at: << parameters.workspace-path >> - setup-gcloud - run: - name: "Run iOS integration tests on Firebase" + name: Run iOS integration tests on Firebase no_output_timeout: 20m command: | gcloud firebase test ios run \ @@ -214,17 +200,17 @@ jobs: --client-details matrixLabel="${CIRCLE_JOB}-${CIRCLE_SHA1:0:6}" 2>&1 | tee firebase_test_lab_run.log - run: name: Download XCResults + when: always command: | - TEST_LAB_PATH=$(cat firebase_test_lab_run.log | grep -o "test-lab.*/") - + TEST_LAB_PATH=$(grep -o "test-lab.*/" firebase_test_lab_run.log) mkdir testlab_results gsutil -m cp -r "gs://${TEST_LAB_PATH}i*" testlab_results zip -r testlab_results.zip testlab_results - when: always - store_artifacts: path: firebase_test_lab_run.log - store_artifacts: path: testlab_results.zip + destination: ios/testlab_results.zip - store_test_results: path: testlab_results - slack-notify-failure-if-any @@ -235,18 +221,24 @@ jobs: resource_class: small steps: - checkout - - flutter/install_sdk_and_pub: - version: 3.27.0 + - setup-flutter: + app-dir: . - run: - name: Check license - command: bash scripts/license.sh --mode validate + name: Install dependencies for examples + command: | + dart pub get -C mapbox_maps_flutter_mobile/example + dart pub get -C mapbox_maps_flutter_web/example + dart pub get -C mapbox_maps_flutter_v3/example + - run: + name: Check license for mapbox_maps_flutter_mobile + command: bash scripts/license.sh mapbox_maps_flutter --mode=validate - run: name: Run dart analyze command: dart analyze - run: name: Check all tests are in the test suite - command: dart ../scripts/check_test_suite.dart - working_directory: example + working_directory: mapbox_maps_flutter_mobile/example + command: dart ../../scripts/check_test_suite.dart - check-api-breakage workflows: @@ -267,6 +259,7 @@ executors: resource_class: macos.m1.medium.gen1 macos: xcode: 16.0.0 + firebase-test-runner: resource_class: small docker: diff --git a/.fastlane/Fastfile b/.fastlane/Fastfile index e7dcee283..b7d303d14 100644 --- a/.fastlane/Fastfile +++ b/.fastlane/Fastfile @@ -10,7 +10,7 @@ platform :ios do sync_code_signing(type: "development") update_code_signing_settings( use_automatic_signing: false, - path: "example/ios/Runner.xcodeproj", + path: "mapbox_maps_flutter_mobile/example/ios/Runner.xcodeproj", team_id: "GJZR2MEM28", # Developer Portal Team ID, profile_name: lane_context[SharedValues::MATCH_PROVISIONING_PROFILE_MAPPING]["com.mapbox.maps.FlutterMapsExample"], targets: ["Runner"], @@ -18,7 +18,7 @@ platform :ios do ) update_code_signing_settings( use_automatic_signing: false, - path: "example/ios/Runner.xcodeproj", + path: "mapbox_maps_flutter_mobile/example/ios/Runner.xcodeproj", team_id: "GJZR2MEM28", # Developer Portal Team ID, profile_name: lane_context[SharedValues::MATCH_PROVISIONING_PROFILE_MAPPING]["com.mapbox.maps.FlutterRunnerTests"], targets: ["RunnerTests"], @@ -26,10 +26,10 @@ platform :ios do ) # build tests archive in the `output_directory` to launch on firebase run_tests( - workspace: 'example/ios/Runner.xcworkspace', + workspace: 'mapbox_maps_flutter_mobile/example/ios/Runner.xcworkspace', scheme: 'Runner', # XCTest scheme - xcconfig: "example/ios/Flutter/Release.xcconfig", - derived_data_path: "example/build/output", + xcconfig: "mapbox_maps_flutter_mobile/example/ios/Flutter/Release.xcconfig", + derived_data_path: "mapbox_maps_flutter_mobile/example/build/output", configuration: "Release", xcargs: "SWIFT_TREAT_WARNINGS_AS_ERRORS=NO COMPILER_INDEX_STORE_ENABLE=NO", skip_detect_devices: true, # Required @@ -37,7 +37,7 @@ platform :ios do sdk: 'iphoneos', # Required should_zip_build_products: true, # Must be true to set the correct format for Firebase Test Lab, result_bundle: true, - output_directory: "example/build/output/", + output_directory: "mapbox_maps_flutter_mobile/example/build/output/", code_coverage: true ) end diff --git a/.gitignore b/.gitignore index a4ded0a57..84fe6e96a 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,8 @@ .buildlog/ .history .svn/ +**/.cxx + # IntelliJ related *.iml diff --git a/example/android/gradle.properties b/example/android/gradle.properties deleted file mode 100644 index 3852c19ca..000000000 --- a/example/android/gradle.properties +++ /dev/null @@ -1,4 +0,0 @@ -org.gradle.jvmargs=-Xmx4096M -android.useAndroidX=true -android.enableJetifier=false -useLocalDependencies=false diff --git a/mapbox_maps_flutter_interface/.metadata b/mapbox_maps_flutter_interface/.metadata new file mode 100644 index 000000000..69723fa27 --- /dev/null +++ b/mapbox_maps_flutter_interface/.metadata @@ -0,0 +1,10 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "c23637390482d4cf9598c3ce3f2be31aa7332daf" + channel: "stable" + +project_type: package diff --git a/mapbox_maps_flutter_interface/CHANGELOG.md b/mapbox_maps_flutter_interface/CHANGELOG.md new file mode 100644 index 000000000..41cc7d819 --- /dev/null +++ b/mapbox_maps_flutter_interface/CHANGELOG.md @@ -0,0 +1,3 @@ +## 0.0.1 + +* TODO: Describe initial release. diff --git a/mapbox_maps_flutter_interface/LICENSE b/mapbox_maps_flutter_interface/LICENSE new file mode 100644 index 000000000..ba75c69f7 --- /dev/null +++ b/mapbox_maps_flutter_interface/LICENSE @@ -0,0 +1 @@ +TODO: Add your license here. diff --git a/mapbox_maps_flutter_interface/README.md b/mapbox_maps_flutter_interface/README.md new file mode 100644 index 000000000..4a260d8d2 --- /dev/null +++ b/mapbox_maps_flutter_interface/README.md @@ -0,0 +1,39 @@ + + +TODO: Put a short description of the package here that helps potential users +know whether this package might be useful for them. + +## Features + +TODO: List what your package can do. Maybe include images, gifs, or videos. + +## Getting started + +TODO: List prerequisites and provide or point to information on how to +start using the package. + +## Usage + +TODO: Include short and useful examples for package users. Add longer examples +to `/example` folder. + +```dart +const like = 'sample'; +``` + +## Additional information + +TODO: Tell users more about the package: where to find more information, how to +contribute to the package, how to file issues, what response they can expect +from the package authors, and more. diff --git a/mapbox_maps_flutter_interface/analysis_options.yaml b/mapbox_maps_flutter_interface/analysis_options.yaml new file mode 100644 index 000000000..a92e54317 --- /dev/null +++ b/mapbox_maps_flutter_interface/analysis_options.yaml @@ -0,0 +1,8 @@ +include: package:flutter_lints/flutter.yaml + +analyzer: + errors: + library_private_types_in_public_api: error + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/mapbox_maps_flutter_interface/lib/mapbox_maps_flutter_interface.dart b/mapbox_maps_flutter_interface/lib/mapbox_maps_flutter_interface.dart new file mode 100644 index 000000000..00dda3617 --- /dev/null +++ b/mapbox_maps_flutter_interface/lib/mapbox_maps_flutter_interface.dart @@ -0,0 +1,13 @@ +library mapbox_maps_flutter_interface; + +export 'src/mapbox_maps_flutter_platform_interface.dart'; +export 'src/map_interface.dart'; +export 'src/callbacks.dart'; +export 'package:turf/helpers.dart'; + +import 'dart:convert'; + +import 'package:turf/turf.dart' as turf; + +part 'src/pigeons/platform_interface_data_types.dart'; +part 'src/turf_adapter.dart'; diff --git a/mapbox_maps_flutter_interface/lib/src/callbacks.dart b/mapbox_maps_flutter_interface/lib/src/callbacks.dart new file mode 100644 index 000000000..988d70abc --- /dev/null +++ b/mapbox_maps_flutter_interface/lib/src/callbacks.dart @@ -0,0 +1,3 @@ +import 'package:mapbox_maps_flutter_interface/mapbox_maps_flutter_interface.dart'; + +typedef OnMapCreated = void Function(MapboxMapInterface mapboxMap); diff --git a/mapbox_maps_flutter_interface/lib/src/map_interface.dart b/mapbox_maps_flutter_interface/lib/src/map_interface.dart new file mode 100644 index 000000000..92c5a6fd8 --- /dev/null +++ b/mapbox_maps_flutter_interface/lib/src/map_interface.dart @@ -0,0 +1,18 @@ +import 'package:mapbox_maps_flutter_interface/mapbox_maps_flutter_interface.dart'; + +/// An abstract base class that defines the interface for interacting with a Mapbox map. +/// +/// This interface provides methods for setting the camera options and retrieving the current camera state. +abstract base class MapboxMapInterface { + /// Sets the camera options for the map. + /// + /// [cameraOptions] - The desired camera options to apply to the map. + /// + /// Returns a [Future] that completes when the camera options have been applied. + Future setCamera(CameraOptions cameraOptions); + + /// Retrieves the current state of the camera. + /// + /// Returns a [Future] that completes with the current [CameraState] of the map. + Future getCameraState(); +} diff --git a/mapbox_maps_flutter_interface/lib/src/mapbox_maps_flutter_platform_interface.dart b/mapbox_maps_flutter_interface/lib/src/mapbox_maps_flutter_platform_interface.dart new file mode 100644 index 000000000..e51703531 --- /dev/null +++ b/mapbox_maps_flutter_interface/lib/src/mapbox_maps_flutter_platform_interface.dart @@ -0,0 +1,47 @@ +import 'package:flutter/widgets.dart'; + +import '../mapbox_maps_flutter_interface.dart'; + +abstract base class MapboxMapsFlutterPlatform { + static MapboxMapsFlutterPlatform? _instance; + + /// The default instance of [MapboxMapsFlutterPlatform] to use. + /// + /// This is the default instance that will be used by the [MapboxMapsFlutterPlatform] class. + static MapboxMapsFlutterPlatform get instance { + if (_instance == null) { + throw Exception( + 'No default instance of MapboxMapsFlutterPlatform has been set. ' + 'Ensure that you have called MapboxMapsFlutterPlatform.setInstance() ' + 'before using the MapboxMapsFlutterPlatform instance.', + ); + } + return _instance!; + } + + static set instance(MapboxMapsFlutterPlatform instance) { + _instance = instance; + } + + /// Constructs a MapboxMapsFlutterPlatform. + MapboxMapsFlutterPlatform(); + + /// The public access token that is used to access resources provided by Mapbox services. + /// For more information about public access tokens, see + /// [Mapbox Access Tokens](https://docs.mapbox.com/help/getting-started/access-tokens/#public-tokens). + Future getAccessToken(); + + /// The public access token that is used to access resources provided by Mapbox services. + /// For more information about public access tokens, see + /// [Mapbox Access Tokens](https://docs.mapbox.com/help/getting-started/access-tokens/#public-tokens). + void setAccessToken(String token); + + /// Builds a platform-specific view for displaying the map. + /// + /// This method is responsible for creating the widget that integrates + /// with the underlying platform's view system to render the map. + Widget buildView({ + CameraOptions? cameraOptions, + OnMapCreated? onMapCreated, + }); +} diff --git a/mapbox_maps_flutter_interface/lib/src/pigeons/platform_interface_data_types.dart b/mapbox_maps_flutter_interface/lib/src/pigeons/platform_interface_data_types.dart new file mode 100644 index 000000000..4a5c8fa08 --- /dev/null +++ b/mapbox_maps_flutter_interface/lib/src/pigeons/platform_interface_data_types.dart @@ -0,0 +1,279 @@ +// Autogenerated from Pigeon (v25.2.0), do not edit directly. +// See also: https://pub.dev/packages/pigeon +// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers + +part of mapbox_maps_flutter_interface; + +/// Describes the coordinate on the screen, measured from top to bottom and from left to right. +/// Note: the `map` uses screen coordinate units measured in `logical pixels`. +class ScreenCoordinate { + ScreenCoordinate({ + required this.x, + required this.y, + }); + + /// A value representing the x position of this coordinate. + double x; + + /// A value representing the y position of this coordinate. + double y; + + List _toList() { + return [ + x, + y, + ]; + } + + Object encode() { + return _toList(); + } + + static ScreenCoordinate decode(Object result) { + result as List; + return ScreenCoordinate( + x: result[0]! as double, + y: result[1]! as double, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! ScreenCoordinate || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return x == other.x && y == other.y; + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); +} + +/// The distance on each side between rectangles, when one is contained into other. +/// +/// All fields' values are in `logical pixel` units. +class MbxEdgeInsets { + MbxEdgeInsets({ + required this.top, + required this.left, + required this.bottom, + required this.right, + }); + + /// Padding from the top. + double top; + + /// Padding from the left. + double left; + + /// Padding from the bottom. + double bottom; + + /// Padding from the right. + double right; + + List _toList() { + return [ + top, + left, + bottom, + right, + ]; + } + + Object encode() { + return _toList(); + } + + static MbxEdgeInsets decode(Object result) { + result as List; + return MbxEdgeInsets( + top: result[0]! as double, + left: result[1]! as double, + bottom: result[2]! as double, + right: result[3]! as double, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! MbxEdgeInsets || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return top == other.top && + left == other.left && + bottom == other.bottom && + right == other.right; + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); +} + +/// Various options for describing the viewpoint of a camera. All fields are +/// optional. +/// +/// Anchor and center points are mutually exclusive, with preference for the +/// center point when both are set. +class CameraOptions { + CameraOptions({ + this.center, + this.padding, + this.anchor, + this.zoom, + this.bearing, + this.pitch, + }); + + /// Coordinate at the center of the camera. + Point? center; + + /// Padding around the interior of the view that affects the frame of + /// reference for `center`. + MbxEdgeInsets? padding; + + /// Point of reference for `zoom` and `angle`, assuming an origin at the + /// top-left corner of the view. + ScreenCoordinate? anchor; + + /// Zero-based zoom level. Constrained to the minimum and maximum zoom + /// levels. + double? zoom; + + /// Bearing, measured in degrees from true north. Wrapped to [0, 360). + double? bearing; + + /// Pitch toward the horizon measured in degrees. + double? pitch; + + List _toList() { + return [ + center, + padding, + anchor, + zoom, + bearing, + pitch, + ]; + } + + Object encode() { + return _toList(); + } + + static CameraOptions decode(Object result) { + result as List; + return CameraOptions( + center: result[0] as Point?, + padding: result[1] as MbxEdgeInsets?, + anchor: result[2] as ScreenCoordinate?, + zoom: result[3] as double?, + bearing: result[4] as double?, + pitch: result[5] as double?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! CameraOptions || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return center == other.center && + padding == other.padding && + anchor == other.anchor && + zoom == other.zoom && + bearing == other.bearing && + pitch == other.pitch; + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); +} + +/// Describes the viewpoint of a camera. +class CameraState { + CameraState({ + required this.center, + required this.padding, + required this.zoom, + required this.bearing, + required this.pitch, + }); + + /// Coordinate at the center of the camera. + Point center; + + /// Padding around the interior of the view that affects the frame of + /// reference for `center`. + MbxEdgeInsets padding; + + /// Zero-based zoom level. Constrained to the minimum and maximum zoom + /// levels. + double zoom; + + /// Bearing, measured in degrees from true north. Wrapped to [0, 360). + double bearing; + + /// Pitch toward the horizon measured in degrees. + double pitch; + + List _toList() { + return [ + center, + padding, + zoom, + bearing, + pitch, + ]; + } + + Object encode() { + return _toList(); + } + + static CameraState decode(Object result) { + result as List; + return CameraState( + center: result[0]! as Point, + padding: result[1]! as MbxEdgeInsets, + zoom: result[2]! as double, + bearing: result[3]! as double, + pitch: result[4]! as double, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! CameraState || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return center == other.center && + padding == other.padding && + zoom == other.zoom && + bearing == other.bearing && + pitch == other.pitch; + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); +} diff --git a/lib/src/turf_adapters.dart b/mapbox_maps_flutter_interface/lib/src/turf_adapter.dart similarity index 97% rename from lib/src/turf_adapters.dart rename to mapbox_maps_flutter_interface/lib/src/turf_adapter.dart index be76d48ba..24e56f491 100644 --- a/lib/src/turf_adapters.dart +++ b/mapbox_maps_flutter_interface/lib/src/turf_adapter.dart @@ -1,4 +1,4 @@ -part of mapbox_maps_flutter; +part of 'package:mapbox_maps_flutter_interface/mapbox_maps_flutter_interface.dart'; final class Point extends turf.Point { Point({super.bbox, required super.coordinates}); diff --git a/mapbox_maps_flutter_interface/pubspec.yaml b/mapbox_maps_flutter_interface/pubspec.yaml new file mode 100644 index 000000000..74180c21e --- /dev/null +++ b/mapbox_maps_flutter_interface/pubspec.yaml @@ -0,0 +1,57 @@ +name: mapbox_maps_flutter_interface +description: "A common package that defines an interface for the MapboxMaps Flutter plugin, enabling seamless integration of MapboxMaps into Flutter applications." +version: 0.0.1 +homepage: + +environment: + sdk: ">=3.6.0 <4.0.0" + flutter: ">=1.17.0" + +resolution: workspace + +dependencies: + flutter: + sdk: flutter + turf: ^0.0.10 + +dev_dependencies: + flutter_test: + sdk: flutter + flutter_lints: ^5.0.0 + +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +# The following section is specific to Flutter packages. +flutter: + + # To add assets to your package, add an assets section, like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + # + # For details regarding assets in packages, see + # https://flutter.dev/to/asset-from-package + # + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/to/resolution-aware-images + + # To add custom fonts to your package, add a fonts section here, + # in this "flutter" section. Each entry in this list should have a + # "family" key with the font family name, and a "fonts" key with a + # list giving the asset and other descriptors for the font. For + # example: + # fonts: + # - family: Schyler + # fonts: + # - asset: fonts/Schyler-Regular.ttf + # - asset: fonts/Schyler-Italic.ttf + # style: italic + # - family: Trajan Pro + # fonts: + # - asset: fonts/TrajanPro.ttf + # - asset: fonts/TrajanPro_Bold.ttf + # weight: 700 + # + # For details regarding fonts in packages, see + # https://flutter.dev/to/font-from-package diff --git a/mapbox_maps_flutter_mobile/.metadata b/mapbox_maps_flutter_mobile/.metadata new file mode 100644 index 000000000..cff4c42e1 --- /dev/null +++ b/mapbox_maps_flutter_mobile/.metadata @@ -0,0 +1,33 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "c23637390482d4cf9598c3ce3f2be31aa7332daf" + channel: "stable" + +project_type: plugin + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf + base_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf + - platform: android + create_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf + base_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf + - platform: ios + create_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf + base_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - 'lib/main.dart' + - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/CHANGELOG.md b/mapbox_maps_flutter_mobile/CHANGELOG.md similarity index 100% rename from CHANGELOG.md rename to mapbox_maps_flutter_mobile/CHANGELOG.md diff --git a/LICENSE b/mapbox_maps_flutter_mobile/LICENSE similarity index 99% rename from LICENSE rename to mapbox_maps_flutter_mobile/LICENSE index 9ac39e960..5e703c9f0 100644 --- a/LICENSE +++ b/mapbox_maps_flutter_mobile/LICENSE @@ -75,31 +75,6 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ``` -### turf, https://github.com/dartclub/turf_dart - -``` -The MIT License (MIT) - -Copyright (c) 2020 Lukas Himsel - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -``` - ### flutter_plugin_android_lifecycle, https://github.com/flutter/packages/tree/main/packages/flutter_plugin_android_lifecycle ``` diff --git a/README.md b/mapbox_maps_flutter_mobile/README.md similarity index 100% rename from README.md rename to mapbox_maps_flutter_mobile/README.md diff --git a/analysis_options.yaml b/mapbox_maps_flutter_mobile/analysis_options.yaml similarity index 100% rename from analysis_options.yaml rename to mapbox_maps_flutter_mobile/analysis_options.yaml diff --git a/android/.editorconfig b/mapbox_maps_flutter_mobile/android/.editorconfig similarity index 100% rename from android/.editorconfig rename to mapbox_maps_flutter_mobile/android/.editorconfig diff --git a/android/.gitignore b/mapbox_maps_flutter_mobile/android/.gitignore similarity index 100% rename from android/.gitignore rename to mapbox_maps_flutter_mobile/android/.gitignore diff --git a/android/build.gradle b/mapbox_maps_flutter_mobile/android/build.gradle similarity index 100% rename from android/build.gradle rename to mapbox_maps_flutter_mobile/android/build.gradle diff --git a/android/gradle.properties b/mapbox_maps_flutter_mobile/android/gradle.properties similarity index 100% rename from android/gradle.properties rename to mapbox_maps_flutter_mobile/android/gradle.properties diff --git a/mapbox_maps_flutter_mobile/android/gradle/wrapper/gradle-wrapper.properties b/mapbox_maps_flutter_mobile/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 000000000..09523c0e5 --- /dev/null +++ b/mapbox_maps_flutter_mobile/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,7 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip +networkTimeout=10000 +validateDistributionUrl=true +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/android/settings.gradle b/mapbox_maps_flutter_mobile/android/settings.gradle similarity index 100% rename from android/settings.gradle rename to mapbox_maps_flutter_mobile/android/settings.gradle diff --git a/android/src/main/AndroidManifest.xml b/mapbox_maps_flutter_mobile/android/src/main/AndroidManifest.xml similarity index 100% rename from android/src/main/AndroidManifest.xml rename to mapbox_maps_flutter_mobile/android/src/main/AndroidManifest.xml diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/Accessors.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/Accessors.kt similarity index 100% rename from android/src/main/kotlin/com/mapbox/maps/mapbox_maps/Accessors.kt rename to mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/Accessors.kt diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/AnimationController.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/AnimationController.kt similarity index 100% rename from android/src/main/kotlin/com/mapbox/maps/mapbox_maps/AnimationController.kt rename to mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/AnimationController.kt diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/AttributionController.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/AttributionController.kt similarity index 100% rename from android/src/main/kotlin/com/mapbox/maps/mapbox_maps/AttributionController.kt rename to mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/AttributionController.kt diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/CameraController.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/CameraController.kt similarity index 100% rename from android/src/main/kotlin/com/mapbox/maps/mapbox_maps/CameraController.kt rename to mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/CameraController.kt diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/CompassController.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/CompassController.kt similarity index 100% rename from android/src/main/kotlin/com/mapbox/maps/mapbox_maps/CompassController.kt rename to mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/CompassController.kt diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/EventHandler.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/EventHandler.kt similarity index 100% rename from android/src/main/kotlin/com/mapbox/maps/mapbox_maps/EventHandler.kt rename to mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/EventHandler.kt diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/Extentions.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/Extentions.kt similarity index 100% rename from android/src/main/kotlin/com/mapbox/maps/mapbox_maps/Extentions.kt rename to mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/Extentions.kt diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/GestureController.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/GestureController.kt similarity index 100% rename from android/src/main/kotlin/com/mapbox/maps/mapbox_maps/GestureController.kt rename to mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/GestureController.kt diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/InteractionsController.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/InteractionsController.kt similarity index 100% rename from android/src/main/kotlin/com/mapbox/maps/mapbox_maps/InteractionsController.kt rename to mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/InteractionsController.kt diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/LocationComponentController.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/LocationComponentController.kt similarity index 100% rename from android/src/main/kotlin/com/mapbox/maps/mapbox_maps/LocationComponentController.kt rename to mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/LocationComponentController.kt diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/LoggingController.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/LoggingController.kt similarity index 100% rename from android/src/main/kotlin/com/mapbox/maps/mapbox_maps/LoggingController.kt rename to mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/LoggingController.kt diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/LogoController.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/LogoController.kt similarity index 100% rename from android/src/main/kotlin/com/mapbox/maps/mapbox_maps/LogoController.kt rename to mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/LogoController.kt diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/MapInterfaceController.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/MapInterfaceController.kt similarity index 100% rename from android/src/main/kotlin/com/mapbox/maps/mapbox_maps/MapInterfaceController.kt rename to mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/MapInterfaceController.kt diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/MapProjectionController.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/MapProjectionController.kt similarity index 100% rename from android/src/main/kotlin/com/mapbox/maps/mapbox_maps/MapProjectionController.kt rename to mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/MapProjectionController.kt diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/MapboxMapController.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/MapboxMapController.kt similarity index 100% rename from android/src/main/kotlin/com/mapbox/maps/mapbox_maps/MapboxMapController.kt rename to mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/MapboxMapController.kt diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/MapboxMapFactory.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/MapboxMapFactory.kt similarity index 100% rename from android/src/main/kotlin/com/mapbox/maps/mapbox_maps/MapboxMapFactory.kt rename to mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/MapboxMapFactory.kt diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/MapboxMapsPlugin.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/MapboxMapsPlugin.kt similarity index 100% rename from android/src/main/kotlin/com/mapbox/maps/mapbox_maps/MapboxMapsPlugin.kt rename to mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/MapboxMapsPlugin.kt diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/MapboxOptionsController.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/MapboxOptionsController.kt similarity index 100% rename from android/src/main/kotlin/com/mapbox/maps/mapbox_maps/MapboxOptionsController.kt rename to mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/MapboxOptionsController.kt diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/PerformanceStatisticsController.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/PerformanceStatisticsController.kt similarity index 100% rename from android/src/main/kotlin/com/mapbox/maps/mapbox_maps/PerformanceStatisticsController.kt rename to mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/PerformanceStatisticsController.kt diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/ScaleBarController.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/ScaleBarController.kt similarity index 100% rename from android/src/main/kotlin/com/mapbox/maps/mapbox_maps/ScaleBarController.kt rename to mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/ScaleBarController.kt diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/StyleController.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/StyleController.kt similarity index 100% rename from android/src/main/kotlin/com/mapbox/maps/mapbox_maps/StyleController.kt rename to mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/StyleController.kt diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/ViewportController.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/ViewportController.kt similarity index 100% rename from android/src/main/kotlin/com/mapbox/maps/mapbox_maps/ViewportController.kt rename to mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/ViewportController.kt diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/annotation/AnnotationController.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/annotation/AnnotationController.kt similarity index 100% rename from android/src/main/kotlin/com/mapbox/maps/mapbox_maps/annotation/AnnotationController.kt rename to mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/annotation/AnnotationController.kt diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/annotation/CircleAnnotationController.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/annotation/CircleAnnotationController.kt similarity index 100% rename from android/src/main/kotlin/com/mapbox/maps/mapbox_maps/annotation/CircleAnnotationController.kt rename to mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/annotation/CircleAnnotationController.kt diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/annotation/CircleAnnotationEnumsExtensions.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/annotation/CircleAnnotationEnumsExtensions.kt similarity index 100% rename from android/src/main/kotlin/com/mapbox/maps/mapbox_maps/annotation/CircleAnnotationEnumsExtensions.kt rename to mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/annotation/CircleAnnotationEnumsExtensions.kt diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/annotation/ControllerDelegate.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/annotation/ControllerDelegate.kt similarity index 100% rename from android/src/main/kotlin/com/mapbox/maps/mapbox_maps/annotation/ControllerDelegate.kt rename to mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/annotation/ControllerDelegate.kt diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/annotation/PointAnnotationController.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/annotation/PointAnnotationController.kt similarity index 100% rename from android/src/main/kotlin/com/mapbox/maps/mapbox_maps/annotation/PointAnnotationController.kt rename to mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/annotation/PointAnnotationController.kt diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/annotation/PointAnnotationEnumsExtensions.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/annotation/PointAnnotationEnumsExtensions.kt similarity index 100% rename from android/src/main/kotlin/com/mapbox/maps/mapbox_maps/annotation/PointAnnotationEnumsExtensions.kt rename to mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/annotation/PointAnnotationEnumsExtensions.kt diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/annotation/PolygonAnnotationController.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/annotation/PolygonAnnotationController.kt similarity index 100% rename from android/src/main/kotlin/com/mapbox/maps/mapbox_maps/annotation/PolygonAnnotationController.kt rename to mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/annotation/PolygonAnnotationController.kt diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/annotation/PolygonAnnotationEnumsExtensions.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/annotation/PolygonAnnotationEnumsExtensions.kt similarity index 100% rename from android/src/main/kotlin/com/mapbox/maps/mapbox_maps/annotation/PolygonAnnotationEnumsExtensions.kt rename to mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/annotation/PolygonAnnotationEnumsExtensions.kt diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/annotation/PolylineAnnotationController.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/annotation/PolylineAnnotationController.kt similarity index 100% rename from android/src/main/kotlin/com/mapbox/maps/mapbox_maps/annotation/PolylineAnnotationController.kt rename to mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/annotation/PolylineAnnotationController.kt diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/annotation/PolylineAnnotationEnumsExtensions.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/annotation/PolylineAnnotationEnumsExtensions.kt similarity index 100% rename from android/src/main/kotlin/com/mapbox/maps/mapbox_maps/annotation/PolylineAnnotationEnumsExtensions.kt rename to mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/annotation/PolylineAnnotationEnumsExtensions.kt diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/http/CustomHttpServiceInterceptor.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/http/CustomHttpServiceInterceptor.kt similarity index 100% rename from android/src/main/kotlin/com/mapbox/maps/mapbox_maps/http/CustomHttpServiceInterceptor.kt rename to mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/http/CustomHttpServiceInterceptor.kt diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/mapping/AttributionMappings.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/mapping/AttributionMappings.kt similarity index 100% rename from android/src/main/kotlin/com/mapbox/maps/mapbox_maps/mapping/AttributionMappings.kt rename to mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/mapping/AttributionMappings.kt diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/mapping/CompassMappings.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/mapping/CompassMappings.kt similarity index 100% rename from android/src/main/kotlin/com/mapbox/maps/mapbox_maps/mapping/CompassMappings.kt rename to mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/mapping/CompassMappings.kt diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/mapping/GesturesMappings.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/mapping/GesturesMappings.kt similarity index 100% rename from android/src/main/kotlin/com/mapbox/maps/mapbox_maps/mapping/GesturesMappings.kt rename to mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/mapping/GesturesMappings.kt diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/mapping/LocationComponentMappings.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/mapping/LocationComponentMappings.kt similarity index 100% rename from android/src/main/kotlin/com/mapbox/maps/mapbox_maps/mapping/LocationComponentMappings.kt rename to mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/mapping/LocationComponentMappings.kt diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/mapping/LogoMappings.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/mapping/LogoMappings.kt similarity index 100% rename from android/src/main/kotlin/com/mapbox/maps/mapbox_maps/mapping/LogoMappings.kt rename to mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/mapping/LogoMappings.kt diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/mapping/OrnamentPositionMapping.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/mapping/OrnamentPositionMapping.kt similarity index 100% rename from android/src/main/kotlin/com/mapbox/maps/mapbox_maps/mapping/OrnamentPositionMapping.kt rename to mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/mapping/OrnamentPositionMapping.kt diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/mapping/ScaleBarMappings.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/mapping/ScaleBarMappings.kt similarity index 100% rename from android/src/main/kotlin/com/mapbox/maps/mapbox_maps/mapping/ScaleBarMappings.kt rename to mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/mapping/ScaleBarMappings.kt diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/mapping/turf/TurfAdapters.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/mapping/turf/TurfAdapters.kt similarity index 100% rename from android/src/main/kotlin/com/mapbox/maps/mapbox_maps/mapping/turf/TurfAdapters.kt rename to mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/mapping/turf/TurfAdapters.kt diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/offline/OfflineController.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/offline/OfflineController.kt similarity index 100% rename from android/src/main/kotlin/com/mapbox/maps/mapbox_maps/offline/OfflineController.kt rename to mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/offline/OfflineController.kt diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/offline/OfflineMapInstanceManager.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/offline/OfflineMapInstanceManager.kt similarity index 100% rename from android/src/main/kotlin/com/mapbox/maps/mapbox_maps/offline/OfflineMapInstanceManager.kt rename to mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/offline/OfflineMapInstanceManager.kt diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/offline/OfflineSwitch.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/offline/OfflineSwitch.kt similarity index 100% rename from android/src/main/kotlin/com/mapbox/maps/mapbox_maps/offline/OfflineSwitch.kt rename to mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/offline/OfflineSwitch.kt diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/offline/TileStoreController.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/offline/TileStoreController.kt similarity index 100% rename from android/src/main/kotlin/com/mapbox/maps/mapbox_maps/offline/TileStoreController.kt rename to mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/offline/TileStoreController.kt diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/pigeons/CircleAnnotationMessenger.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/pigeons/CircleAnnotationMessenger.kt similarity index 100% rename from android/src/main/kotlin/com/mapbox/maps/mapbox_maps/pigeons/CircleAnnotationMessenger.kt rename to mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/pigeons/CircleAnnotationMessenger.kt diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/pigeons/GestureListeners.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/pigeons/GestureListeners.kt similarity index 100% rename from android/src/main/kotlin/com/mapbox/maps/mapbox_maps/pigeons/GestureListeners.kt rename to mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/pigeons/GestureListeners.kt diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/pigeons/LogBackend.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/pigeons/LogBackend.kt similarity index 100% rename from android/src/main/kotlin/com/mapbox/maps/mapbox_maps/pigeons/LogBackend.kt rename to mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/pigeons/LogBackend.kt diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/pigeons/MapInterfaces.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/pigeons/MapInterfaces.kt similarity index 97% rename from android/src/main/kotlin/com/mapbox/maps/mapbox_maps/pigeons/MapInterfaces.kt rename to mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/pigeons/MapInterfaces.kt index 1f762995b..8b1d1730e 100644 --- a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/pigeons/MapInterfaces.kt +++ b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/pigeons/MapInterfaces.kt @@ -692,186 +692,6 @@ data class TileCoverOptions( override fun hashCode(): Int = toList().hashCode() } -/** - * The distance on each side between rectangles, when one is contained into other. - * - * All fields' values are in `logical pixel` units. - * - * Generated class from Pigeon that represents data sent in messages. - */ -data class MbxEdgeInsets( - /** Padding from the top. */ - val top: Double, - /** Padding from the left. */ - val left: Double, - /** Padding from the bottom. */ - val bottom: Double, - /** Padding from the right. */ - val right: Double -) { - companion object { - fun fromList(pigeonVar_list: List): MbxEdgeInsets { - val top = pigeonVar_list[0] as Double - val left = pigeonVar_list[1] as Double - val bottom = pigeonVar_list[2] as Double - val right = pigeonVar_list[3] as Double - return MbxEdgeInsets(top, left, bottom, right) - } - } - fun toList(): List { - return listOf( - top, - left, - bottom, - right, - ) - } - override fun equals(other: Any?): Boolean { - if (other !is MbxEdgeInsets) { - return false - } - if (this === other) { - return true - } - return top == other.top && - left == other.left && - bottom == other.bottom && - right == other.right - } - - override fun hashCode(): Int = toList().hashCode() -} - -/** - * Various options for describing the viewpoint of a camera. All fields are - * optional. - * - * Anchor and center points are mutually exclusive, with preference for the - * center point when both are set. - * - * Generated class from Pigeon that represents data sent in messages. - */ -data class CameraOptions( - /** Coordinate at the center of the camera. */ - val center: Point? = null, - /** - * Padding around the interior of the view that affects the frame of - * reference for `center`. - */ - val padding: MbxEdgeInsets? = null, - /** - * Point of reference for `zoom` and `angle`, assuming an origin at the - * top-left corner of the view. - */ - val anchor: ScreenCoordinate? = null, - /** - * Zero-based zoom level. Constrained to the minimum and maximum zoom - * levels. - */ - val zoom: Double? = null, - /** Bearing, measured in degrees from true north. Wrapped to [0, 360). */ - val bearing: Double? = null, - /** Pitch toward the horizon measured in degrees. */ - val pitch: Double? = null -) { - companion object { - fun fromList(pigeonVar_list: List): CameraOptions { - val center = pigeonVar_list[0] as Point? - val padding = pigeonVar_list[1] as MbxEdgeInsets? - val anchor = pigeonVar_list[2] as ScreenCoordinate? - val zoom = pigeonVar_list[3] as Double? - val bearing = pigeonVar_list[4] as Double? - val pitch = pigeonVar_list[5] as Double? - return CameraOptions(center, padding, anchor, zoom, bearing, pitch) - } - } - fun toList(): List { - return listOf( - center, - padding, - anchor, - zoom, - bearing, - pitch, - ) - } - override fun equals(other: Any?): Boolean { - if (other !is CameraOptions) { - return false - } - if (this === other) { - return true - } - return center == other.center && - padding == other.padding && - anchor == other.anchor && - zoom == other.zoom && - bearing == other.bearing && - pitch == other.pitch - } - - override fun hashCode(): Int = toList().hashCode() -} - -/** - * Describes the viewpoint of a camera. - * - * Generated class from Pigeon that represents data sent in messages. - */ -data class CameraState( - /** Coordinate at the center of the camera. */ - val center: Point, - /** - * Padding around the interior of the view that affects the frame of - * reference for `center`. - */ - val padding: MbxEdgeInsets, - /** - * Zero-based zoom level. Constrained to the minimum and maximum zoom - * levels. - */ - val zoom: Double, - /** Bearing, measured in degrees from true north. Wrapped to [0, 360). */ - val bearing: Double, - /** Pitch toward the horizon measured in degrees. */ - val pitch: Double -) { - companion object { - fun fromList(pigeonVar_list: List): CameraState { - val center = pigeonVar_list[0] as Point - val padding = pigeonVar_list[1] as MbxEdgeInsets - val zoom = pigeonVar_list[2] as Double - val bearing = pigeonVar_list[3] as Double - val pitch = pigeonVar_list[4] as Double - return CameraState(center, padding, zoom, bearing, pitch) - } - } - fun toList(): List { - return listOf( - center, - padding, - zoom, - bearing, - pitch, - ) - } - override fun equals(other: Any?): Boolean { - if (other !is CameraState) { - return false - } - if (this === other) { - return true - } - return center == other.center && - padding == other.padding && - zoom == other.zoom && - bearing == other.bearing && - pitch == other.pitch - } - - override fun hashCode(): Int = toList().hashCode() -} - /** * Holds options to be used for setting `camera bounds`. * @@ -1255,45 +1075,6 @@ data class MapOptions( override fun hashCode(): Int = toList().hashCode() } -/** - * Describes the coordinate on the screen, measured from top to bottom and from left to right. - * Note: the `map` uses screen coordinate units measured in `logical pixels`. - * - * Generated class from Pigeon that represents data sent in messages. - */ -data class ScreenCoordinate( - /** A value representing the x position of this coordinate. */ - val x: Double, - /** A value representing the y position of this coordinate. */ - val y: Double -) { - companion object { - fun fromList(pigeonVar_list: List): ScreenCoordinate { - val x = pigeonVar_list[0] as Double - val y = pigeonVar_list[1] as Double - return ScreenCoordinate(x, y) - } - } - fun toList(): List { - return listOf( - x, - y, - ) - } - override fun equals(other: Any?): Boolean { - if (other !is ScreenCoordinate) { - return false - } - if (this === other) { - return true - } - return x == other.x && - y == other.y - } - - override fun hashCode(): Int = toList().hashCode() -} - /** * Describes the coordinate box on the screen, measured in `logical pixels` * from top to bottom and from left to right. diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/pigeons/OfflineMessenger.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/pigeons/OfflineMessenger.kt similarity index 100% rename from android/src/main/kotlin/com/mapbox/maps/mapbox_maps/pigeons/OfflineMessenger.kt rename to mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/pigeons/OfflineMessenger.kt diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/pigeons/PerformaceStatistics.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/pigeons/PerformaceStatistics.kt similarity index 100% rename from android/src/main/kotlin/com/mapbox/maps/mapbox_maps/pigeons/PerformaceStatistics.kt rename to mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/pigeons/PerformaceStatistics.kt diff --git a/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/pigeons/PlatformInterfaceDataTypes.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/pigeons/PlatformInterfaceDataTypes.kt new file mode 100644 index 000000000..0560ffa4d --- /dev/null +++ b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/pigeons/PlatformInterfaceDataTypes.kt @@ -0,0 +1,227 @@ +// Autogenerated from Pigeon (v25.2.0), do not edit directly. +// See also: https://pub.dev/packages/pigeon +@file:Suppress("UNCHECKED_CAST", "ArrayInDataClass") + +package com.mapbox.maps.mapbox_maps.pigeons + +import com.mapbox.geojson.Point +import com.mapbox.maps.mapbox_maps.mapping.turf.* + +/** + * Describes the coordinate on the screen, measured from top to bottom and from left to right. + * Note: the `map` uses screen coordinate units measured in `logical pixels`. + * + * Generated class from Pigeon that represents data sent in messages. + */ +data class ScreenCoordinate( + /** A value representing the x position of this coordinate. */ + val x: Double, + /** A value representing the y position of this coordinate. */ + val y: Double +) { + companion object { + fun fromList(pigeonVar_list: List): ScreenCoordinate { + val x = pigeonVar_list[0] as Double + val y = pigeonVar_list[1] as Double + return ScreenCoordinate(x, y) + } + } + fun toList(): List { + return listOf( + x, + y, + ) + } + override fun equals(other: Any?): Boolean { + if (other !is ScreenCoordinate) { + return false + } + if (this === other) { + return true + } + return x == other.x && + y == other.y + } + + override fun hashCode(): Int = toList().hashCode() +} + +/** + * The distance on each side between rectangles, when one is contained into other. + * + * All fields' values are in `logical pixel` units. + * + * Generated class from Pigeon that represents data sent in messages. + */ +data class MbxEdgeInsets( + /** Padding from the top. */ + val top: Double, + /** Padding from the left. */ + val left: Double, + /** Padding from the bottom. */ + val bottom: Double, + /** Padding from the right. */ + val right: Double +) { + companion object { + fun fromList(pigeonVar_list: List): MbxEdgeInsets { + val top = pigeonVar_list[0] as Double + val left = pigeonVar_list[1] as Double + val bottom = pigeonVar_list[2] as Double + val right = pigeonVar_list[3] as Double + return MbxEdgeInsets(top, left, bottom, right) + } + } + fun toList(): List { + return listOf( + top, + left, + bottom, + right, + ) + } + override fun equals(other: Any?): Boolean { + if (other !is MbxEdgeInsets) { + return false + } + if (this === other) { + return true + } + return top == other.top && + left == other.left && + bottom == other.bottom && + right == other.right + } + + override fun hashCode(): Int = toList().hashCode() +} + +/** + * Various options for describing the viewpoint of a camera. All fields are + * optional. + * + * Anchor and center points are mutually exclusive, with preference for the + * center point when both are set. + * + * Generated class from Pigeon that represents data sent in messages. + */ +data class CameraOptions( + /** Coordinate at the center of the camera. */ + val center: Point? = null, + /** + * Padding around the interior of the view that affects the frame of + * reference for `center`. + */ + val padding: MbxEdgeInsets? = null, + /** + * Point of reference for `zoom` and `angle`, assuming an origin at the + * top-left corner of the view. + */ + val anchor: ScreenCoordinate? = null, + /** + * Zero-based zoom level. Constrained to the minimum and maximum zoom + * levels. + */ + val zoom: Double? = null, + /** Bearing, measured in degrees from true north. Wrapped to [0, 360). */ + val bearing: Double? = null, + /** Pitch toward the horizon measured in degrees. */ + val pitch: Double? = null +) { + companion object { + fun fromList(pigeonVar_list: List): CameraOptions { + val center = pigeonVar_list[0] as Point? + val padding = pigeonVar_list[1] as MbxEdgeInsets? + val anchor = pigeonVar_list[2] as ScreenCoordinate? + val zoom = pigeonVar_list[3] as Double? + val bearing = pigeonVar_list[4] as Double? + val pitch = pigeonVar_list[5] as Double? + return CameraOptions(center, padding, anchor, zoom, bearing, pitch) + } + } + fun toList(): List { + return listOf( + center, + padding, + anchor, + zoom, + bearing, + pitch, + ) + } + override fun equals(other: Any?): Boolean { + if (other !is CameraOptions) { + return false + } + if (this === other) { + return true + } + return center == other.center && + padding == other.padding && + anchor == other.anchor && + zoom == other.zoom && + bearing == other.bearing && + pitch == other.pitch + } + + override fun hashCode(): Int = toList().hashCode() +} + +/** + * Describes the viewpoint of a camera. + * + * Generated class from Pigeon that represents data sent in messages. + */ +data class CameraState( + /** Coordinate at the center of the camera. */ + val center: Point, + /** + * Padding around the interior of the view that affects the frame of + * reference for `center`. + */ + val padding: MbxEdgeInsets, + /** + * Zero-based zoom level. Constrained to the minimum and maximum zoom + * levels. + */ + val zoom: Double, + /** Bearing, measured in degrees from true north. Wrapped to [0, 360). */ + val bearing: Double, + /** Pitch toward the horizon measured in degrees. */ + val pitch: Double +) { + companion object { + fun fromList(pigeonVar_list: List): CameraState { + val center = pigeonVar_list[0] as Point + val padding = pigeonVar_list[1] as MbxEdgeInsets + val zoom = pigeonVar_list[2] as Double + val bearing = pigeonVar_list[3] as Double + val pitch = pigeonVar_list[4] as Double + return CameraState(center, padding, zoom, bearing, pitch) + } + } + fun toList(): List { + return listOf( + center, + padding, + zoom, + bearing, + pitch, + ) + } + override fun equals(other: Any?): Boolean { + if (other !is CameraState) { + return false + } + if (this === other) { + return true + } + return center == other.center && + padding == other.padding && + zoom == other.zoom && + bearing == other.bearing && + pitch == other.pitch + } + + override fun hashCode(): Int = toList().hashCode() +} \ No newline at end of file diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/pigeons/PointAnnotationMessenger.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/pigeons/PointAnnotationMessenger.kt similarity index 100% rename from android/src/main/kotlin/com/mapbox/maps/mapbox_maps/pigeons/PointAnnotationMessenger.kt rename to mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/pigeons/PointAnnotationMessenger.kt diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/pigeons/PolygonAnnotationMessenger.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/pigeons/PolygonAnnotationMessenger.kt similarity index 100% rename from android/src/main/kotlin/com/mapbox/maps/mapbox_maps/pigeons/PolygonAnnotationMessenger.kt rename to mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/pigeons/PolygonAnnotationMessenger.kt diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/pigeons/PolylineAnnotationMessenger.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/pigeons/PolylineAnnotationMessenger.kt similarity index 100% rename from android/src/main/kotlin/com/mapbox/maps/mapbox_maps/pigeons/PolylineAnnotationMessenger.kt rename to mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/pigeons/PolylineAnnotationMessenger.kt diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/pigeons/Settings.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/pigeons/Settings.kt similarity index 100% rename from android/src/main/kotlin/com/mapbox/maps/mapbox_maps/pigeons/Settings.kt rename to mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/pigeons/Settings.kt diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/pigeons/SnapshotterMessenger.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/pigeons/SnapshotterMessenger.kt similarity index 100% rename from android/src/main/kotlin/com/mapbox/maps/mapbox_maps/pigeons/SnapshotterMessenger.kt rename to mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/pigeons/SnapshotterMessenger.kt diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/pigeons/ViewportInternal.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/pigeons/ViewportInternal.kt similarity index 100% rename from android/src/main/kotlin/com/mapbox/maps/mapbox_maps/pigeons/ViewportInternal.kt rename to mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/pigeons/ViewportInternal.kt diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/snapshotter/SnapshotterController.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/snapshotter/SnapshotterController.kt similarity index 100% rename from android/src/main/kotlin/com/mapbox/maps/mapbox_maps/snapshotter/SnapshotterController.kt rename to mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/snapshotter/SnapshotterController.kt diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/snapshotter/SnapshotterInstanceManager.kt b/mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/snapshotter/SnapshotterInstanceManager.kt similarity index 100% rename from android/src/main/kotlin/com/mapbox/maps/mapbox_maps/snapshotter/SnapshotterInstanceManager.kt rename to mapbox_maps_flutter_mobile/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/snapshotter/SnapshotterInstanceManager.kt diff --git a/example/.gitignore b/mapbox_maps_flutter_mobile/example/.gitignore similarity index 100% rename from example/.gitignore rename to mapbox_maps_flutter_mobile/example/.gitignore diff --git a/example/.metadata b/mapbox_maps_flutter_mobile/example/.metadata similarity index 100% rename from example/.metadata rename to mapbox_maps_flutter_mobile/example/.metadata diff --git a/example/README.md b/mapbox_maps_flutter_mobile/example/README.md similarity index 100% rename from example/README.md rename to mapbox_maps_flutter_mobile/example/README.md diff --git a/example/android/.gitignore b/mapbox_maps_flutter_mobile/example/android/.gitignore similarity index 100% rename from example/android/.gitignore rename to mapbox_maps_flutter_mobile/example/android/.gitignore diff --git a/example/android/app/build.gradle b/mapbox_maps_flutter_mobile/example/android/app/build.gradle similarity index 100% rename from example/android/app/build.gradle rename to mapbox_maps_flutter_mobile/example/android/app/build.gradle diff --git a/example/android/app/src/androidTest/java/com/mapbox/maps/mapbox_maps_example/MainActivityTest.java b/mapbox_maps_flutter_mobile/example/android/app/src/androidTest/java/com/mapbox/maps/mapbox_maps_example/MainActivityTest.java similarity index 100% rename from example/android/app/src/androidTest/java/com/mapbox/maps/mapbox_maps_example/MainActivityTest.java rename to mapbox_maps_flutter_mobile/example/android/app/src/androidTest/java/com/mapbox/maps/mapbox_maps_example/MainActivityTest.java diff --git a/example/android/app/src/debug/AndroidManifest.xml b/mapbox_maps_flutter_mobile/example/android/app/src/debug/AndroidManifest.xml similarity index 100% rename from example/android/app/src/debug/AndroidManifest.xml rename to mapbox_maps_flutter_mobile/example/android/app/src/debug/AndroidManifest.xml diff --git a/example/android/app/src/main/AndroidManifest.xml b/mapbox_maps_flutter_mobile/example/android/app/src/main/AndroidManifest.xml similarity index 100% rename from example/android/app/src/main/AndroidManifest.xml rename to mapbox_maps_flutter_mobile/example/android/app/src/main/AndroidManifest.xml diff --git a/example/android/app/src/main/kotlin/com/mapbox/maps/mapbox_maps_example/MainActivity.kt b/mapbox_maps_flutter_mobile/example/android/app/src/main/kotlin/com/mapbox/maps/mapbox_maps_example/MainActivity.kt similarity index 100% rename from example/android/app/src/main/kotlin/com/mapbox/maps/mapbox_maps_example/MainActivity.kt rename to mapbox_maps_flutter_mobile/example/android/app/src/main/kotlin/com/mapbox/maps/mapbox_maps_example/MainActivity.kt diff --git a/example/android/app/src/main/res/drawable-v21/launch_background.xml b/mapbox_maps_flutter_mobile/example/android/app/src/main/res/drawable-v21/launch_background.xml similarity index 100% rename from example/android/app/src/main/res/drawable-v21/launch_background.xml rename to mapbox_maps_flutter_mobile/example/android/app/src/main/res/drawable-v21/launch_background.xml diff --git a/example/android/app/src/main/res/drawable/launch_background.xml b/mapbox_maps_flutter_mobile/example/android/app/src/main/res/drawable/launch_background.xml similarity index 100% rename from example/android/app/src/main/res/drawable/launch_background.xml rename to mapbox_maps_flutter_mobile/example/android/app/src/main/res/drawable/launch_background.xml diff --git a/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/mapbox_maps_flutter_mobile/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png similarity index 100% rename from example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png rename to mapbox_maps_flutter_mobile/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png diff --git a/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/mapbox_maps_flutter_mobile/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png similarity index 100% rename from example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png rename to mapbox_maps_flutter_mobile/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png diff --git a/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/mapbox_maps_flutter_mobile/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png similarity index 100% rename from example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png rename to mapbox_maps_flutter_mobile/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png diff --git a/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/mapbox_maps_flutter_mobile/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png similarity index 100% rename from example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png rename to mapbox_maps_flutter_mobile/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png diff --git a/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/mapbox_maps_flutter_mobile/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png similarity index 100% rename from example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png rename to mapbox_maps_flutter_mobile/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png diff --git a/example/android/app/src/main/res/values-night/styles.xml b/mapbox_maps_flutter_mobile/example/android/app/src/main/res/values-night/styles.xml similarity index 100% rename from example/android/app/src/main/res/values-night/styles.xml rename to mapbox_maps_flutter_mobile/example/android/app/src/main/res/values-night/styles.xml diff --git a/example/android/app/src/main/res/values/styles.xml b/mapbox_maps_flutter_mobile/example/android/app/src/main/res/values/styles.xml similarity index 100% rename from example/android/app/src/main/res/values/styles.xml rename to mapbox_maps_flutter_mobile/example/android/app/src/main/res/values/styles.xml diff --git a/example/android/app/src/profile/AndroidManifest.xml b/mapbox_maps_flutter_mobile/example/android/app/src/profile/AndroidManifest.xml similarity index 83% rename from example/android/app/src/profile/AndroidManifest.xml rename to mapbox_maps_flutter_mobile/example/android/app/src/profile/AndroidManifest.xml index dfa0ba8d3..f880684a6 100644 --- a/example/android/app/src/profile/AndroidManifest.xml +++ b/mapbox_maps_flutter_mobile/example/android/app/src/profile/AndroidManifest.xml @@ -1,5 +1,4 @@ - + diff --git a/example/android/build.gradle b/mapbox_maps_flutter_mobile/example/android/build.gradle similarity index 100% rename from example/android/build.gradle rename to mapbox_maps_flutter_mobile/example/android/build.gradle diff --git a/mapbox_maps_flutter_mobile/example/android/gradle.properties b/mapbox_maps_flutter_mobile/example/android/gradle.properties new file mode 100644 index 000000000..9b7e91c07 --- /dev/null +++ b/mapbox_maps_flutter_mobile/example/android/gradle.properties @@ -0,0 +1,7 @@ +org.gradle.jvmargs=-Xmx4096M +android.useAndroidX=true +android.enableJetifier=false +useLocalDependencies=false +android.defaults.buildfeatures.buildconfig=true +android.nonTransitiveRClass=false +android.nonFinalResIds=false diff --git a/example/android/gradle/ktlint.gradle b/mapbox_maps_flutter_mobile/example/android/gradle/ktlint.gradle similarity index 100% rename from example/android/gradle/ktlint.gradle rename to mapbox_maps_flutter_mobile/example/android/gradle/ktlint.gradle diff --git a/example/android/gradle/lint.gradle b/mapbox_maps_flutter_mobile/example/android/gradle/lint.gradle similarity index 100% rename from example/android/gradle/lint.gradle rename to mapbox_maps_flutter_mobile/example/android/gradle/lint.gradle diff --git a/example/android/gradle/wrapper/gradle-wrapper.jar b/mapbox_maps_flutter_mobile/example/android/gradle/wrapper/gradle-wrapper.jar similarity index 100% rename from example/android/gradle/wrapper/gradle-wrapper.jar rename to mapbox_maps_flutter_mobile/example/android/gradle/wrapper/gradle-wrapper.jar diff --git a/example/android/gradle/wrapper/gradle-wrapper.properties b/mapbox_maps_flutter_mobile/example/android/gradle/wrapper/gradle-wrapper.properties similarity index 92% rename from example/android/gradle/wrapper/gradle-wrapper.properties rename to mapbox_maps_flutter_mobile/example/android/gradle/wrapper/gradle-wrapper.properties index f58dbd5d8..c38a728c4 100644 --- a/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/mapbox_maps_flutter_mobile/example/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Tue Apr 30 20:27:36 EEST 2024 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/example/android/gradlew b/mapbox_maps_flutter_mobile/example/android/gradlew similarity index 100% rename from example/android/gradlew rename to mapbox_maps_flutter_mobile/example/android/gradlew diff --git a/example/android/settings.gradle b/mapbox_maps_flutter_mobile/example/android/settings.gradle similarity index 92% rename from example/android/settings.gradle rename to mapbox_maps_flutter_mobile/example/android/settings.gradle index dcd3b479a..34d8421bb 100644 --- a/example/android/settings.gradle +++ b/mapbox_maps_flutter_mobile/example/android/settings.gradle @@ -18,7 +18,7 @@ pluginManagement { plugins { id "dev.flutter.flutter-plugin-loader" version "1.0.0" - id "com.android.application" version "7.3.1" apply false + id "com.android.application" version '8.7.0' apply false id "org.jetbrains.kotlin.android" version "1.8.22" apply false } diff --git a/example/assets/cluster/cluster_count_layer.json b/mapbox_maps_flutter_mobile/example/assets/cluster/cluster_count_layer.json similarity index 100% rename from example/assets/cluster/cluster_count_layer.json rename to mapbox_maps_flutter_mobile/example/assets/cluster/cluster_count_layer.json diff --git a/example/assets/cluster/cluster_layer.json b/mapbox_maps_flutter_mobile/example/assets/cluster/cluster_layer.json similarity index 100% rename from example/assets/cluster/cluster_layer.json rename to mapbox_maps_flutter_mobile/example/assets/cluster/cluster_layer.json diff --git a/example/assets/cluster/cluster_source.json b/mapbox_maps_flutter_mobile/example/assets/cluster/cluster_source.json similarity index 100% rename from example/assets/cluster/cluster_source.json rename to mapbox_maps_flutter_mobile/example/assets/cluster/cluster_source.json diff --git a/example/assets/cluster/unclustered_point_layer.json b/mapbox_maps_flutter_mobile/example/assets/cluster/unclustered_point_layer.json similarity index 100% rename from example/assets/cluster/unclustered_point_layer.json rename to mapbox_maps_flutter_mobile/example/assets/cluster/unclustered_point_layer.json diff --git a/example/assets/featuresetsStyle.json b/mapbox_maps_flutter_mobile/example/assets/featuresetsStyle.json similarity index 100% rename from example/assets/featuresetsStyle.json rename to mapbox_maps_flutter_mobile/example/assets/featuresetsStyle.json diff --git a/example/assets/fragment_realestate_NY.json b/mapbox_maps_flutter_mobile/example/assets/fragment_realestate_NY.json similarity index 100% rename from example/assets/fragment_realestate_NY.json rename to mapbox_maps_flutter_mobile/example/assets/fragment_realestate_NY.json diff --git a/example/assets/from_crema_to_council_crest.geojson b/mapbox_maps_flutter_mobile/example/assets/from_crema_to_council_crest.geojson similarity index 100% rename from example/assets/from_crema_to_council_crest.geojson rename to mapbox_maps_flutter_mobile/example/assets/from_crema_to_council_crest.geojson diff --git a/example/assets/geojson_source_large_points.json b/mapbox_maps_flutter_mobile/example/assets/geojson_source_large_points.json similarity index 100% rename from example/assets/geojson_source_large_points.json rename to mapbox_maps_flutter_mobile/example/assets/geojson_source_large_points.json diff --git a/example/assets/layer.json b/mapbox_maps_flutter_mobile/example/assets/layer.json similarity index 100% rename from example/assets/layer.json rename to mapbox_maps_flutter_mobile/example/assets/layer.json diff --git a/example/assets/miami_beach.png b/mapbox_maps_flutter_mobile/example/assets/miami_beach.png similarity index 100% rename from example/assets/miami_beach.png rename to mapbox_maps_flutter_mobile/example/assets/miami_beach.png diff --git a/example/assets/point_layer.json b/mapbox_maps_flutter_mobile/example/assets/point_layer.json similarity index 100% rename from example/assets/point_layer.json rename to mapbox_maps_flutter_mobile/example/assets/point_layer.json diff --git a/example/assets/raster_array_layers.json b/mapbox_maps_flutter_mobile/example/assets/raster_array_layers.json similarity index 100% rename from example/assets/raster_array_layers.json rename to mapbox_maps_flutter_mobile/example/assets/raster_array_layers.json diff --git a/example/assets/sf_airport_route.geojson b/mapbox_maps_flutter_mobile/example/assets/sf_airport_route.geojson similarity index 100% rename from example/assets/sf_airport_route.geojson rename to mapbox_maps_flutter_mobile/example/assets/sf_airport_route.geojson diff --git a/example/assets/source.json b/mapbox_maps_flutter_mobile/example/assets/source.json similarity index 100% rename from example/assets/source.json rename to mapbox_maps_flutter_mobile/example/assets/source.json diff --git a/example/assets/sportcar.glb b/mapbox_maps_flutter_mobile/example/assets/sportcar.glb similarity index 100% rename from example/assets/sportcar.glb rename to mapbox_maps_flutter_mobile/example/assets/sportcar.glb diff --git a/example/assets/style.json b/mapbox_maps_flutter_mobile/example/assets/style.json similarity index 100% rename from example/assets/style.json rename to mapbox_maps_flutter_mobile/example/assets/style.json diff --git a/example/assets/symbols/2.0x/custom-icon.png b/mapbox_maps_flutter_mobile/example/assets/symbols/2.0x/custom-icon.png similarity index 100% rename from example/assets/symbols/2.0x/custom-icon.png rename to mapbox_maps_flutter_mobile/example/assets/symbols/2.0x/custom-icon.png diff --git a/example/assets/symbols/3.0x/custom-icon.png b/mapbox_maps_flutter_mobile/example/assets/symbols/3.0x/custom-icon.png similarity index 100% rename from example/assets/symbols/3.0x/custom-icon.png rename to mapbox_maps_flutter_mobile/example/assets/symbols/3.0x/custom-icon.png diff --git a/example/assets/symbols/custom-icon.png b/mapbox_maps_flutter_mobile/example/assets/symbols/custom-icon.png similarity index 100% rename from example/assets/symbols/custom-icon.png rename to mapbox_maps_flutter_mobile/example/assets/symbols/custom-icon.png diff --git a/example/integration_test/all_test.dart b/mapbox_maps_flutter_mobile/example/integration_test/all_test.dart similarity index 100% rename from example/integration_test/all_test.dart rename to mapbox_maps_flutter_mobile/example/integration_test/all_test.dart diff --git a/example/integration_test/animation_test.dart b/mapbox_maps_flutter_mobile/example/integration_test/animation_test.dart similarity index 99% rename from example/integration_test/animation_test.dart rename to mapbox_maps_flutter_mobile/example/integration_test/animation_test.dart index f05f01fa2..260c54096 100644 --- a/example/integration_test/animation_test.dart +++ b/mapbox_maps_flutter_mobile/example/integration_test/animation_test.dart @@ -3,6 +3,7 @@ import 'dart:io'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; import 'package:mapbox_maps_flutter/mapbox_maps_flutter.dart'; + import 'empty_map_widget.dart' as app; void main() { diff --git a/example/integration_test/annotations/circle_annotation_manager_test.dart b/mapbox_maps_flutter_mobile/example/integration_test/annotations/circle_annotation_manager_test.dart similarity index 100% rename from example/integration_test/annotations/circle_annotation_manager_test.dart rename to mapbox_maps_flutter_mobile/example/integration_test/annotations/circle_annotation_manager_test.dart diff --git a/example/integration_test/annotations/circle_annotation_test.dart b/mapbox_maps_flutter_mobile/example/integration_test/annotations/circle_annotation_test.dart similarity index 100% rename from example/integration_test/annotations/circle_annotation_test.dart rename to mapbox_maps_flutter_mobile/example/integration_test/annotations/circle_annotation_test.dart diff --git a/example/integration_test/annotations/point_annotation_manager_test.dart b/mapbox_maps_flutter_mobile/example/integration_test/annotations/point_annotation_manager_test.dart similarity index 100% rename from example/integration_test/annotations/point_annotation_manager_test.dart rename to mapbox_maps_flutter_mobile/example/integration_test/annotations/point_annotation_manager_test.dart diff --git a/example/integration_test/annotations/point_annotation_test.dart b/mapbox_maps_flutter_mobile/example/integration_test/annotations/point_annotation_test.dart similarity index 100% rename from example/integration_test/annotations/point_annotation_test.dart rename to mapbox_maps_flutter_mobile/example/integration_test/annotations/point_annotation_test.dart diff --git a/example/integration_test/annotations/polygon_annotation_manager_test.dart b/mapbox_maps_flutter_mobile/example/integration_test/annotations/polygon_annotation_manager_test.dart similarity index 100% rename from example/integration_test/annotations/polygon_annotation_manager_test.dart rename to mapbox_maps_flutter_mobile/example/integration_test/annotations/polygon_annotation_manager_test.dart diff --git a/example/integration_test/annotations/polygon_annotation_test.dart b/mapbox_maps_flutter_mobile/example/integration_test/annotations/polygon_annotation_test.dart similarity index 100% rename from example/integration_test/annotations/polygon_annotation_test.dart rename to mapbox_maps_flutter_mobile/example/integration_test/annotations/polygon_annotation_test.dart diff --git a/example/integration_test/annotations/polyline_annotation_manager_test.dart b/mapbox_maps_flutter_mobile/example/integration_test/annotations/polyline_annotation_manager_test.dart similarity index 100% rename from example/integration_test/annotations/polyline_annotation_manager_test.dart rename to mapbox_maps_flutter_mobile/example/integration_test/annotations/polyline_annotation_manager_test.dart diff --git a/example/integration_test/annotations/polyline_annotation_test.dart b/mapbox_maps_flutter_mobile/example/integration_test/annotations/polyline_annotation_test.dart similarity index 100% rename from example/integration_test/annotations/polyline_annotation_test.dart rename to mapbox_maps_flutter_mobile/example/integration_test/annotations/polyline_annotation_test.dart diff --git a/example/integration_test/attribution_test.dart b/mapbox_maps_flutter_mobile/example/integration_test/attribution_test.dart similarity index 100% rename from example/integration_test/attribution_test.dart rename to mapbox_maps_flutter_mobile/example/integration_test/attribution_test.dart diff --git a/example/integration_test/camera_test.dart b/mapbox_maps_flutter_mobile/example/integration_test/camera_test.dart similarity index 99% rename from example/integration_test/camera_test.dart rename to mapbox_maps_flutter_mobile/example/integration_test/camera_test.dart index 355c08f34..43611f2e2 100644 --- a/example/integration_test/camera_test.dart +++ b/mapbox_maps_flutter_mobile/example/integration_test/camera_test.dart @@ -1,6 +1,7 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; import 'package:mapbox_maps_flutter/mapbox_maps_flutter.dart'; + import 'empty_map_widget.dart' as app; void main() { diff --git a/example/integration_test/compass_test.dart b/mapbox_maps_flutter_mobile/example/integration_test/compass_test.dart similarity index 100% rename from example/integration_test/compass_test.dart rename to mapbox_maps_flutter_mobile/example/integration_test/compass_test.dart diff --git a/example/integration_test/empty_map_widget.dart b/mapbox_maps_flutter_mobile/example/integration_test/empty_map_widget.dart similarity index 100% rename from example/integration_test/empty_map_widget.dart rename to mapbox_maps_flutter_mobile/example/integration_test/empty_map_widget.dart diff --git a/example/integration_test/gestures_test.dart b/mapbox_maps_flutter_mobile/example/integration_test/gestures_test.dart similarity index 99% rename from example/integration_test/gestures_test.dart rename to mapbox_maps_flutter_mobile/example/integration_test/gestures_test.dart index 8b9561862..9ff632048 100644 --- a/example/integration_test/gestures_test.dart +++ b/mapbox_maps_flutter_mobile/example/integration_test/gestures_test.dart @@ -3,6 +3,7 @@ import 'dart:io'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; import 'package:mapbox_maps_flutter/mapbox_maps_flutter.dart'; + import 'empty_map_widget.dart' as app; void main() { diff --git a/example/integration_test/interactive_features_test.dart b/mapbox_maps_flutter_mobile/example/integration_test/interactive_features_test.dart similarity index 99% rename from example/integration_test/interactive_features_test.dart rename to mapbox_maps_flutter_mobile/example/integration_test/interactive_features_test.dart index 1b3c2da36..54bc0f5e3 100644 --- a/example/integration_test/interactive_features_test.dart +++ b/mapbox_maps_flutter_mobile/example/integration_test/interactive_features_test.dart @@ -3,6 +3,7 @@ import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; import 'package:mapbox_maps_flutter/mapbox_maps_flutter.dart'; + import 'empty_map_widget.dart' as app; void main() { diff --git a/example/integration_test/location_test.dart b/mapbox_maps_flutter_mobile/example/integration_test/location_test.dart similarity index 100% rename from example/integration_test/location_test.dart rename to mapbox_maps_flutter_mobile/example/integration_test/location_test.dart diff --git a/example/integration_test/logo_test.dart b/mapbox_maps_flutter_mobile/example/integration_test/logo_test.dart similarity index 100% rename from example/integration_test/logo_test.dart rename to mapbox_maps_flutter_mobile/example/integration_test/logo_test.dart diff --git a/example/integration_test/map_interface_test.dart b/mapbox_maps_flutter_mobile/example/integration_test/map_interface_test.dart similarity index 99% rename from example/integration_test/map_interface_test.dart rename to mapbox_maps_flutter_mobile/example/integration_test/map_interface_test.dart index ec0c9c0ee..e9ef8d7c0 100644 --- a/example/integration_test/map_interface_test.dart +++ b/mapbox_maps_flutter_mobile/example/integration_test/map_interface_test.dart @@ -5,6 +5,7 @@ import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; import 'package:mapbox_maps_flutter/mapbox_maps_flutter.dart'; + import 'empty_map_widget.dart' as app; void main() { diff --git a/example/integration_test/offline_test.dart b/mapbox_maps_flutter_mobile/example/integration_test/offline_test.dart similarity index 100% rename from example/integration_test/offline_test.dart rename to mapbox_maps_flutter_mobile/example/integration_test/offline_test.dart diff --git a/example/integration_test/projection_test.dart b/mapbox_maps_flutter_mobile/example/integration_test/projection_test.dart similarity index 100% rename from example/integration_test/projection_test.dart rename to mapbox_maps_flutter_mobile/example/integration_test/projection_test.dart diff --git a/example/integration_test/scale_bar_test.dart b/mapbox_maps_flutter_mobile/example/integration_test/scale_bar_test.dart similarity index 100% rename from example/integration_test/scale_bar_test.dart rename to mapbox_maps_flutter_mobile/example/integration_test/scale_bar_test.dart diff --git a/example/integration_test/snapshotter/snapshotter_test.dart b/mapbox_maps_flutter_mobile/example/integration_test/snapshotter/snapshotter_test.dart similarity index 96% rename from example/integration_test/snapshotter/snapshotter_test.dart rename to mapbox_maps_flutter_mobile/example/integration_test/snapshotter/snapshotter_test.dart index 3e2fc33f4..8cfde171e 100644 --- a/example/integration_test/snapshotter/snapshotter_test.dart +++ b/mapbox_maps_flutter_mobile/example/integration_test/snapshotter/snapshotter_test.dart @@ -5,6 +5,8 @@ import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; import 'package:mapbox_maps_flutter/mapbox_maps_flutter.dart'; +import 'package:mapbox_maps_flutter_interface/mapbox_maps_flutter_interface.dart' + show CameraOptions; import '../empty_map_widget.dart' as app; void main() { @@ -96,7 +98,7 @@ void main() { expect(bounds, isNotNull); final camera = await snapshotter.camera( - coordinates: [cameraOptions.center!], + coordinates: [Point(coordinates: cameraState.center.coordinates)], bearing: cameraOptions.bearing, pitch: cameraOptions.pitch, ); diff --git a/example/integration_test/style/layer/background_layer_test.dart b/mapbox_maps_flutter_mobile/example/integration_test/style/layer/background_layer_test.dart similarity index 100% rename from example/integration_test/style/layer/background_layer_test.dart rename to mapbox_maps_flutter_mobile/example/integration_test/style/layer/background_layer_test.dart diff --git a/example/integration_test/style/layer/circle_layer_test.dart b/mapbox_maps_flutter_mobile/example/integration_test/style/layer/circle_layer_test.dart similarity index 100% rename from example/integration_test/style/layer/circle_layer_test.dart rename to mapbox_maps_flutter_mobile/example/integration_test/style/layer/circle_layer_test.dart diff --git a/example/integration_test/style/layer/clip_layer_test.dart b/mapbox_maps_flutter_mobile/example/integration_test/style/layer/clip_layer_test.dart similarity index 100% rename from example/integration_test/style/layer/clip_layer_test.dart rename to mapbox_maps_flutter_mobile/example/integration_test/style/layer/clip_layer_test.dart diff --git a/example/integration_test/style/layer/fill_extrusion_layer_test.dart b/mapbox_maps_flutter_mobile/example/integration_test/style/layer/fill_extrusion_layer_test.dart similarity index 100% rename from example/integration_test/style/layer/fill_extrusion_layer_test.dart rename to mapbox_maps_flutter_mobile/example/integration_test/style/layer/fill_extrusion_layer_test.dart diff --git a/example/integration_test/style/layer/fill_layer_test.dart b/mapbox_maps_flutter_mobile/example/integration_test/style/layer/fill_layer_test.dart similarity index 100% rename from example/integration_test/style/layer/fill_layer_test.dart rename to mapbox_maps_flutter_mobile/example/integration_test/style/layer/fill_layer_test.dart diff --git a/example/integration_test/style/layer/heatmap_layer_test.dart b/mapbox_maps_flutter_mobile/example/integration_test/style/layer/heatmap_layer_test.dart similarity index 100% rename from example/integration_test/style/layer/heatmap_layer_test.dart rename to mapbox_maps_flutter_mobile/example/integration_test/style/layer/heatmap_layer_test.dart diff --git a/example/integration_test/style/layer/hillshade_layer_test.dart b/mapbox_maps_flutter_mobile/example/integration_test/style/layer/hillshade_layer_test.dart similarity index 100% rename from example/integration_test/style/layer/hillshade_layer_test.dart rename to mapbox_maps_flutter_mobile/example/integration_test/style/layer/hillshade_layer_test.dart diff --git a/example/integration_test/style/layer/line_layer_test.dart b/mapbox_maps_flutter_mobile/example/integration_test/style/layer/line_layer_test.dart similarity index 100% rename from example/integration_test/style/layer/line_layer_test.dart rename to mapbox_maps_flutter_mobile/example/integration_test/style/layer/line_layer_test.dart diff --git a/example/integration_test/style/layer/location_indicator_layer_test.dart b/mapbox_maps_flutter_mobile/example/integration_test/style/layer/location_indicator_layer_test.dart similarity index 100% rename from example/integration_test/style/layer/location_indicator_layer_test.dart rename to mapbox_maps_flutter_mobile/example/integration_test/style/layer/location_indicator_layer_test.dart diff --git a/example/integration_test/style/layer/model_layer_test.dart b/mapbox_maps_flutter_mobile/example/integration_test/style/layer/model_layer_test.dart similarity index 100% rename from example/integration_test/style/layer/model_layer_test.dart rename to mapbox_maps_flutter_mobile/example/integration_test/style/layer/model_layer_test.dart diff --git a/example/integration_test/style/layer/raster_layer_test.dart b/mapbox_maps_flutter_mobile/example/integration_test/style/layer/raster_layer_test.dart similarity index 100% rename from example/integration_test/style/layer/raster_layer_test.dart rename to mapbox_maps_flutter_mobile/example/integration_test/style/layer/raster_layer_test.dart diff --git a/example/integration_test/style/layer/raster_particle_layer_test.dart b/mapbox_maps_flutter_mobile/example/integration_test/style/layer/raster_particle_layer_test.dart similarity index 100% rename from example/integration_test/style/layer/raster_particle_layer_test.dart rename to mapbox_maps_flutter_mobile/example/integration_test/style/layer/raster_particle_layer_test.dart diff --git a/example/integration_test/style/layer/sky_layer_test.dart b/mapbox_maps_flutter_mobile/example/integration_test/style/layer/sky_layer_test.dart similarity index 100% rename from example/integration_test/style/layer/sky_layer_test.dart rename to mapbox_maps_flutter_mobile/example/integration_test/style/layer/sky_layer_test.dart diff --git a/example/integration_test/style/layer/slot_layer_test.dart b/mapbox_maps_flutter_mobile/example/integration_test/style/layer/slot_layer_test.dart similarity index 100% rename from example/integration_test/style/layer/slot_layer_test.dart rename to mapbox_maps_flutter_mobile/example/integration_test/style/layer/slot_layer_test.dart diff --git a/example/integration_test/style/layer/symbol_layer_test.dart b/mapbox_maps_flutter_mobile/example/integration_test/style/layer/symbol_layer_test.dart similarity index 100% rename from example/integration_test/style/layer/symbol_layer_test.dart rename to mapbox_maps_flutter_mobile/example/integration_test/style/layer/symbol_layer_test.dart diff --git a/example/integration_test/style/source/geojson_source_test.dart b/mapbox_maps_flutter_mobile/example/integration_test/style/source/geojson_source_test.dart similarity index 100% rename from example/integration_test/style/source/geojson_source_test.dart rename to mapbox_maps_flutter_mobile/example/integration_test/style/source/geojson_source_test.dart diff --git a/example/integration_test/style/source/image_source_test.dart b/mapbox_maps_flutter_mobile/example/integration_test/style/source/image_source_test.dart similarity index 100% rename from example/integration_test/style/source/image_source_test.dart rename to mapbox_maps_flutter_mobile/example/integration_test/style/source/image_source_test.dart diff --git a/example/integration_test/style/source/raster_source_test.dart b/mapbox_maps_flutter_mobile/example/integration_test/style/source/raster_source_test.dart similarity index 100% rename from example/integration_test/style/source/raster_source_test.dart rename to mapbox_maps_flutter_mobile/example/integration_test/style/source/raster_source_test.dart diff --git a/example/integration_test/style/source/rasterarray_source_test.dart b/mapbox_maps_flutter_mobile/example/integration_test/style/source/rasterarray_source_test.dart similarity index 100% rename from example/integration_test/style/source/rasterarray_source_test.dart rename to mapbox_maps_flutter_mobile/example/integration_test/style/source/rasterarray_source_test.dart diff --git a/example/integration_test/style/source/rasterdem_source_test.dart b/mapbox_maps_flutter_mobile/example/integration_test/style/source/rasterdem_source_test.dart similarity index 100% rename from example/integration_test/style/source/rasterdem_source_test.dart rename to mapbox_maps_flutter_mobile/example/integration_test/style/source/rasterdem_source_test.dart diff --git a/example/integration_test/style/source/vector_source_test.dart b/mapbox_maps_flutter_mobile/example/integration_test/style/source/vector_source_test.dart similarity index 100% rename from example/integration_test/style/source/vector_source_test.dart rename to mapbox_maps_flutter_mobile/example/integration_test/style/source/vector_source_test.dart diff --git a/example/integration_test/style/style_test.dart b/mapbox_maps_flutter_mobile/example/integration_test/style/style_test.dart similarity index 100% rename from example/integration_test/style/style_test.dart rename to mapbox_maps_flutter_mobile/example/integration_test/style/style_test.dart diff --git a/example/integration_test/utils/list_close_to_matcher.dart b/mapbox_maps_flutter_mobile/example/integration_test/utils/list_close_to_matcher.dart similarity index 88% rename from example/integration_test/utils/list_close_to_matcher.dart rename to mapbox_maps_flutter_mobile/example/integration_test/utils/list_close_to_matcher.dart index 176a3c3c8..1f7ef777a 100644 --- a/example/integration_test/utils/list_close_to_matcher.dart +++ b/mapbox_maps_flutter_mobile/example/integration_test/utils/list_close_to_matcher.dart @@ -14,11 +14,11 @@ class _IsListCloseTo extends Matcher { if (_value == null || list == null) { return false; } - if (_value!.length != list.length) { + if (_value.length != list.length) { return false; } - for (var i = 0; i < _value!.length; i++) { - final expected = _value![i]; + for (var i = 0; i < _value.length; i++) { + final expected = _value[i]; final actual = list[i]; if (expected is num && actual is num) { final pairIsCloseTo = closeTo(expected, _delta).matches(actual, {}); diff --git a/example/integration_test/viewport_test.dart b/mapbox_maps_flutter_mobile/example/integration_test/viewport_test.dart similarity index 99% rename from example/integration_test/viewport_test.dart rename to mapbox_maps_flutter_mobile/example/integration_test/viewport_test.dart index 14ffc80a5..0153f1818 100644 --- a/example/integration_test/viewport_test.dart +++ b/mapbox_maps_flutter_mobile/example/integration_test/viewport_test.dart @@ -3,6 +3,7 @@ import 'dart:io'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; import 'package:mapbox_maps_flutter/mapbox_maps_flutter.dart'; + import 'empty_map_widget.dart' as app; void main() { diff --git a/example/ios/.gitignore b/mapbox_maps_flutter_mobile/example/ios/.gitignore similarity index 100% rename from example/ios/.gitignore rename to mapbox_maps_flutter_mobile/example/ios/.gitignore diff --git a/example/ios/Flutter/AppFrameworkInfo.plist b/mapbox_maps_flutter_mobile/example/ios/Flutter/AppFrameworkInfo.plist similarity index 100% rename from example/ios/Flutter/AppFrameworkInfo.plist rename to mapbox_maps_flutter_mobile/example/ios/Flutter/AppFrameworkInfo.plist diff --git a/example/ios/Flutter/Debug.xcconfig b/mapbox_maps_flutter_mobile/example/ios/Flutter/Debug.xcconfig similarity index 100% rename from example/ios/Flutter/Debug.xcconfig rename to mapbox_maps_flutter_mobile/example/ios/Flutter/Debug.xcconfig diff --git a/example/ios/Flutter/Release.xcconfig b/mapbox_maps_flutter_mobile/example/ios/Flutter/Release.xcconfig similarity index 100% rename from example/ios/Flutter/Release.xcconfig rename to mapbox_maps_flutter_mobile/example/ios/Flutter/Release.xcconfig diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/mapbox_maps_flutter_mobile/example/ios/Runner.xcodeproj/project.pbxproj similarity index 100% rename from example/ios/Runner.xcodeproj/project.pbxproj rename to mapbox_maps_flutter_mobile/example/ios/Runner.xcodeproj/project.pbxproj diff --git a/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/mapbox_maps_flutter_mobile/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to mapbox_maps_flutter_mobile/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/mapbox_maps_flutter_mobile/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to mapbox_maps_flutter_mobile/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/mapbox_maps_flutter_mobile/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings similarity index 100% rename from example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings rename to mapbox_maps_flutter_mobile/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings diff --git a/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/mapbox_maps_flutter_mobile/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved similarity index 100% rename from example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved rename to mapbox_maps_flutter_mobile/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved diff --git a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/mapbox_maps_flutter_mobile/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme similarity index 100% rename from example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme rename to mapbox_maps_flutter_mobile/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme diff --git a/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/mapbox_maps_flutter_mobile/example/ios/Runner.xcworkspace/contents.xcworkspacedata similarity index 100% rename from example/ios/Runner.xcworkspace/contents.xcworkspacedata rename to mapbox_maps_flutter_mobile/example/ios/Runner.xcworkspace/contents.xcworkspacedata diff --git a/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/mapbox_maps_flutter_mobile/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to mapbox_maps_flutter_mobile/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/mapbox_maps_flutter_mobile/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings similarity index 100% rename from example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings rename to mapbox_maps_flutter_mobile/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings diff --git a/example/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved b/mapbox_maps_flutter_mobile/example/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved similarity index 100% rename from example/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved rename to mapbox_maps_flutter_mobile/example/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved diff --git a/example/ios/Runner/AppDelegate.swift b/mapbox_maps_flutter_mobile/example/ios/Runner/AppDelegate.swift similarity index 100% rename from example/ios/Runner/AppDelegate.swift rename to mapbox_maps_flutter_mobile/example/ios/Runner/AppDelegate.swift diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/mapbox_maps_flutter_mobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json rename to mapbox_maps_flutter_mobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/mapbox_maps_flutter_mobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png similarity index 100% rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png rename to mapbox_maps_flutter_mobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/mapbox_maps_flutter_mobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png similarity index 100% rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png rename to mapbox_maps_flutter_mobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/mapbox_maps_flutter_mobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png similarity index 100% rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png rename to mapbox_maps_flutter_mobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/mapbox_maps_flutter_mobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png similarity index 100% rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png rename to mapbox_maps_flutter_mobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/mapbox_maps_flutter_mobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png similarity index 100% rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png rename to mapbox_maps_flutter_mobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/mapbox_maps_flutter_mobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png similarity index 100% rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png rename to mapbox_maps_flutter_mobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/mapbox_maps_flutter_mobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png similarity index 100% rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png rename to mapbox_maps_flutter_mobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/mapbox_maps_flutter_mobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png similarity index 100% rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png rename to mapbox_maps_flutter_mobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/mapbox_maps_flutter_mobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png similarity index 100% rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png rename to mapbox_maps_flutter_mobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/mapbox_maps_flutter_mobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png similarity index 100% rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png rename to mapbox_maps_flutter_mobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/mapbox_maps_flutter_mobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png similarity index 100% rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png rename to mapbox_maps_flutter_mobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/mapbox_maps_flutter_mobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png similarity index 100% rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png rename to mapbox_maps_flutter_mobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/mapbox_maps_flutter_mobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png similarity index 100% rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png rename to mapbox_maps_flutter_mobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/mapbox_maps_flutter_mobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png similarity index 100% rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png rename to mapbox_maps_flutter_mobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/mapbox_maps_flutter_mobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png similarity index 100% rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png rename to mapbox_maps_flutter_mobile/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png diff --git a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/mapbox_maps_flutter_mobile/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json similarity index 100% rename from example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json rename to mapbox_maps_flutter_mobile/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json diff --git a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/mapbox_maps_flutter_mobile/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png similarity index 100% rename from example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png rename to mapbox_maps_flutter_mobile/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png diff --git a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/mapbox_maps_flutter_mobile/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png similarity index 100% rename from example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png rename to mapbox_maps_flutter_mobile/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png diff --git a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/mapbox_maps_flutter_mobile/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png similarity index 100% rename from example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png rename to mapbox_maps_flutter_mobile/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png diff --git a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/mapbox_maps_flutter_mobile/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md similarity index 100% rename from example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md rename to mapbox_maps_flutter_mobile/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md diff --git a/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/mapbox_maps_flutter_mobile/example/ios/Runner/Base.lproj/LaunchScreen.storyboard similarity index 100% rename from example/ios/Runner/Base.lproj/LaunchScreen.storyboard rename to mapbox_maps_flutter_mobile/example/ios/Runner/Base.lproj/LaunchScreen.storyboard diff --git a/example/ios/Runner/Base.lproj/Main.storyboard b/mapbox_maps_flutter_mobile/example/ios/Runner/Base.lproj/Main.storyboard similarity index 100% rename from example/ios/Runner/Base.lproj/Main.storyboard rename to mapbox_maps_flutter_mobile/example/ios/Runner/Base.lproj/Main.storyboard diff --git a/example/ios/Runner/Info.plist b/mapbox_maps_flutter_mobile/example/ios/Runner/Info.plist similarity index 100% rename from example/ios/Runner/Info.plist rename to mapbox_maps_flutter_mobile/example/ios/Runner/Info.plist diff --git a/example/ios/Runner/Runner-Bridging-Header.h b/mapbox_maps_flutter_mobile/example/ios/Runner/Runner-Bridging-Header.h similarity index 100% rename from example/ios/Runner/Runner-Bridging-Header.h rename to mapbox_maps_flutter_mobile/example/ios/Runner/Runner-Bridging-Header.h diff --git a/example/ios/RunnerTests/RunnerTests.m b/mapbox_maps_flutter_mobile/example/ios/RunnerTests/RunnerTests.m similarity index 100% rename from example/ios/RunnerTests/RunnerTests.m rename to mapbox_maps_flutter_mobile/example/ios/RunnerTests/RunnerTests.m diff --git a/example/lib/animated_route_example.dart b/mapbox_maps_flutter_mobile/example/lib/animated_route_example.dart similarity index 100% rename from example/lib/animated_route_example.dart rename to mapbox_maps_flutter_mobile/example/lib/animated_route_example.dart diff --git a/example/lib/animation_example.dart b/mapbox_maps_flutter_mobile/example/lib/animation_example.dart similarity index 99% rename from example/lib/animation_example.dart rename to mapbox_maps_flutter_mobile/example/lib/animation_example.dart index a04e6ac0b..c8199bfba 100644 --- a/example/lib/animation_example.dart +++ b/mapbox_maps_flutter_mobile/example/lib/animation_example.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:mapbox_maps_flutter/mapbox_maps_flutter.dart'; + import 'example.dart'; class AnimationExample extends StatefulWidget implements Example { diff --git a/example/lib/camera_example.dart b/mapbox_maps_flutter_mobile/example/lib/camera_example.dart similarity index 99% rename from example/lib/camera_example.dart rename to mapbox_maps_flutter_mobile/example/lib/camera_example.dart index d978e0a25..1a47c3b86 100644 --- a/example/lib/camera_example.dart +++ b/mapbox_maps_flutter_mobile/example/lib/camera_example.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:mapbox_maps_flutter/mapbox_maps_flutter.dart'; + import 'example.dart'; class CameraExample extends StatefulWidget implements Example { diff --git a/example/lib/circle_annotations_example.dart b/mapbox_maps_flutter_mobile/example/lib/circle_annotations_example.dart similarity index 99% rename from example/lib/circle_annotations_example.dart rename to mapbox_maps_flutter_mobile/example/lib/circle_annotations_example.dart index 9e3b5e0a2..b485d49ce 100644 --- a/example/lib/circle_annotations_example.dart +++ b/mapbox_maps_flutter_mobile/example/lib/circle_annotations_example.dart @@ -1,6 +1,7 @@ import 'package:flutter/material.dart' hide Visibility; import 'package:mapbox_maps_example/utils.dart'; import 'package:mapbox_maps_flutter/mapbox_maps_flutter.dart'; + import 'example.dart'; class CircleAnnotationExample extends StatefulWidget implements Example { diff --git a/example/lib/cluster_example.dart b/mapbox_maps_flutter_mobile/example/lib/cluster_example.dart similarity index 99% rename from example/lib/cluster_example.dart rename to mapbox_maps_flutter_mobile/example/lib/cluster_example.dart index 2335f39c8..e5118e947 100644 --- a/example/lib/cluster_example.dart +++ b/mapbox_maps_flutter_mobile/example/lib/cluster_example.dart @@ -1,6 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart' show rootBundle; import 'package:mapbox_maps_flutter/mapbox_maps_flutter.dart'; + import 'example.dart'; class StyleClustersExample extends StatefulWidget implements Example { diff --git a/example/lib/custom_header_example.dart b/mapbox_maps_flutter_mobile/example/lib/custom_header_example.dart similarity index 100% rename from example/lib/custom_header_example.dart rename to mapbox_maps_flutter_mobile/example/lib/custom_header_example.dart diff --git a/example/lib/debug_options_example.dart b/mapbox_maps_flutter_mobile/example/lib/debug_options_example.dart similarity index 100% rename from example/lib/debug_options_example.dart rename to mapbox_maps_flutter_mobile/example/lib/debug_options_example.dart diff --git a/example/lib/draggable-annotations-example.dart b/mapbox_maps_flutter_mobile/example/lib/draggable-annotations-example.dart similarity index 100% rename from example/lib/draggable-annotations-example.dart rename to mapbox_maps_flutter_mobile/example/lib/draggable-annotations-example.dart diff --git a/example/lib/edit_polygon_example.dart b/mapbox_maps_flutter_mobile/example/lib/edit_polygon_example.dart similarity index 100% rename from example/lib/edit_polygon_example.dart rename to mapbox_maps_flutter_mobile/example/lib/edit_polygon_example.dart diff --git a/example/lib/example.dart b/mapbox_maps_flutter_mobile/example/lib/example.dart similarity index 100% rename from example/lib/example.dart rename to mapbox_maps_flutter_mobile/example/lib/example.dart diff --git a/example/lib/full_map_example.dart b/mapbox_maps_flutter_mobile/example/lib/full_map_example.dart similarity index 99% rename from example/lib/full_map_example.dart rename to mapbox_maps_flutter_mobile/example/lib/full_map_example.dart index a09176fa6..e4c0d4e26 100644 --- a/example/lib/full_map_example.dart +++ b/mapbox_maps_flutter_mobile/example/lib/full_map_example.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:mapbox_maps_flutter/mapbox_maps_flutter.dart'; + import 'example.dart'; class FullMapExample extends StatefulWidget implements Example { diff --git a/example/lib/geojson_line_example.dart b/mapbox_maps_flutter_mobile/example/lib/geojson_line_example.dart similarity index 100% rename from example/lib/geojson_line_example.dart rename to mapbox_maps_flutter_mobile/example/lib/geojson_line_example.dart diff --git a/example/lib/gestures_example.dart b/mapbox_maps_flutter_mobile/example/lib/gestures_example.dart similarity index 100% rename from example/lib/gestures_example.dart rename to mapbox_maps_flutter_mobile/example/lib/gestures_example.dart diff --git a/example/lib/image_source_example.dart b/mapbox_maps_flutter_mobile/example/lib/image_source_example.dart similarity index 100% rename from example/lib/image_source_example.dart rename to mapbox_maps_flutter_mobile/example/lib/image_source_example.dart diff --git a/example/lib/location_example.dart b/mapbox_maps_flutter_mobile/example/lib/location_example.dart similarity index 100% rename from example/lib/location_example.dart rename to mapbox_maps_flutter_mobile/example/lib/location_example.dart diff --git a/example/lib/main.dart b/mapbox_maps_flutter_mobile/example/lib/main.dart similarity index 100% rename from example/lib/main.dart rename to mapbox_maps_flutter_mobile/example/lib/main.dart diff --git a/example/lib/map_interface_example.dart b/mapbox_maps_flutter_mobile/example/lib/map_interface_example.dart similarity index 100% rename from example/lib/map_interface_example.dart rename to mapbox_maps_flutter_mobile/example/lib/map_interface_example.dart diff --git a/example/lib/model_layer_example.dart b/mapbox_maps_flutter_mobile/example/lib/model_layer_example.dart similarity index 99% rename from example/lib/model_layer_example.dart rename to mapbox_maps_flutter_mobile/example/lib/model_layer_example.dart index 05b9162f1..bd9781b4c 100644 --- a/example/lib/model_layer_example.dart +++ b/mapbox_maps_flutter_mobile/example/lib/model_layer_example.dart @@ -2,6 +2,7 @@ import 'dart:convert'; import 'package:flutter/material.dart'; import 'package:mapbox_maps_flutter/mapbox_maps_flutter.dart'; + import 'example.dart'; class ModelLayerExample extends StatefulWidget implements Example { diff --git a/example/lib/model_layer_interactions_example.dart b/mapbox_maps_flutter_mobile/example/lib/model_layer_interactions_example.dart similarity index 99% rename from example/lib/model_layer_interactions_example.dart rename to mapbox_maps_flutter_mobile/example/lib/model_layer_interactions_example.dart index 6f9ad1443..31f6eedbb 100644 --- a/example/lib/model_layer_interactions_example.dart +++ b/mapbox_maps_flutter_mobile/example/lib/model_layer_interactions_example.dart @@ -2,6 +2,7 @@ import 'dart:convert'; import 'package:flutter/material.dart'; import 'package:mapbox_maps_flutter/mapbox_maps_flutter.dart'; + import 'example.dart'; class ModelLayerInteractionsExample extends StatefulWidget implements Example { diff --git a/example/lib/offline_map_example.dart b/mapbox_maps_flutter_mobile/example/lib/offline_map_example.dart similarity index 100% rename from example/lib/offline_map_example.dart rename to mapbox_maps_flutter_mobile/example/lib/offline_map_example.dart diff --git a/example/lib/ornaments_example.dart b/mapbox_maps_flutter_mobile/example/lib/ornaments_example.dart similarity index 100% rename from example/lib/ornaments_example.dart rename to mapbox_maps_flutter_mobile/example/lib/ornaments_example.dart diff --git a/example/lib/point_annotations_example.dart b/mapbox_maps_flutter_mobile/example/lib/point_annotations_example.dart similarity index 100% rename from example/lib/point_annotations_example.dart rename to mapbox_maps_flutter_mobile/example/lib/point_annotations_example.dart diff --git a/example/lib/polygon_annotations_example.dart b/mapbox_maps_flutter_mobile/example/lib/polygon_annotations_example.dart similarity index 100% rename from example/lib/polygon_annotations_example.dart rename to mapbox_maps_flutter_mobile/example/lib/polygon_annotations_example.dart diff --git a/example/lib/polyline_annotations_example.dart b/mapbox_maps_flutter_mobile/example/lib/polyline_annotations_example.dart similarity index 99% rename from example/lib/polyline_annotations_example.dart rename to mapbox_maps_flutter_mobile/example/lib/polyline_annotations_example.dart index 6e6923a11..8549a1ed0 100644 --- a/example/lib/polyline_annotations_example.dart +++ b/mapbox_maps_flutter_mobile/example/lib/polyline_annotations_example.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:mapbox_maps_flutter/mapbox_maps_flutter.dart'; -import 'package:mapbox_maps_example/utils.dart'; +import 'utils.dart'; import 'example.dart'; diff --git a/example/lib/projection_example.dart b/mapbox_maps_flutter_mobile/example/lib/projection_example.dart similarity index 100% rename from example/lib/projection_example.dart rename to mapbox_maps_flutter_mobile/example/lib/projection_example.dart diff --git a/example/lib/simple_map_example.dart b/mapbox_maps_flutter_mobile/example/lib/simple_map_example.dart similarity index 100% rename from example/lib/simple_map_example.dart rename to mapbox_maps_flutter_mobile/example/lib/simple_map_example.dart diff --git a/example/lib/snapshotter_example.dart b/mapbox_maps_flutter_mobile/example/lib/snapshotter_example.dart similarity index 100% rename from example/lib/snapshotter_example.dart rename to mapbox_maps_flutter_mobile/example/lib/snapshotter_example.dart diff --git a/example/lib/spinning_globe_example.dart b/mapbox_maps_flutter_mobile/example/lib/spinning_globe_example.dart similarity index 95% rename from example/lib/spinning_globe_example.dart rename to mapbox_maps_flutter_mobile/example/lib/spinning_globe_example.dart index 9f187c4eb..2f472be3c 100644 --- a/example/lib/spinning_globe_example.dart +++ b/mapbox_maps_flutter_mobile/example/lib/spinning_globe_example.dart @@ -2,8 +2,10 @@ import 'dart:async'; import 'dart:math'; import 'package:flutter/material.dart'; -import 'package:mapbox_maps_example/example.dart'; +import 'example.dart'; import 'package:mapbox_maps_flutter/mapbox_maps_flutter.dart'; +import 'package:mapbox_maps_flutter_interface/mapbox_maps_flutter_interface.dart' + show CameraOptions, CameraState; class SpinningGlobeExample extends StatefulWidget implements Example { @override diff --git a/example/lib/standard_style_import_example.dart b/mapbox_maps_flutter_mobile/example/lib/standard_style_import_example.dart similarity index 100% rename from example/lib/standard_style_import_example.dart rename to mapbox_maps_flutter_mobile/example/lib/standard_style_import_example.dart diff --git a/example/lib/standard_style_interactions_example.dart b/mapbox_maps_flutter_mobile/example/lib/standard_style_interactions_example.dart similarity index 99% rename from example/lib/standard_style_interactions_example.dart rename to mapbox_maps_flutter_mobile/example/lib/standard_style_interactions_example.dart index b9aa7d884..28a1d9589 100644 --- a/example/lib/standard_style_interactions_example.dart +++ b/mapbox_maps_flutter_mobile/example/lib/standard_style_interactions_example.dart @@ -1,6 +1,7 @@ import 'dart:developer'; import 'package:flutter/material.dart'; import 'package:mapbox_maps_flutter/mapbox_maps_flutter.dart'; + import 'example.dart'; class StandardStyleInteractionsExample extends StatefulWidget diff --git a/example/lib/style_example.dart b/mapbox_maps_flutter_mobile/example/lib/style_example.dart similarity index 100% rename from example/lib/style_example.dart rename to mapbox_maps_flutter_mobile/example/lib/style_example.dart diff --git a/example/lib/tile_json_example.dart b/mapbox_maps_flutter_mobile/example/lib/tile_json_example.dart similarity index 100% rename from example/lib/tile_json_example.dart rename to mapbox_maps_flutter_mobile/example/lib/tile_json_example.dart diff --git a/example/lib/traffic_layer_example.dart b/mapbox_maps_flutter_mobile/example/lib/traffic_layer_example.dart similarity index 100% rename from example/lib/traffic_layer_example.dart rename to mapbox_maps_flutter_mobile/example/lib/traffic_layer_example.dart diff --git a/example/lib/traffic_route_line_example.dart b/mapbox_maps_flutter_mobile/example/lib/traffic_route_line_example.dart similarity index 98% rename from example/lib/traffic_route_line_example.dart rename to mapbox_maps_flutter_mobile/example/lib/traffic_route_line_example.dart index 0e784f9b9..276e18816 100644 --- a/example/lib/traffic_route_line_example.dart +++ b/mapbox_maps_flutter_mobile/example/lib/traffic_route_line_example.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:mapbox_maps_example/example.dart'; +import 'example.dart'; import 'package:mapbox_maps_flutter/mapbox_maps_flutter.dart'; class TrafficRouteLineExample extends StatefulWidget implements Example { diff --git a/example/lib/utils.dart b/mapbox_maps_flutter_mobile/example/lib/utils.dart similarity index 100% rename from example/lib/utils.dart rename to mapbox_maps_flutter_mobile/example/lib/utils.dart diff --git a/example/lib/vector_tile_source_example.dart b/mapbox_maps_flutter_mobile/example/lib/vector_tile_source_example.dart similarity index 100% rename from example/lib/vector_tile_source_example.dart rename to mapbox_maps_flutter_mobile/example/lib/vector_tile_source_example.dart diff --git a/example/lib/viewport_example.dart b/mapbox_maps_flutter_mobile/example/lib/viewport_example.dart similarity index 100% rename from example/lib/viewport_example.dart rename to mapbox_maps_flutter_mobile/example/lib/viewport_example.dart diff --git a/example/pubspec.lock b/mapbox_maps_flutter_mobile/example/pubspec.lock similarity index 96% rename from example/pubspec.lock rename to mapbox_maps_flutter_mobile/example/pubspec.lock index 26b11942b..59a2a391a 100644 --- a/example/pubspec.lock +++ b/mapbox_maps_flutter_mobile/example/pubspec.lock @@ -127,10 +127,10 @@ packages: dependency: transitive description: name: flutter_plugin_android_lifecycle - sha256: "5a1e6fb2c0561958d7e4c33574674bda7b77caaca7a33b758876956f2902eea3" + sha256: f948e346c12f8d5480d2825e03de228d0eb8c3a737e4cdaa122267b89c022b5e url: "https://pub.dev" source: hosted - version: "2.0.27" + version: "2.0.28" flutter_test: dependency: "direct dev" description: flutter @@ -214,10 +214,10 @@ packages: dependency: "direct main" description: name: http - sha256: fe7ab022b76f3034adc518fb6ea04a82387620e19977665ea18d30a1cf43442f + sha256: "2c11f3f94c687ee9bad77c171151672986360b2b001d109814ee7140b2cf261b" url: "https://pub.dev" source: hosted - version: "1.3.0" + version: "1.4.0" http_parser: dependency: transitive description: @@ -269,7 +269,14 @@ packages: path: ".." relative: true source: path - version: "2.9.0" + version: "2.8.0" + mapbox_maps_flutter_interface: + dependency: "direct overridden" + description: + path: "../../mapbox_maps_flutter_interface" + relative: true + source: path + version: "0.0.1" matcher: dependency: transitive description: @@ -314,10 +321,10 @@ packages: dependency: transitive description: name: path_provider_android - sha256: "0ca7359dad67fd7063cb2892ab0c0737b2daafd807cf1acecd62374c8fae6c12" + sha256: d0d310befe2c8ab9e7f393288ccbb11b60c019c6b5afc21973eeee4dda2b35e9 url: "https://pub.dev" source: hosted - version: "2.2.16" + version: "2.2.17" path_provider_foundation: dependency: transitive description: diff --git a/example/pubspec.yaml b/mapbox_maps_flutter_mobile/example/pubspec.yaml similarity index 95% rename from example/pubspec.yaml rename to mapbox_maps_flutter_mobile/example/pubspec.yaml index dc009f745..dbb98cfad 100644 --- a/example/pubspec.yaml +++ b/mapbox_maps_flutter_mobile/example/pubspec.yaml @@ -8,7 +8,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev environment: - sdk: ">=3.0.0 <4.0.0" + sdk: ">=3.6.0 <4.0.0" flutter: ">=3.10.0" dependencies: @@ -27,6 +27,10 @@ dependencies: http: ^1.3.0 path_provider: ^2.1.3 +dependency_overrides: + mapbox_maps_flutter_interface: + path: ../../mapbox_maps_flutter_interface + dev_dependencies: flutter_test: sdk: flutter diff --git a/example/test_driver/integration_test.dart b/mapbox_maps_flutter_mobile/example/test_driver/integration_test.dart similarity index 100% rename from example/test_driver/integration_test.dart rename to mapbox_maps_flutter_mobile/example/test_driver/integration_test.dart diff --git a/ios/.gitignore b/mapbox_maps_flutter_mobile/ios/.gitignore similarity index 100% rename from ios/.gitignore rename to mapbox_maps_flutter_mobile/ios/.gitignore diff --git a/ios/mapbox_maps_flutter.podspec b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter.podspec similarity index 100% rename from ios/mapbox_maps_flutter.podspec rename to mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter.podspec diff --git a/ios/mapbox_maps_flutter/.swiftlint.yml b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/.swiftlint.yml similarity index 100% rename from ios/mapbox_maps_flutter/.swiftlint.yml rename to mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/.swiftlint.yml diff --git a/ios/mapbox_maps_flutter/Package.resolved b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Package.resolved similarity index 100% rename from ios/mapbox_maps_flutter/Package.resolved rename to mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Package.resolved diff --git a/ios/mapbox_maps_flutter/Package.swift b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Package.swift similarity index 100% rename from ios/mapbox_maps_flutter/Package.swift rename to mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Package.swift diff --git a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/AnimationController.swift b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/AnimationController.swift similarity index 100% rename from ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/AnimationController.swift rename to mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/AnimationController.swift diff --git a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Annotations/AnnotationController.swift b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Annotations/AnnotationController.swift similarity index 100% rename from ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Annotations/AnnotationController.swift rename to mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Annotations/AnnotationController.swift diff --git a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Annotations/BaseAnnotationMessenger.swift b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Annotations/BaseAnnotationMessenger.swift similarity index 100% rename from ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Annotations/BaseAnnotationMessenger.swift rename to mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Annotations/BaseAnnotationMessenger.swift diff --git a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Annotations/CircleAnnotationController.swift b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Annotations/CircleAnnotationController.swift similarity index 100% rename from ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Annotations/CircleAnnotationController.swift rename to mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Annotations/CircleAnnotationController.swift diff --git a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Annotations/PointAnnotationController.swift b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Annotations/PointAnnotationController.swift similarity index 100% rename from ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Annotations/PointAnnotationController.swift rename to mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Annotations/PointAnnotationController.swift diff --git a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Annotations/PolygonAnnotationController.swift b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Annotations/PolygonAnnotationController.swift similarity index 100% rename from ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Annotations/PolygonAnnotationController.swift rename to mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Annotations/PolygonAnnotationController.swift diff --git a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Annotations/PolylineAnnotationController.swift b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Annotations/PolylineAnnotationController.swift similarity index 100% rename from ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Annotations/PolylineAnnotationController.swift rename to mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Annotations/PolylineAnnotationController.swift diff --git a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/AnyFlutterStreamHandler.swift b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/AnyFlutterStreamHandler.swift similarity index 100% rename from ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/AnyFlutterStreamHandler.swift rename to mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/AnyFlutterStreamHandler.swift diff --git a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/AttributionController.swift b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/AttributionController.swift similarity index 100% rename from ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/AttributionController.swift rename to mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/AttributionController.swift diff --git a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/CameraController.swift b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/CameraController.swift similarity index 100% rename from ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/CameraController.swift rename to mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/CameraController.swift diff --git a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/CompassController.swift b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/CompassController.swift similarity index 100% rename from ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/CompassController.swift rename to mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/CompassController.swift diff --git a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/CustomHttpServiceInterceptor.swift b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/CustomHttpServiceInterceptor.swift similarity index 100% rename from ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/CustomHttpServiceInterceptor.swift rename to mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/CustomHttpServiceInterceptor.swift diff --git a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/EnumsMapping.swift b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/EnumsMapping.swift similarity index 100% rename from ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/EnumsMapping.swift rename to mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/EnumsMapping.swift diff --git a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/EventHandler.swift b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/EventHandler.swift similarity index 100% rename from ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/EventHandler.swift rename to mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/EventHandler.swift diff --git a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Extensions.swift b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Extensions.swift similarity index 100% rename from ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Extensions.swift rename to mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Extensions.swift diff --git a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/CircleAnnotationMessenger.swift b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/CircleAnnotationMessenger.swift similarity index 100% rename from ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/CircleAnnotationMessenger.swift rename to mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/CircleAnnotationMessenger.swift diff --git a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/GestureListeners.swift b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/GestureListeners.swift similarity index 100% rename from ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/GestureListeners.swift rename to mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/GestureListeners.swift diff --git a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/LogBackend.swift b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/LogBackend.swift similarity index 100% rename from ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/LogBackend.swift rename to mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/LogBackend.swift diff --git a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/MapInterfaces.swift b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/MapInterfaces.swift similarity index 98% rename from ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/MapInterfaces.swift rename to mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/MapInterfaces.swift index 1ffc51221..d192ba28b 100644 --- a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/MapInterfaces.swift +++ b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/MapInterfaces.swift @@ -482,146 +482,6 @@ struct TileCoverOptions { } } -/// The distance on each side between rectangles, when one is contained into other. -/// -/// All fields' values are in `logical pixel` units. -/// -/// Generated class from Pigeon that represents data sent in messages. -struct MbxEdgeInsets { - /// Padding from the top. - var top: Double - /// Padding from the left. - var left: Double - /// Padding from the bottom. - var bottom: Double - /// Padding from the right. - var right: Double - - - // swift-format-ignore: AlwaysUseLowerCamelCase - static func fromList(_ pigeonVar_list: [Any?]) -> MbxEdgeInsets? { - let top = pigeonVar_list[0] as! Double - let left = pigeonVar_list[1] as! Double - let bottom = pigeonVar_list[2] as! Double - let right = pigeonVar_list[3] as! Double - - return MbxEdgeInsets( - top: top, - left: left, - bottom: bottom, - right: right - ) - } - func toList() -> [Any?] { - return [ - top, - left, - bottom, - right, - ] - } -} - -/// Various options for describing the viewpoint of a camera. All fields are -/// optional. -/// -/// Anchor and center points are mutually exclusive, with preference for the -/// center point when both are set. -/// -/// Generated class from Pigeon that represents data sent in messages. -struct CameraOptions { - /// Coordinate at the center of the camera. - var center: Point? = nil - /// Padding around the interior of the view that affects the frame of - /// reference for `center`. - var padding: MbxEdgeInsets? = nil - /// Point of reference for `zoom` and `angle`, assuming an origin at the - /// top-left corner of the view. - var anchor: ScreenCoordinate? = nil - /// Zero-based zoom level. Constrained to the minimum and maximum zoom - /// levels. - var zoom: Double? = nil - /// Bearing, measured in degrees from true north. Wrapped to [0, 360). - var bearing: Double? = nil - /// Pitch toward the horizon measured in degrees. - var pitch: Double? = nil - - - // swift-format-ignore: AlwaysUseLowerCamelCase - static func fromList(_ pigeonVar_list: [Any?]) -> CameraOptions? { - let center: Point? = nilOrValue(pigeonVar_list[0]) - let padding: MbxEdgeInsets? = nilOrValue(pigeonVar_list[1]) - let anchor: ScreenCoordinate? = nilOrValue(pigeonVar_list[2]) - let zoom: Double? = nilOrValue(pigeonVar_list[3]) - let bearing: Double? = nilOrValue(pigeonVar_list[4]) - let pitch: Double? = nilOrValue(pigeonVar_list[5]) - - return CameraOptions( - center: center, - padding: padding, - anchor: anchor, - zoom: zoom, - bearing: bearing, - pitch: pitch - ) - } - func toList() -> [Any?] { - return [ - center, - padding, - anchor, - zoom, - bearing, - pitch, - ] - } -} - -/// Describes the viewpoint of a camera. -/// -/// Generated class from Pigeon that represents data sent in messages. -struct CameraState { - /// Coordinate at the center of the camera. - var center: Point - /// Padding around the interior of the view that affects the frame of - /// reference for `center`. - var padding: MbxEdgeInsets - /// Zero-based zoom level. Constrained to the minimum and maximum zoom - /// levels. - var zoom: Double - /// Bearing, measured in degrees from true north. Wrapped to [0, 360). - var bearing: Double - /// Pitch toward the horizon measured in degrees. - var pitch: Double - - - // swift-format-ignore: AlwaysUseLowerCamelCase - static func fromList(_ pigeonVar_list: [Any?]) -> CameraState? { - let center = pigeonVar_list[0] as! Point - let padding = pigeonVar_list[1] as! MbxEdgeInsets - let zoom = pigeonVar_list[2] as! Double - let bearing = pigeonVar_list[3] as! Double - let pitch = pigeonVar_list[4] as! Double - - return CameraState( - center: center, - padding: padding, - zoom: zoom, - bearing: bearing, - pitch: pitch - ) - } - func toList() -> [Any?] { - return [ - center, - padding, - zoom, - bearing, - pitch, - ] - } -} - /// Holds options to be used for setting `camera bounds`. /// /// Generated class from Pigeon that represents data sent in messages. @@ -905,35 +765,6 @@ struct MapOptions { } } -/// Describes the coordinate on the screen, measured from top to bottom and from left to right. -/// Note: the `map` uses screen coordinate units measured in `logical pixels`. -/// -/// Generated class from Pigeon that represents data sent in messages. -struct ScreenCoordinate { - /// A value representing the x position of this coordinate. - var x: Double - /// A value representing the y position of this coordinate. - var y: Double - - - // swift-format-ignore: AlwaysUseLowerCamelCase - static func fromList(_ pigeonVar_list: [Any?]) -> ScreenCoordinate? { - let x = pigeonVar_list[0] as! Double - let y = pigeonVar_list[1] as! Double - - return ScreenCoordinate( - x: x, - y: y - ) - } - func toList() -> [Any?] { - return [ - x, - y, - ] - } -} - /// Describes the coordinate box on the screen, measured in `logical pixels` /// from top to bottom and from left to right. /// @@ -4965,14 +4796,14 @@ protocol StyleManager { /// @return The `transition options` of the current style in use. func getStyleTransition(completion: @escaping (Result) -> Void) /// Adds new import to current style, loaded from a JSON string. - /// + /// /// @param importId Identifier of import to update. /// @param json The JSON string to be loaded directly as the import. /// @param config A map containing the configuration options of the import. /// @param importPosition The import will be positioned according to the ImportPosition parameters. If not specified, then the import is moved to the top of the import stack. func addStyleImportFromJSON(importId: String, json: String, config: [String: Any]?, importPosition: ImportPosition?) throws /// Adds new import to current style, loaded from an URI. - /// + /// /// @param importId Identifier of import to update. /// @param uri URI of the import. /// @param config A map containing the configuration options of the import. @@ -4981,7 +4812,7 @@ protocol StyleManager { /// Updates an existing import in the style. /// The function replaces the content of the import, with the content loaded from the provided data value. /// The configuration values of the import are merged with the configuration provided in the update. - /// + /// /// @param importId Identifier of import to update. /// @param json The JSON string to be loaded directly as the import. /// @param config A map containing the configuration options of the import. @@ -4989,13 +4820,13 @@ protocol StyleManager { /// Updates an existing import in the style. /// The function replaces the content of the import, with the content loaded from the provided URI. /// The configuration values of the import are merged with the configuration provided in the update. - /// + /// /// @param importId Identifier of import to update. /// @param uri URI of the import. /// @param config A map containing the configuration options of the import. func updateStyleImportWithURI(importId: String, uri: String, config: [String: Any]?) throws /// Moves import to position before another import, specified with `beforeId`. Order of imported styles corresponds to order of their layers. - /// + /// /// @param importId Identifier of import to move. /// @param importPosition The import will be positioned according to the ImportPosition parameters. If not specified, then the import is moved to the top of the import stack. func moveStyleImport(importId: String, importPosition: ImportPosition?) throws @@ -5543,7 +5374,7 @@ class StyleManagerSetup { getStyleTransitionChannel.setMessageHandler(nil) } /// Adds new import to current style, loaded from a JSON string. - /// + /// /// @param importId Identifier of import to update. /// @param json The JSON string to be loaded directly as the import. /// @param config A map containing the configuration options of the import. @@ -5567,7 +5398,7 @@ class StyleManagerSetup { addStyleImportFromJSONChannel.setMessageHandler(nil) } /// Adds new import to current style, loaded from an URI. - /// + /// /// @param importId Identifier of import to update. /// @param uri URI of the import. /// @param config A map containing the configuration options of the import. @@ -5593,7 +5424,7 @@ class StyleManagerSetup { /// Updates an existing import in the style. /// The function replaces the content of the import, with the content loaded from the provided data value. /// The configuration values of the import are merged with the configuration provided in the update. - /// + /// /// @param importId Identifier of import to update. /// @param json The JSON string to be loaded directly as the import. /// @param config A map containing the configuration options of the import. @@ -5617,7 +5448,7 @@ class StyleManagerSetup { /// Updates an existing import in the style. /// The function replaces the content of the import, with the content loaded from the provided URI. /// The configuration values of the import are merged with the configuration provided in the update. - /// + /// /// @param importId Identifier of import to update. /// @param uri URI of the import. /// @param config A map containing the configuration options of the import. @@ -5639,7 +5470,7 @@ class StyleManagerSetup { updateStyleImportWithURIChannel.setMessageHandler(nil) } /// Moves import to position before another import, specified with `beforeId`. Order of imported styles corresponds to order of their layers. - /// + /// /// @param importId Identifier of import to move. /// @param importPosition The import will be positioned according to the ImportPosition parameters. If not specified, then the import is moved to the top of the import stack. let moveStyleImportChannel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.mapbox_maps_flutter.StyleManager.moveStyleImport\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) diff --git a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/OfflineMessenger.swift b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/OfflineMessenger.swift similarity index 100% rename from ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/OfflineMessenger.swift rename to mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/OfflineMessenger.swift diff --git a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/PerformaceStatistics.swift b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/PerformaceStatistics.swift similarity index 100% rename from ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/PerformaceStatistics.swift rename to mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/PerformaceStatistics.swift diff --git a/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/PlatformInterfaceDataTypes.swift b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/PlatformInterfaceDataTypes.swift new file mode 100644 index 000000000..8524c6b93 --- /dev/null +++ b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/PlatformInterfaceDataTypes.swift @@ -0,0 +1,209 @@ +// Autogenerated from Pigeon (v25.2.0), do not edit directly. +// See also: https://pub.dev/packages/pigeon + +import Foundation + +#if os(iOS) + import Flutter +#elseif os(macOS) + import FlutterMacOS +#else + #error("Unsupported platform.") +#endif +import struct Turf.Point + +/// Error class for passing custom error details to Dart side. +final class PlatformInterfaceDataTypesError: Error { + let code: String + let message: String? + let details: Sendable? + + init(code: String, message: String?, details: Sendable?) { + self.code = code + self.message = message + self.details = details + } + + var localizedDescription: String { + return + "PlatformInterfaceDataTypesError(code: \(code), message: \(message ?? ""), details: \(details ?? "")" + } +} + +private func isNullish(_ value: Any?) -> Bool { + return value is NSNull || value == nil +} + +private func nilOrValue(_ value: Any?) -> T? { + if value is NSNull { return nil } + return value as! T? +} + +/// Describes the coordinate on the screen, measured from top to bottom and from left to right. +/// Note: the `map` uses screen coordinate units measured in `logical pixels`. +/// +/// Generated class from Pigeon that represents data sent in messages. +struct ScreenCoordinate { + /// A value representing the x position of this coordinate. + var x: Double + /// A value representing the y position of this coordinate. + var y: Double + + + // swift-format-ignore: AlwaysUseLowerCamelCase + static func fromList(_ pigeonVar_list: [Any?]) -> ScreenCoordinate? { + let x = pigeonVar_list[0] as! Double + let y = pigeonVar_list[1] as! Double + + return ScreenCoordinate( + x: x, + y: y + ) + } + func toList() -> [Any?] { + return [ + x, + y, + ] + } +} + +/// The distance on each side between rectangles, when one is contained into other. +/// +/// All fields' values are in `logical pixel` units. +/// +/// Generated class from Pigeon that represents data sent in messages. +struct MbxEdgeInsets { + /// Padding from the top. + var top: Double + /// Padding from the left. + var left: Double + /// Padding from the bottom. + var bottom: Double + /// Padding from the right. + var right: Double + + + // swift-format-ignore: AlwaysUseLowerCamelCase + static func fromList(_ pigeonVar_list: [Any?]) -> MbxEdgeInsets? { + let top = pigeonVar_list[0] as! Double + let left = pigeonVar_list[1] as! Double + let bottom = pigeonVar_list[2] as! Double + let right = pigeonVar_list[3] as! Double + + return MbxEdgeInsets( + top: top, + left: left, + bottom: bottom, + right: right + ) + } + func toList() -> [Any?] { + return [ + top, + left, + bottom, + right, + ] + } +} + +/// Various options for describing the viewpoint of a camera. All fields are +/// optional. +/// +/// Anchor and center points are mutually exclusive, with preference for the +/// center point when both are set. +/// +/// Generated class from Pigeon that represents data sent in messages. +struct CameraOptions { + /// Coordinate at the center of the camera. + var center: Point? = nil + /// Padding around the interior of the view that affects the frame of + /// reference for `center`. + var padding: MbxEdgeInsets? = nil + /// Point of reference for `zoom` and `angle`, assuming an origin at the + /// top-left corner of the view. + var anchor: ScreenCoordinate? = nil + /// Zero-based zoom level. Constrained to the minimum and maximum zoom + /// levels. + var zoom: Double? = nil + /// Bearing, measured in degrees from true north. Wrapped to [0, 360). + var bearing: Double? = nil + /// Pitch toward the horizon measured in degrees. + var pitch: Double? = nil + + + // swift-format-ignore: AlwaysUseLowerCamelCase + static func fromList(_ pigeonVar_list: [Any?]) -> CameraOptions? { + let center: Point? = nilOrValue(pigeonVar_list[0]) + let padding: MbxEdgeInsets? = nilOrValue(pigeonVar_list[1]) + let anchor: ScreenCoordinate? = nilOrValue(pigeonVar_list[2]) + let zoom: Double? = nilOrValue(pigeonVar_list[3]) + let bearing: Double? = nilOrValue(pigeonVar_list[4]) + let pitch: Double? = nilOrValue(pigeonVar_list[5]) + + return CameraOptions( + center: center, + padding: padding, + anchor: anchor, + zoom: zoom, + bearing: bearing, + pitch: pitch + ) + } + func toList() -> [Any?] { + return [ + center, + padding, + anchor, + zoom, + bearing, + pitch, + ] + } +} + +/// Describes the viewpoint of a camera. +/// +/// Generated class from Pigeon that represents data sent in messages. +struct CameraState { + /// Coordinate at the center of the camera. + var center: Point + /// Padding around the interior of the view that affects the frame of + /// reference for `center`. + var padding: MbxEdgeInsets + /// Zero-based zoom level. Constrained to the minimum and maximum zoom + /// levels. + var zoom: Double + /// Bearing, measured in degrees from true north. Wrapped to [0, 360). + var bearing: Double + /// Pitch toward the horizon measured in degrees. + var pitch: Double + + + // swift-format-ignore: AlwaysUseLowerCamelCase + static func fromList(_ pigeonVar_list: [Any?]) -> CameraState? { + let center = pigeonVar_list[0] as! Point + let padding = pigeonVar_list[1] as! MbxEdgeInsets + let zoom = pigeonVar_list[2] as! Double + let bearing = pigeonVar_list[3] as! Double + let pitch = pigeonVar_list[4] as! Double + + return CameraState( + center: center, + padding: padding, + zoom: zoom, + bearing: bearing, + pitch: pitch + ) + } + func toList() -> [Any?] { + return [ + center, + padding, + zoom, + bearing, + pitch, + ] + } +} diff --git a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/PointAnnotationMessenger.swift b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/PointAnnotationMessenger.swift similarity index 100% rename from ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/PointAnnotationMessenger.swift rename to mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/PointAnnotationMessenger.swift diff --git a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/PolygonAnnotationMessenger.swift b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/PolygonAnnotationMessenger.swift similarity index 100% rename from ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/PolygonAnnotationMessenger.swift rename to mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/PolygonAnnotationMessenger.swift diff --git a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/PolylineAnnotationMessenger.swift b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/PolylineAnnotationMessenger.swift similarity index 100% rename from ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/PolylineAnnotationMessenger.swift rename to mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/PolylineAnnotationMessenger.swift diff --git a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/Settings.swift b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/Settings.swift similarity index 100% rename from ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/Settings.swift rename to mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/Settings.swift diff --git a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/SnapshotterMessenger.swift b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/SnapshotterMessenger.swift similarity index 100% rename from ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/SnapshotterMessenger.swift rename to mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/SnapshotterMessenger.swift diff --git a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/ViewportInternal.swift b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/ViewportInternal.swift similarity index 100% rename from ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/ViewportInternal.swift rename to mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Generated/ViewportInternal.swift diff --git a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/GesturesController.swift b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/GesturesController.swift similarity index 100% rename from ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/GesturesController.swift rename to mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/GesturesController.swift diff --git a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/InteractionsController.swift b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/InteractionsController.swift similarity index 100% rename from ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/InteractionsController.swift rename to mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/InteractionsController.swift diff --git a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/LocationController.swift b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/LocationController.swift similarity index 100% rename from ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/LocationController.swift rename to mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/LocationController.swift diff --git a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/LoggingController.swift b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/LoggingController.swift similarity index 100% rename from ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/LoggingController.swift rename to mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/LoggingController.swift diff --git a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/LogoController.swift b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/LogoController.swift similarity index 100% rename from ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/LogoController.swift rename to mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/LogoController.swift diff --git a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/MapEvents+JSON.swift b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/MapEvents+JSON.swift similarity index 100% rename from ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/MapEvents+JSON.swift rename to mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/MapEvents+JSON.swift diff --git a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/MapInterfaceController.swift b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/MapInterfaceController.swift similarity index 100% rename from ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/MapInterfaceController.swift rename to mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/MapInterfaceController.swift diff --git a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/MapProjectionController.swift b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/MapProjectionController.swift similarity index 100% rename from ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/MapProjectionController.swift rename to mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/MapProjectionController.swift diff --git a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/MapboxMapController.swift b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/MapboxMapController.swift similarity index 100% rename from ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/MapboxMapController.swift rename to mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/MapboxMapController.swift diff --git a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/MapboxMapFactory.swift b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/MapboxMapFactory.swift similarity index 100% rename from ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/MapboxMapFactory.swift rename to mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/MapboxMapFactory.swift diff --git a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/MapboxMapsPlugin.swift b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/MapboxMapsPlugin.swift similarity index 100% rename from ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/MapboxMapsPlugin.swift rename to mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/MapboxMapsPlugin.swift diff --git a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/MapboxOptionsController.swift b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/MapboxOptionsController.swift similarity index 100% rename from ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/MapboxOptionsController.swift rename to mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/MapboxOptionsController.swift diff --git a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Offline/OfflineController.swift b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Offline/OfflineController.swift similarity index 100% rename from ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Offline/OfflineController.swift rename to mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Offline/OfflineController.swift diff --git a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Offline/OfflineMapInstanceManager.swift b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Offline/OfflineMapInstanceManager.swift similarity index 100% rename from ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Offline/OfflineMapInstanceManager.swift rename to mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Offline/OfflineMapInstanceManager.swift diff --git a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Offline/TileStoreController.swift b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Offline/TileStoreController.swift similarity index 100% rename from ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Offline/TileStoreController.swift rename to mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Offline/TileStoreController.swift diff --git a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/PerformanceStatisticsController.swift b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/PerformanceStatisticsController.swift similarity index 100% rename from ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/PerformanceStatisticsController.swift rename to mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/PerformanceStatisticsController.swift diff --git a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/ScalebarController.swift b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/ScalebarController.swift similarity index 100% rename from ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/ScalebarController.swift rename to mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/ScalebarController.swift diff --git a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Snapshotter/SnapshotterController.swift b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Snapshotter/SnapshotterController.swift similarity index 100% rename from ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Snapshotter/SnapshotterController.swift rename to mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Snapshotter/SnapshotterController.swift diff --git a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Snapshotter/SnapshotterInstanceManager.swift b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Snapshotter/SnapshotterInstanceManager.swift similarity index 100% rename from ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Snapshotter/SnapshotterInstanceManager.swift rename to mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Snapshotter/SnapshotterInstanceManager.swift diff --git a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/StyleController.swift b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/StyleController.swift similarity index 100% rename from ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/StyleController.swift rename to mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/StyleController.swift diff --git a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/StyleLights.swift b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/StyleLights.swift similarity index 100% rename from ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/StyleLights.swift rename to mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/StyleLights.swift diff --git a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/TurfAdapters.swift b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/TurfAdapters.swift similarity index 100% rename from ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/TurfAdapters.swift rename to mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/TurfAdapters.swift diff --git a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Viewport/States.swift b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Viewport/States.swift similarity index 100% rename from ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Viewport/States.swift rename to mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Viewport/States.swift diff --git a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Viewport/Transitions.swift b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Viewport/Transitions.swift similarity index 100% rename from ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Viewport/Transitions.swift rename to mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Viewport/Transitions.swift diff --git a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Viewport/ViewportController.swift b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Viewport/ViewportController.swift similarity index 100% rename from ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Viewport/ViewportController.swift rename to mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/Viewport/ViewportController.swift diff --git a/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/mapbox_maps_flutter.h b/mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/mapbox_maps_flutter.h similarity index 100% rename from ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/mapbox_maps_flutter.h rename to mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter/Sources/mapbox_maps_flutter/Classes/mapbox_maps_flutter.h diff --git a/lib/mapbox_maps_flutter.dart b/mapbox_maps_flutter_mobile/lib/mapbox_maps_flutter.dart similarity index 94% rename from lib/mapbox_maps_flutter.dart rename to mapbox_maps_flutter_mobile/lib/mapbox_maps_flutter.dart index c9b4be0a4..36902925f 100644 --- a/lib/mapbox_maps_flutter.dart +++ b/mapbox_maps_flutter_mobile/lib/mapbox_maps_flutter.dart @@ -9,10 +9,10 @@ import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter/services.dart'; +import 'package:mapbox_maps_flutter_interface/mapbox_maps_flutter_interface.dart'; import 'package:meta/meta.dart'; -import 'package:turf/turf.dart' as turf; -export 'package:turf/helpers.dart'; +export 'package:mapbox_maps_flutter_interface/mapbox_maps_flutter_interface.dart'; part 'src/annotation/circle_annotation_manager.dart'; part 'src/annotation/point_annotation_manager.dart'; @@ -65,7 +65,6 @@ part 'src/style/interactive_features/standard_poi.dart'; part 'src/location_settings.dart'; part 'src/snapshotter/snapshotter.dart'; part 'src/log_configuration.dart'; -part 'src/turf_adapters.dart'; part 'src/extensions.dart'; part 'src/map_events.dart'; part 'src/offline/offline_messenger.dart'; @@ -88,4 +87,5 @@ part 'src/viewport/transitions/easing_viewport_transition.dart'; part 'src/package_info.dart'; part 'src/http/http_service.dart'; part 'src/cancelable.dart'; +part 'src/mapbox_maps_flutter_mobile.dart'; part 'src/deprecated.dart'; diff --git a/lib/src/annotation/annotation_manager.dart b/mapbox_maps_flutter_mobile/lib/src/annotation/annotation_manager.dart similarity index 100% rename from lib/src/annotation/annotation_manager.dart rename to mapbox_maps_flutter_mobile/lib/src/annotation/annotation_manager.dart diff --git a/lib/src/annotation/circle_annotation_manager.dart b/mapbox_maps_flutter_mobile/lib/src/annotation/circle_annotation_manager.dart similarity index 100% rename from lib/src/annotation/circle_annotation_manager.dart rename to mapbox_maps_flutter_mobile/lib/src/annotation/circle_annotation_manager.dart diff --git a/lib/src/annotation/point_annotation_manager.dart b/mapbox_maps_flutter_mobile/lib/src/annotation/point_annotation_manager.dart similarity index 100% rename from lib/src/annotation/point_annotation_manager.dart rename to mapbox_maps_flutter_mobile/lib/src/annotation/point_annotation_manager.dart diff --git a/lib/src/annotation/polygon_annotation_manager.dart b/mapbox_maps_flutter_mobile/lib/src/annotation/polygon_annotation_manager.dart similarity index 100% rename from lib/src/annotation/polygon_annotation_manager.dart rename to mapbox_maps_flutter_mobile/lib/src/annotation/polygon_annotation_manager.dart diff --git a/lib/src/annotation/polyline_annotation_manager.dart b/mapbox_maps_flutter_mobile/lib/src/annotation/polyline_annotation_manager.dart similarity index 100% rename from lib/src/annotation/polyline_annotation_manager.dart rename to mapbox_maps_flutter_mobile/lib/src/annotation/polyline_annotation_manager.dart diff --git a/lib/src/callbacks.dart b/mapbox_maps_flutter_mobile/lib/src/callbacks.dart similarity index 98% rename from lib/src/callbacks.dart rename to mapbox_maps_flutter_mobile/lib/src/callbacks.dart index 980f8e9d1..7337dbcc8 100644 --- a/lib/src/callbacks.dart +++ b/mapbox_maps_flutter_mobile/lib/src/callbacks.dart @@ -1,7 +1,7 @@ part of mapbox_maps_flutter; /// Definition for listener invoked when the map is created. -typedef void MapCreatedCallback(MapboxMap controller); +typedef MapCreatedCallback = void Function(MapboxMap controller); /// Definition for listener invoked when the style is fully loaded. typedef void OnStyleLoadedListener(StyleLoadedEventData styleLoadedEventData); diff --git a/lib/src/cancelable.dart b/mapbox_maps_flutter_mobile/lib/src/cancelable.dart similarity index 100% rename from lib/src/cancelable.dart rename to mapbox_maps_flutter_mobile/lib/src/cancelable.dart diff --git a/lib/src/deprecated.dart b/mapbox_maps_flutter_mobile/lib/src/deprecated.dart similarity index 100% rename from lib/src/deprecated.dart rename to mapbox_maps_flutter_mobile/lib/src/deprecated.dart diff --git a/lib/src/events.dart b/mapbox_maps_flutter_mobile/lib/src/events.dart similarity index 100% rename from lib/src/events.dart rename to mapbox_maps_flutter_mobile/lib/src/events.dart diff --git a/lib/src/extensions.dart b/mapbox_maps_flutter_mobile/lib/src/extensions.dart similarity index 100% rename from lib/src/extensions.dart rename to mapbox_maps_flutter_mobile/lib/src/extensions.dart diff --git a/lib/src/http/http_service.dart b/mapbox_maps_flutter_mobile/lib/src/http/http_service.dart similarity index 100% rename from lib/src/http/http_service.dart rename to mapbox_maps_flutter_mobile/lib/src/http/http_service.dart diff --git a/lib/src/location_settings.dart b/mapbox_maps_flutter_mobile/lib/src/location_settings.dart similarity index 100% rename from lib/src/location_settings.dart rename to mapbox_maps_flutter_mobile/lib/src/location_settings.dart diff --git a/lib/src/log_configuration.dart b/mapbox_maps_flutter_mobile/lib/src/log_configuration.dart similarity index 100% rename from lib/src/log_configuration.dart rename to mapbox_maps_flutter_mobile/lib/src/log_configuration.dart diff --git a/lib/src/map_events.dart b/mapbox_maps_flutter_mobile/lib/src/map_events.dart similarity index 100% rename from lib/src/map_events.dart rename to mapbox_maps_flutter_mobile/lib/src/map_events.dart diff --git a/lib/src/map_widget.dart b/mapbox_maps_flutter_mobile/lib/src/map_widget.dart similarity index 100% rename from lib/src/map_widget.dart rename to mapbox_maps_flutter_mobile/lib/src/map_widget.dart diff --git a/lib/src/mapbox_map.dart b/mapbox_maps_flutter_mobile/lib/src/mapbox_map.dart similarity index 99% rename from lib/src/mapbox_map.dart rename to mapbox_maps_flutter_mobile/lib/src/mapbox_map.dart index 1ca57a7dd..cb6f2993d 100644 --- a/lib/src/mapbox_map.dart +++ b/mapbox_maps_flutter_mobile/lib/src/mapbox_map.dart @@ -136,7 +136,7 @@ extension on _MapWidgetDebugOptions { } /// Controller for a single MapboxMap instance running on the host platform. -class MapboxMap extends ChangeNotifier { +final class MapboxMap extends MapboxMapInterface with ChangeNotifier { MapboxMap._({ required _MapboxMapsPlatform mapboxMapsPlatform, this.onMapTapListener, @@ -344,10 +344,14 @@ class MapboxMap extends ChangeNotifier { /// The map will retain its current values for any details not passed via the camera options argument. /// It is not guaranteed that the provided `camera options` will be set, the map may apply constraints resulting in a /// different `camera state`. + @override Future setCamera(CameraOptions cameraOptions) => - _cameraManager.setCamera(cameraOptions); + _cameraManager.setCamera( + cameraOptions, + ); /// Returns the current `camera state`. + @override Future getCameraState() => _cameraManager.getCameraState(); /// Sets the `camera bounds options` of the map. The map will retain its current values for any diff --git a/mapbox_maps_flutter_mobile/lib/src/mapbox_maps_flutter_mobile.dart b/mapbox_maps_flutter_mobile/lib/src/mapbox_maps_flutter_mobile.dart new file mode 100644 index 000000000..59ef402a7 --- /dev/null +++ b/mapbox_maps_flutter_mobile/lib/src/mapbox_maps_flutter_mobile.dart @@ -0,0 +1,33 @@ +part of 'package:mapbox_maps_flutter/mapbox_maps_flutter.dart'; + +base class MapboxMapsFlutterMobile extends MapboxMapsFlutterPlatform { + @override + Widget buildView({ + CameraOptions? cameraOptions, + OnMapCreated? onMapCreated, + }) { + return MapWidget( + cameraOptions: cameraOptions, + onMapCreated: (MapboxMap mapboxMap) { + if (onMapCreated != null) { + onMapCreated(mapboxMap); + } + }, + ); + } + + @override + Future getAccessToken() { + return MapboxOptions.getAccessToken(); + } + + @override + void setAccessToken(String token) { + MapboxOptions.setAccessToken(token); + } + + /// Registers the platform implementation. + static void registerWith() { + MapboxMapsFlutterPlatform.instance = MapboxMapsFlutterMobile(); + } +} diff --git a/lib/src/mapbox_maps_options.dart b/mapbox_maps_flutter_mobile/lib/src/mapbox_maps_options.dart similarity index 100% rename from lib/src/mapbox_maps_options.dart rename to mapbox_maps_flutter_mobile/lib/src/mapbox_maps_options.dart diff --git a/lib/src/mapbox_maps_platform.dart b/mapbox_maps_flutter_mobile/lib/src/mapbox_maps_platform.dart similarity index 100% rename from lib/src/mapbox_maps_platform.dart rename to mapbox_maps_flutter_mobile/lib/src/mapbox_maps_platform.dart diff --git a/lib/src/offline/offline_manager.dart b/mapbox_maps_flutter_mobile/lib/src/offline/offline_manager.dart similarity index 100% rename from lib/src/offline/offline_manager.dart rename to mapbox_maps_flutter_mobile/lib/src/offline/offline_manager.dart diff --git a/lib/src/offline/offline_messenger.dart b/mapbox_maps_flutter_mobile/lib/src/offline/offline_messenger.dart similarity index 100% rename from lib/src/offline/offline_messenger.dart rename to mapbox_maps_flutter_mobile/lib/src/offline/offline_messenger.dart diff --git a/lib/src/offline/offline_switch.dart b/mapbox_maps_flutter_mobile/lib/src/offline/offline_switch.dart similarity index 100% rename from lib/src/offline/offline_switch.dart rename to mapbox_maps_flutter_mobile/lib/src/offline/offline_switch.dart diff --git a/lib/src/offline/tile_store.dart b/mapbox_maps_flutter_mobile/lib/src/offline/tile_store.dart similarity index 100% rename from lib/src/offline/tile_store.dart rename to mapbox_maps_flutter_mobile/lib/src/offline/tile_store.dart diff --git a/lib/src/package_info.dart b/mapbox_maps_flutter_mobile/lib/src/package_info.dart similarity index 100% rename from lib/src/package_info.dart rename to mapbox_maps_flutter_mobile/lib/src/package_info.dart diff --git a/lib/src/pigeons/circle_annotation_messenger.dart b/mapbox_maps_flutter_mobile/lib/src/pigeons/circle_annotation_messenger.dart similarity index 100% rename from lib/src/pigeons/circle_annotation_messenger.dart rename to mapbox_maps_flutter_mobile/lib/src/pigeons/circle_annotation_messenger.dart diff --git a/lib/src/pigeons/gesture_listeners.dart b/mapbox_maps_flutter_mobile/lib/src/pigeons/gesture_listeners.dart similarity index 100% rename from lib/src/pigeons/gesture_listeners.dart rename to mapbox_maps_flutter_mobile/lib/src/pigeons/gesture_listeners.dart diff --git a/lib/src/pigeons/log_backend.dart b/mapbox_maps_flutter_mobile/lib/src/pigeons/log_backend.dart similarity index 100% rename from lib/src/pigeons/log_backend.dart rename to mapbox_maps_flutter_mobile/lib/src/pigeons/log_backend.dart diff --git a/lib/src/pigeons/map_interfaces.dart b/mapbox_maps_flutter_mobile/lib/src/pigeons/map_interfaces.dart similarity index 98% rename from lib/src/pigeons/map_interfaces.dart rename to mapbox_maps_flutter_mobile/lib/src/pigeons/map_interfaces.dart index 8ae8b74c2..08c0919ce 100644 --- a/lib/src/pigeons/map_interfaces.dart +++ b/mapbox_maps_flutter_mobile/lib/src/pigeons/map_interfaces.dart @@ -561,230 +561,6 @@ class TileCoverOptions { int get hashCode => Object.hashAll(_toList()); } -/// The distance on each side between rectangles, when one is contained into other. -/// -/// All fields' values are in `logical pixel` units. -class MbxEdgeInsets { - MbxEdgeInsets({ - required this.top, - required this.left, - required this.bottom, - required this.right, - }); - - /// Padding from the top. - double top; - - /// Padding from the left. - double left; - - /// Padding from the bottom. - double bottom; - - /// Padding from the right. - double right; - - List _toList() { - return [ - top, - left, - bottom, - right, - ]; - } - - Object encode() { - return _toList(); - } - - static MbxEdgeInsets decode(Object result) { - result as List; - return MbxEdgeInsets( - top: result[0]! as double, - left: result[1]! as double, - bottom: result[2]! as double, - right: result[3]! as double, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! MbxEdgeInsets || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return top == other.top && - left == other.left && - bottom == other.bottom && - right == other.right; - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); -} - -/// Various options for describing the viewpoint of a camera. All fields are -/// optional. -/// -/// Anchor and center points are mutually exclusive, with preference for the -/// center point when both are set. -class CameraOptions { - CameraOptions({ - this.center, - this.padding, - this.anchor, - this.zoom, - this.bearing, - this.pitch, - }); - - /// Coordinate at the center of the camera. - Point? center; - - /// Padding around the interior of the view that affects the frame of - /// reference for `center`. - MbxEdgeInsets? padding; - - /// Point of reference for `zoom` and `angle`, assuming an origin at the - /// top-left corner of the view. - ScreenCoordinate? anchor; - - /// Zero-based zoom level. Constrained to the minimum and maximum zoom - /// levels. - double? zoom; - - /// Bearing, measured in degrees from true north. Wrapped to [0, 360). - double? bearing; - - /// Pitch toward the horizon measured in degrees. - double? pitch; - - List _toList() { - return [ - center, - padding, - anchor, - zoom, - bearing, - pitch, - ]; - } - - Object encode() { - return _toList(); - } - - static CameraOptions decode(Object result) { - result as List; - return CameraOptions( - center: result[0] as Point?, - padding: result[1] as MbxEdgeInsets?, - anchor: result[2] as ScreenCoordinate?, - zoom: result[3] as double?, - bearing: result[4] as double?, - pitch: result[5] as double?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! CameraOptions || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return center == other.center && - padding == other.padding && - anchor == other.anchor && - zoom == other.zoom && - bearing == other.bearing && - pitch == other.pitch; - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); -} - -/// Describes the viewpoint of a camera. -class CameraState { - CameraState({ - required this.center, - required this.padding, - required this.zoom, - required this.bearing, - required this.pitch, - }); - - /// Coordinate at the center of the camera. - Point center; - - /// Padding around the interior of the view that affects the frame of - /// reference for `center`. - MbxEdgeInsets padding; - - /// Zero-based zoom level. Constrained to the minimum and maximum zoom - /// levels. - double zoom; - - /// Bearing, measured in degrees from true north. Wrapped to [0, 360). - double bearing; - - /// Pitch toward the horizon measured in degrees. - double pitch; - - List _toList() { - return [ - center, - padding, - zoom, - bearing, - pitch, - ]; - } - - Object encode() { - return _toList(); - } - - static CameraState decode(Object result) { - result as List; - return CameraState( - center: result[0]! as Point, - padding: result[1]! as MbxEdgeInsets, - zoom: result[2]! as double, - bearing: result[3]! as double, - pitch: result[4]! as double, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! CameraState || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return center == other.center && - padding == other.padding && - zoom == other.zoom && - bearing == other.bearing && - pitch == other.pitch; - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); -} - /// Holds options to be used for setting `camera bounds`. class CameraBoundsOptions { CameraBoundsOptions({ @@ -1266,56 +1042,6 @@ class MapOptions { int get hashCode => Object.hashAll(_toList()); } -/// Describes the coordinate on the screen, measured from top to bottom and from left to right. -/// Note: the `map` uses screen coordinate units measured in `logical pixels`. -class ScreenCoordinate { - ScreenCoordinate({ - required this.x, - required this.y, - }); - - /// A value representing the x position of this coordinate. - double x; - - /// A value representing the y position of this coordinate. - double y; - - List _toList() { - return [ - x, - y, - ]; - } - - Object encode() { - return _toList(); - } - - static ScreenCoordinate decode(Object result) { - result as List; - return ScreenCoordinate( - x: result[0]! as double, - y: result[1]! as double, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! ScreenCoordinate || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return x == other.x && y == other.y; - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); -} - /// Describes the coordinate box on the screen, measured in `logical pixels` /// from top to bottom and from left to right. class ScreenBox { diff --git a/lib/src/pigeons/performace_statistics.dart b/mapbox_maps_flutter_mobile/lib/src/pigeons/performace_statistics.dart similarity index 100% rename from lib/src/pigeons/performace_statistics.dart rename to mapbox_maps_flutter_mobile/lib/src/pigeons/performace_statistics.dart diff --git a/lib/src/pigeons/point_annotation_messenger.dart b/mapbox_maps_flutter_mobile/lib/src/pigeons/point_annotation_messenger.dart similarity index 100% rename from lib/src/pigeons/point_annotation_messenger.dart rename to mapbox_maps_flutter_mobile/lib/src/pigeons/point_annotation_messenger.dart diff --git a/lib/src/pigeons/polygon_annotation_messenger.dart b/mapbox_maps_flutter_mobile/lib/src/pigeons/polygon_annotation_messenger.dart similarity index 100% rename from lib/src/pigeons/polygon_annotation_messenger.dart rename to mapbox_maps_flutter_mobile/lib/src/pigeons/polygon_annotation_messenger.dart diff --git a/lib/src/pigeons/polyline_annotation_messenger.dart b/mapbox_maps_flutter_mobile/lib/src/pigeons/polyline_annotation_messenger.dart similarity index 100% rename from lib/src/pigeons/polyline_annotation_messenger.dart rename to mapbox_maps_flutter_mobile/lib/src/pigeons/polyline_annotation_messenger.dart diff --git a/lib/src/pigeons/settings.dart b/mapbox_maps_flutter_mobile/lib/src/pigeons/settings.dart similarity index 100% rename from lib/src/pigeons/settings.dart rename to mapbox_maps_flutter_mobile/lib/src/pigeons/settings.dart diff --git a/lib/src/snapshotter/snapshotter.dart b/mapbox_maps_flutter_mobile/lib/src/snapshotter/snapshotter.dart similarity index 100% rename from lib/src/snapshotter/snapshotter.dart rename to mapbox_maps_flutter_mobile/lib/src/snapshotter/snapshotter.dart diff --git a/lib/src/snapshotter/snapshotter_messenger.dart b/mapbox_maps_flutter_mobile/lib/src/snapshotter/snapshotter_messenger.dart similarity index 100% rename from lib/src/snapshotter/snapshotter_messenger.dart rename to mapbox_maps_flutter_mobile/lib/src/snapshotter/snapshotter_messenger.dart diff --git a/lib/src/style/interactive_features/interactive_features.dart b/mapbox_maps_flutter_mobile/lib/src/style/interactive_features/interactive_features.dart similarity index 100% rename from lib/src/style/interactive_features/interactive_features.dart rename to mapbox_maps_flutter_mobile/lib/src/style/interactive_features/interactive_features.dart diff --git a/lib/src/style/interactive_features/standard_buildings.dart b/mapbox_maps_flutter_mobile/lib/src/style/interactive_features/standard_buildings.dart similarity index 100% rename from lib/src/style/interactive_features/standard_buildings.dart rename to mapbox_maps_flutter_mobile/lib/src/style/interactive_features/standard_buildings.dart diff --git a/lib/src/style/interactive_features/standard_place_labels.dart b/mapbox_maps_flutter_mobile/lib/src/style/interactive_features/standard_place_labels.dart similarity index 100% rename from lib/src/style/interactive_features/standard_place_labels.dart rename to mapbox_maps_flutter_mobile/lib/src/style/interactive_features/standard_place_labels.dart diff --git a/lib/src/style/interactive_features/standard_poi.dart b/mapbox_maps_flutter_mobile/lib/src/style/interactive_features/standard_poi.dart similarity index 100% rename from lib/src/style/interactive_features/standard_poi.dart rename to mapbox_maps_flutter_mobile/lib/src/style/interactive_features/standard_poi.dart diff --git a/lib/src/style/layer/background_layer.dart b/mapbox_maps_flutter_mobile/lib/src/style/layer/background_layer.dart similarity index 100% rename from lib/src/style/layer/background_layer.dart rename to mapbox_maps_flutter_mobile/lib/src/style/layer/background_layer.dart diff --git a/lib/src/style/layer/circle_layer.dart b/mapbox_maps_flutter_mobile/lib/src/style/layer/circle_layer.dart similarity index 100% rename from lib/src/style/layer/circle_layer.dart rename to mapbox_maps_flutter_mobile/lib/src/style/layer/circle_layer.dart diff --git a/lib/src/style/layer/clip_layer.dart b/mapbox_maps_flutter_mobile/lib/src/style/layer/clip_layer.dart similarity index 100% rename from lib/src/style/layer/clip_layer.dart rename to mapbox_maps_flutter_mobile/lib/src/style/layer/clip_layer.dart diff --git a/lib/src/style/layer/fill_extrusion_layer.dart b/mapbox_maps_flutter_mobile/lib/src/style/layer/fill_extrusion_layer.dart similarity index 100% rename from lib/src/style/layer/fill_extrusion_layer.dart rename to mapbox_maps_flutter_mobile/lib/src/style/layer/fill_extrusion_layer.dart diff --git a/lib/src/style/layer/fill_layer.dart b/mapbox_maps_flutter_mobile/lib/src/style/layer/fill_layer.dart similarity index 100% rename from lib/src/style/layer/fill_layer.dart rename to mapbox_maps_flutter_mobile/lib/src/style/layer/fill_layer.dart diff --git a/lib/src/style/layer/heatmap_layer.dart b/mapbox_maps_flutter_mobile/lib/src/style/layer/heatmap_layer.dart similarity index 100% rename from lib/src/style/layer/heatmap_layer.dart rename to mapbox_maps_flutter_mobile/lib/src/style/layer/heatmap_layer.dart diff --git a/lib/src/style/layer/hillshade_layer.dart b/mapbox_maps_flutter_mobile/lib/src/style/layer/hillshade_layer.dart similarity index 100% rename from lib/src/style/layer/hillshade_layer.dart rename to mapbox_maps_flutter_mobile/lib/src/style/layer/hillshade_layer.dart diff --git a/lib/src/style/layer/line_layer.dart b/mapbox_maps_flutter_mobile/lib/src/style/layer/line_layer.dart similarity index 100% rename from lib/src/style/layer/line_layer.dart rename to mapbox_maps_flutter_mobile/lib/src/style/layer/line_layer.dart diff --git a/lib/src/style/layer/location_indicator_layer.dart b/mapbox_maps_flutter_mobile/lib/src/style/layer/location_indicator_layer.dart similarity index 100% rename from lib/src/style/layer/location_indicator_layer.dart rename to mapbox_maps_flutter_mobile/lib/src/style/layer/location_indicator_layer.dart diff --git a/lib/src/style/layer/model_layer.dart b/mapbox_maps_flutter_mobile/lib/src/style/layer/model_layer.dart similarity index 100% rename from lib/src/style/layer/model_layer.dart rename to mapbox_maps_flutter_mobile/lib/src/style/layer/model_layer.dart diff --git a/lib/src/style/layer/raster_layer.dart b/mapbox_maps_flutter_mobile/lib/src/style/layer/raster_layer.dart similarity index 100% rename from lib/src/style/layer/raster_layer.dart rename to mapbox_maps_flutter_mobile/lib/src/style/layer/raster_layer.dart diff --git a/lib/src/style/layer/raster_particle_layer.dart b/mapbox_maps_flutter_mobile/lib/src/style/layer/raster_particle_layer.dart similarity index 100% rename from lib/src/style/layer/raster_particle_layer.dart rename to mapbox_maps_flutter_mobile/lib/src/style/layer/raster_particle_layer.dart diff --git a/lib/src/style/layer/sky_layer.dart b/mapbox_maps_flutter_mobile/lib/src/style/layer/sky_layer.dart similarity index 100% rename from lib/src/style/layer/sky_layer.dart rename to mapbox_maps_flutter_mobile/lib/src/style/layer/sky_layer.dart diff --git a/lib/src/style/layer/slot_layer.dart b/mapbox_maps_flutter_mobile/lib/src/style/layer/slot_layer.dart similarity index 100% rename from lib/src/style/layer/slot_layer.dart rename to mapbox_maps_flutter_mobile/lib/src/style/layer/slot_layer.dart diff --git a/lib/src/style/layer/symbol_layer.dart b/mapbox_maps_flutter_mobile/lib/src/style/layer/symbol_layer.dart similarity index 100% rename from lib/src/style/layer/symbol_layer.dart rename to mapbox_maps_flutter_mobile/lib/src/style/layer/symbol_layer.dart diff --git a/lib/src/style/mapbox_styles.dart b/mapbox_maps_flutter_mobile/lib/src/style/mapbox_styles.dart similarity index 100% rename from lib/src/style/mapbox_styles.dart rename to mapbox_maps_flutter_mobile/lib/src/style/mapbox_styles.dart diff --git a/lib/src/style/source/geojson_source.dart b/mapbox_maps_flutter_mobile/lib/src/style/source/geojson_source.dart similarity index 100% rename from lib/src/style/source/geojson_source.dart rename to mapbox_maps_flutter_mobile/lib/src/style/source/geojson_source.dart diff --git a/lib/src/style/source/image_source.dart b/mapbox_maps_flutter_mobile/lib/src/style/source/image_source.dart similarity index 100% rename from lib/src/style/source/image_source.dart rename to mapbox_maps_flutter_mobile/lib/src/style/source/image_source.dart diff --git a/lib/src/style/source/raster_source.dart b/mapbox_maps_flutter_mobile/lib/src/style/source/raster_source.dart similarity index 100% rename from lib/src/style/source/raster_source.dart rename to mapbox_maps_flutter_mobile/lib/src/style/source/raster_source.dart diff --git a/lib/src/style/source/rasterarray_source.dart b/mapbox_maps_flutter_mobile/lib/src/style/source/rasterarray_source.dart similarity index 100% rename from lib/src/style/source/rasterarray_source.dart rename to mapbox_maps_flutter_mobile/lib/src/style/source/rasterarray_source.dart diff --git a/lib/src/style/source/rasterdem_source.dart b/mapbox_maps_flutter_mobile/lib/src/style/source/rasterdem_source.dart similarity index 100% rename from lib/src/style/source/rasterdem_source.dart rename to mapbox_maps_flutter_mobile/lib/src/style/source/rasterdem_source.dart diff --git a/lib/src/style/source/vector_source.dart b/mapbox_maps_flutter_mobile/lib/src/style/source/vector_source.dart similarity index 100% rename from lib/src/style/source/vector_source.dart rename to mapbox_maps_flutter_mobile/lib/src/style/source/vector_source.dart diff --git a/lib/src/style/style.dart b/mapbox_maps_flutter_mobile/lib/src/style/style.dart similarity index 100% rename from lib/src/style/style.dart rename to mapbox_maps_flutter_mobile/lib/src/style/style.dart diff --git a/lib/src/utils.dart b/mapbox_maps_flutter_mobile/lib/src/utils.dart similarity index 100% rename from lib/src/utils.dart rename to mapbox_maps_flutter_mobile/lib/src/utils.dart diff --git a/lib/src/viewport/state_viewport_extension.dart b/mapbox_maps_flutter_mobile/lib/src/viewport/state_viewport_extension.dart similarity index 100% rename from lib/src/viewport/state_viewport_extension.dart rename to mapbox_maps_flutter_mobile/lib/src/viewport/state_viewport_extension.dart diff --git a/lib/src/viewport/states/camera_viewport_state.dart b/mapbox_maps_flutter_mobile/lib/src/viewport/states/camera_viewport_state.dart similarity index 100% rename from lib/src/viewport/states/camera_viewport_state.dart rename to mapbox_maps_flutter_mobile/lib/src/viewport/states/camera_viewport_state.dart diff --git a/lib/src/viewport/states/follow_puck_viewport_state.dart b/mapbox_maps_flutter_mobile/lib/src/viewport/states/follow_puck_viewport_state.dart similarity index 100% rename from lib/src/viewport/states/follow_puck_viewport_state.dart rename to mapbox_maps_flutter_mobile/lib/src/viewport/states/follow_puck_viewport_state.dart diff --git a/lib/src/viewport/states/idle_viewport_state.dart b/mapbox_maps_flutter_mobile/lib/src/viewport/states/idle_viewport_state.dart similarity index 100% rename from lib/src/viewport/states/idle_viewport_state.dart rename to mapbox_maps_flutter_mobile/lib/src/viewport/states/idle_viewport_state.dart diff --git a/lib/src/viewport/states/overview_viewport_state.dart b/mapbox_maps_flutter_mobile/lib/src/viewport/states/overview_viewport_state.dart similarity index 98% rename from lib/src/viewport/states/overview_viewport_state.dart rename to mapbox_maps_flutter_mobile/lib/src/viewport/states/overview_viewport_state.dart index a1cdc37ca..0c7789583 100644 --- a/lib/src/viewport/states/overview_viewport_state.dart +++ b/mapbox_maps_flutter_mobile/lib/src/viewport/states/overview_viewport_state.dart @@ -21,7 +21,7 @@ part of mapbox_maps_flutter; /// ``` final class OverviewViewportState extends ViewportState { /// The geometry to display in the overview. - final turf.GeometryObject geometry; + final GeometryObject geometry; /// Extra padding to add around the [geometry]. /// diff --git a/lib/src/viewport/states/style_default_viewport_state.dart b/mapbox_maps_flutter_mobile/lib/src/viewport/states/style_default_viewport_state.dart similarity index 100% rename from lib/src/viewport/states/style_default_viewport_state.dart rename to mapbox_maps_flutter_mobile/lib/src/viewport/states/style_default_viewport_state.dart diff --git a/lib/src/viewport/states/viewport_state.dart b/mapbox_maps_flutter_mobile/lib/src/viewport/states/viewport_state.dart similarity index 100% rename from lib/src/viewport/states/viewport_state.dart rename to mapbox_maps_flutter_mobile/lib/src/viewport/states/viewport_state.dart diff --git a/lib/src/viewport/transitions/default_viewport_transition.dart b/mapbox_maps_flutter_mobile/lib/src/viewport/transitions/default_viewport_transition.dart similarity index 100% rename from lib/src/viewport/transitions/default_viewport_transition.dart rename to mapbox_maps_flutter_mobile/lib/src/viewport/transitions/default_viewport_transition.dart diff --git a/lib/src/viewport/transitions/easing_viewport_transition.dart b/mapbox_maps_flutter_mobile/lib/src/viewport/transitions/easing_viewport_transition.dart similarity index 100% rename from lib/src/viewport/transitions/easing_viewport_transition.dart rename to mapbox_maps_flutter_mobile/lib/src/viewport/transitions/easing_viewport_transition.dart diff --git a/lib/src/viewport/transitions/fly_viewport_transition.dart b/mapbox_maps_flutter_mobile/lib/src/viewport/transitions/fly_viewport_transition.dart similarity index 100% rename from lib/src/viewport/transitions/fly_viewport_transition.dart rename to mapbox_maps_flutter_mobile/lib/src/viewport/transitions/fly_viewport_transition.dart diff --git a/lib/src/viewport/transitions/viewport_transition.dart b/mapbox_maps_flutter_mobile/lib/src/viewport/transitions/viewport_transition.dart similarity index 100% rename from lib/src/viewport/transitions/viewport_transition.dart rename to mapbox_maps_flutter_mobile/lib/src/viewport/transitions/viewport_transition.dart diff --git a/lib/src/viewport/viewport_internal.dart b/mapbox_maps_flutter_mobile/lib/src/viewport/viewport_internal.dart similarity index 100% rename from lib/src/viewport/viewport_internal.dart rename to mapbox_maps_flutter_mobile/lib/src/viewport/viewport_internal.dart diff --git a/mapbox_maps_flutter_mobile/pubspec.yaml b/mapbox_maps_flutter_mobile/pubspec.yaml new file mode 100644 index 000000000..fcd56292c --- /dev/null +++ b/mapbox_maps_flutter_mobile/pubspec.yaml @@ -0,0 +1,42 @@ +name: mapbox_maps_flutter +description: Interactive, thoroughly customizable maps powered by Mapbox Maps mobile SDKs. +version: 2.8.0 +homepage: https://github.com/mapbox/mapbox-maps-flutter + +environment: + sdk: ">=3.6.0 <4.0.0" + flutter: ">=3.22.3" + +resolution: workspace + +dependencies: + flutter: + sdk: flutter + flutter_plugin_android_lifecycle: ^2.0.5 + typed_data: ^1.3.0 + meta: ^1.9.1 + mapbox_maps_flutter_interface: any + +dev_dependencies: + integration_test: + sdk: flutter + flutter_test: + sdk: flutter + test: ^1.19.0 + flutter_lints: ^5.0.0 + +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +# The following section is specific to Flutter. +flutter: + plugin: + implements: mapbox_maps_flutter_interface + platforms: + android: + package: com.mapbox.maps.mapbox_maps + pluginClass: MapboxMapsPlugin + dartPluginClass: MapboxMapsFlutterMobile + ios: + pluginClass: MapboxMapsPlugin + dartPluginClass: MapboxMapsFlutterMobile diff --git a/test/events_test.dart b/mapbox_maps_flutter_mobile/test/events_test.dart similarity index 98% rename from test/events_test.dart rename to mapbox_maps_flutter_mobile/test/events_test.dart index d6a3877e4..ee5a3c375 100644 --- a/test/events_test.dart +++ b/mapbox_maps_flutter_mobile/test/events_test.dart @@ -6,7 +6,9 @@ void main() { final json = { 'timestamp': 1, 'cameraState': { - 'center': {'coordinates': [0, 0]}, + 'center': { + 'coordinates': [0, 0] + }, 'padding': {'top': 0, 'left': 1, 'bottom': 2, 'right': 3}, 'zoom': 11, 'bearing': 0, @@ -15,7 +17,8 @@ void main() { }; var cameraChangedEventData = CameraChangedEventData.fromJson(json); expect(cameraChangedEventData.timestamp, 1); - expect(cameraChangedEventData.cameraState.center.coordinates, Position.of([0, 0])); + expect(cameraChangedEventData.cameraState.center.coordinates, + Position.of([0, 0])); expect(cameraChangedEventData.cameraState.padding.top, 0); expect(cameraChangedEventData.cameraState.padding.left, 1); expect(cameraChangedEventData.cameraState.padding.bottom, 2); diff --git a/mapbox_maps_flutter_v3/.gitignore b/mapbox_maps_flutter_v3/.gitignore new file mode 100644 index 000000000..3cc3abfad --- /dev/null +++ b/mapbox_maps_flutter_v3/.gitignore @@ -0,0 +1,33 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.build/ +.buildlog/ +.history +.svn/ +.swiftpm/ +migrate_working_dir/ +**/mapbox_access_token.xml +# 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/ +.flutter-plugins +.flutter-plugins-dependencies +build/ diff --git a/mapbox_maps_flutter_v3/.metadata b/mapbox_maps_flutter_v3/.metadata new file mode 100644 index 000000000..72a27dc70 --- /dev/null +++ b/mapbox_maps_flutter_v3/.metadata @@ -0,0 +1,36 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "c23637390482d4cf9598c3ce3f2be31aa7332daf" + channel: "stable" + +project_type: plugin + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf + base_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf + - platform: android + create_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf + base_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf + - platform: ios + create_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf + base_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf + - platform: web + create_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf + base_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - 'lib/main.dart' + - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/mapbox_maps_flutter_v3/.pubignore b/mapbox_maps_flutter_v3/.pubignore new file mode 100644 index 000000000..34924180a --- /dev/null +++ b/mapbox_maps_flutter_v3/.pubignore @@ -0,0 +1,4 @@ +*.lock +**/android/gradlew +**/android/gradlew.bat +**/android/gradle/wrapper/gradle-wrapper.jar \ No newline at end of file diff --git a/mapbox_maps_flutter_v3/CHANGELOG.md b/mapbox_maps_flutter_v3/CHANGELOG.md new file mode 100644 index 000000000..41cc7d819 --- /dev/null +++ b/mapbox_maps_flutter_v3/CHANGELOG.md @@ -0,0 +1,3 @@ +## 0.0.1 + +* TODO: Describe initial release. diff --git a/mapbox_maps_flutter_v3/LICENSE b/mapbox_maps_flutter_v3/LICENSE new file mode 100644 index 000000000..ba75c69f7 --- /dev/null +++ b/mapbox_maps_flutter_v3/LICENSE @@ -0,0 +1 @@ +TODO: Add your license here. diff --git a/mapbox_maps_flutter_v3/README.md b/mapbox_maps_flutter_v3/README.md new file mode 100644 index 000000000..59d83aaa7 --- /dev/null +++ b/mapbox_maps_flutter_v3/README.md @@ -0,0 +1,15 @@ +# mapbox_maps_flutter_v3 + +A new Flutter plugin project. + +## Getting Started + +This project is a starting point for a Flutter +[plug-in package](https://flutter.dev/to/develop-plugins), +a specialized package that includes platform-specific implementation code for +Android and/or iOS. + +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. + diff --git a/mapbox_maps_flutter_v3/analysis_options.yaml b/mapbox_maps_flutter_v3/analysis_options.yaml new file mode 100644 index 000000000..a5744c1cf --- /dev/null +++ b/mapbox_maps_flutter_v3/analysis_options.yaml @@ -0,0 +1,4 @@ +include: package:flutter_lints/flutter.yaml + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/mapbox_maps_flutter_v3/android/.gitignore b/mapbox_maps_flutter_v3/android/.gitignore new file mode 100644 index 000000000..161bdcdaf --- /dev/null +++ b/mapbox_maps_flutter_v3/android/.gitignore @@ -0,0 +1,9 @@ +*.iml +.gradle +/local.properties +/.idea/workspace.xml +/.idea/libraries +.DS_Store +/build +/captures +.cxx diff --git a/mapbox_maps_flutter_v3/android/build.gradle b/mapbox_maps_flutter_v3/android/build.gradle new file mode 100644 index 000000000..298da94c5 --- /dev/null +++ b/mapbox_maps_flutter_v3/android/build.gradle @@ -0,0 +1,66 @@ +group = "com.example.mapbox_maps_flutter_v3" +version = "1.0-SNAPSHOT" + +buildscript { + ext.kotlin_version = "1.8.22" + repositories { + google() + mavenCentral() + } + + dependencies { + classpath("com.android.tools.build:gradle:8.7.0") + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version") + } +} + +allprojects { + repositories { + google() + mavenCentral() + } +} + +apply plugin: "com.android.library" +apply plugin: "kotlin-android" + +android { + namespace = "com.example.mapbox_maps_flutter_v3" + + compileSdk = 35 + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11 + } + + sourceSets { + main.java.srcDirs += "src/main/kotlin" + test.java.srcDirs += "src/test/kotlin" + } + + defaultConfig { + minSdk = 21 + } + + dependencies { + testImplementation("org.jetbrains.kotlin:kotlin-test") + testImplementation("org.mockito:mockito-core:5.0.0") + } + + testOptions { + unitTests.all { + useJUnitPlatform() + + testLogging { + events "passed", "skipped", "failed", "standardOut", "standardError" + outputs.upToDateWhen {false} + showStandardStreams = true + } + } + } +} diff --git a/mapbox_maps_flutter_v3/android/gradle/wrapper/gradle-wrapper.jar b/mapbox_maps_flutter_v3/android/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 000000000..a4b76b953 Binary files /dev/null and b/mapbox_maps_flutter_v3/android/gradle/wrapper/gradle-wrapper.jar differ diff --git a/mapbox_maps_flutter_v3/android/gradle/wrapper/gradle-wrapper.properties b/mapbox_maps_flutter_v3/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 000000000..9355b4155 --- /dev/null +++ b/mapbox_maps_flutter_v3/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,7 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip +networkTimeout=10000 +validateDistributionUrl=true +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/mapbox_maps_flutter_v3/android/gradlew b/mapbox_maps_flutter_v3/android/gradlew new file mode 100755 index 000000000..f5feea6d6 --- /dev/null +++ b/mapbox_maps_flutter_v3/android/gradlew @@ -0,0 +1,252 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/mapbox_maps_flutter_v3/android/settings.gradle b/mapbox_maps_flutter_v3/android/settings.gradle new file mode 100644 index 000000000..47f14e0ca --- /dev/null +++ b/mapbox_maps_flutter_v3/android/settings.gradle @@ -0,0 +1 @@ +rootProject.name = 'mapbox_maps_flutter_v3' diff --git a/mapbox_maps_flutter_v3/android/src/main/AndroidManifest.xml b/mapbox_maps_flutter_v3/android/src/main/AndroidManifest.xml new file mode 100644 index 000000000..f8098cf27 --- /dev/null +++ b/mapbox_maps_flutter_v3/android/src/main/AndroidManifest.xml @@ -0,0 +1,3 @@ + + diff --git a/mapbox_maps_flutter_v3/android/src/main/kotlin/com/example/mapbox_maps_flutter_v3/MapboxMapsFlutterV3Plugin.kt b/mapbox_maps_flutter_v3/android/src/main/kotlin/com/example/mapbox_maps_flutter_v3/MapboxMapsFlutterV3Plugin.kt new file mode 100644 index 000000000..e91054090 --- /dev/null +++ b/mapbox_maps_flutter_v3/android/src/main/kotlin/com/example/mapbox_maps_flutter_v3/MapboxMapsFlutterV3Plugin.kt @@ -0,0 +1,33 @@ +package com.example.mapbox_maps_flutter_v3 + +import io.flutter.embedding.engine.plugins.FlutterPlugin +import io.flutter.plugin.common.MethodCall +import io.flutter.plugin.common.MethodChannel +import io.flutter.plugin.common.MethodChannel.MethodCallHandler +import io.flutter.plugin.common.MethodChannel.Result + +/** MapboxMapsFlutterV3Plugin */ +class MapboxMapsFlutterV3Plugin: FlutterPlugin, MethodCallHandler { + /// The MethodChannel that will the communication between Flutter and native Android + /// + /// This local reference serves to register the plugin with the Flutter Engine and unregister it + /// when the Flutter Engine is detached from the Activity + private lateinit var channel : MethodChannel + + override fun onAttachedToEngine(flutterPluginBinding: FlutterPlugin.FlutterPluginBinding) { + channel = MethodChannel(flutterPluginBinding.binaryMessenger, "mapbox_maps_flutter_v3") + channel.setMethodCallHandler(this) + } + + override fun onMethodCall(call: MethodCall, result: Result) { + if (call.method == "getPlatformVersion") { + result.success("Android ${android.os.Build.VERSION.RELEASE}") + } else { + result.notImplemented() + } + } + + override fun onDetachedFromEngine(binding: FlutterPlugin.FlutterPluginBinding) { + channel.setMethodCallHandler(null) + } +} diff --git a/mapbox_maps_flutter_v3/android/src/test/kotlin/com/example/mapbox_maps_flutter_v3/MapboxMapsFlutterV3PluginTest.kt b/mapbox_maps_flutter_v3/android/src/test/kotlin/com/example/mapbox_maps_flutter_v3/MapboxMapsFlutterV3PluginTest.kt new file mode 100644 index 000000000..6390f4c8e --- /dev/null +++ b/mapbox_maps_flutter_v3/android/src/test/kotlin/com/example/mapbox_maps_flutter_v3/MapboxMapsFlutterV3PluginTest.kt @@ -0,0 +1,27 @@ +package com.example.mapbox_maps_flutter_v3 + +import io.flutter.plugin.common.MethodCall +import io.flutter.plugin.common.MethodChannel +import kotlin.test.Test +import org.mockito.Mockito + +/* + * This demonstrates a simple unit test of the Kotlin portion of this plugin's implementation. + * + * Once you have built the plugin's example app, you can run these tests from the command + * line by running `./gradlew testDebugUnitTest` in the `example/android/` directory, or + * you can run them directly from IDEs that support JUnit such as Android Studio. + */ + +internal class MapboxMapsFlutterV3PluginTest { + @Test + fun onMethodCall_getPlatformVersion_returnsExpectedValue() { + val plugin = MapboxMapsFlutterV3Plugin() + + val call = MethodCall("getPlatformVersion", null) + val mockResult: MethodChannel.Result = Mockito.mock(MethodChannel.Result::class.java) + plugin.onMethodCall(call, mockResult) + + Mockito.verify(mockResult).success("Android " + android.os.Build.VERSION.RELEASE) + } +} diff --git a/mapbox_maps_flutter_v3/example/.gitignore b/mapbox_maps_flutter_v3/example/.gitignore new file mode 100644 index 000000000..79c113f9b --- /dev/null +++ b/mapbox_maps_flutter_v3/example/.gitignore @@ -0,0 +1,45 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.build/ +.buildlog/ +.history +.svn/ +.swiftpm/ +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 diff --git a/mapbox_maps_flutter_v3/example/README.md b/mapbox_maps_flutter_v3/example/README.md new file mode 100644 index 000000000..1a62cc578 --- /dev/null +++ b/mapbox_maps_flutter_v3/example/README.md @@ -0,0 +1,16 @@ +# mapbox_maps_flutter_v3_example + +Demonstrates how to use the mapbox_maps_flutter_v3 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. diff --git a/mapbox_maps_flutter_v3/example/analysis_options.yaml b/mapbox_maps_flutter_v3/example/analysis_options.yaml new file mode 100644 index 000000000..0d2902135 --- /dev/null +++ b/mapbox_maps_flutter_v3/example/analysis_options.yaml @@ -0,0 +1,28 @@ +# 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.dev/lints. + # + # 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 diff --git a/mapbox_maps_flutter_v3/example/android/.gitignore b/mapbox_maps_flutter_v3/example/android/.gitignore new file mode 100644 index 000000000..be3943c96 --- /dev/null +++ b/mapbox_maps_flutter_v3/example/android/.gitignore @@ -0,0 +1,14 @@ +gradle-wrapper.jar +/.gradle +/captures/ +/gradlew +/gradlew.bat +/local.properties +GeneratedPluginRegistrant.java +.cxx/ + +# Remember to never publicly share your keystore. +# See https://flutter.dev/to/reference-keystore +key.properties +**/*.keystore +**/*.jks diff --git a/mapbox_maps_flutter_v3/example/android/app/build.gradle.kts b/mapbox_maps_flutter_v3/example/android/app/build.gradle.kts new file mode 100644 index 000000000..58372065c --- /dev/null +++ b/mapbox_maps_flutter_v3/example/android/app/build.gradle.kts @@ -0,0 +1,44 @@ +plugins { + id("com.android.application") + id("kotlin-android") + // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. + id("dev.flutter.flutter-gradle-plugin") +} + +android { + namespace = "com.example.mapbox_maps_flutter_v3_example" + compileSdk = flutter.compileSdkVersion + ndkVersion = flutter.ndkVersion + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11.toString() + } + + defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId = "com.example.mapbox_maps_flutter_v3_example" + // You can update the following values to match your application needs. + // For more information, see: https://flutter.dev/to/review-gradle-config. + minSdk = flutter.minSdkVersion + targetSdk = flutter.targetSdkVersion + versionCode = flutter.versionCode + versionName = flutter.versionName + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig = signingConfigs.getByName("debug") + } + } +} + +flutter { + source = "../.." +} diff --git a/mapbox_maps_flutter_v3/example/android/app/src/debug/AndroidManifest.xml b/mapbox_maps_flutter_v3/example/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 000000000..399f6981d --- /dev/null +++ b/mapbox_maps_flutter_v3/example/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/mapbox_maps_flutter_v3/example/android/app/src/main/AndroidManifest.xml b/mapbox_maps_flutter_v3/example/android/app/src/main/AndroidManifest.xml new file mode 100644 index 000000000..0a8e78ab3 --- /dev/null +++ b/mapbox_maps_flutter_v3/example/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/mapbox_maps_flutter_v3/example/android/app/src/main/kotlin/com/example/mapbox_maps_flutter_v3_example/MainActivity.kt b/mapbox_maps_flutter_v3/example/android/app/src/main/kotlin/com/example/mapbox_maps_flutter_v3_example/MainActivity.kt new file mode 100644 index 000000000..9641dec1b --- /dev/null +++ b/mapbox_maps_flutter_v3/example/android/app/src/main/kotlin/com/example/mapbox_maps_flutter_v3_example/MainActivity.kt @@ -0,0 +1,5 @@ +package com.example.mapbox_maps_flutter_v3_example + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity : FlutterActivity() diff --git a/mapbox_maps_flutter_v3/example/android/app/src/main/res/drawable-v21/launch_background.xml b/mapbox_maps_flutter_v3/example/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 000000000..f74085f3f --- /dev/null +++ b/mapbox_maps_flutter_v3/example/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/mapbox_maps_flutter_v3/example/android/app/src/main/res/drawable/launch_background.xml b/mapbox_maps_flutter_v3/example/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 000000000..304732f88 --- /dev/null +++ b/mapbox_maps_flutter_v3/example/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/mapbox_maps_flutter_v3/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/mapbox_maps_flutter_v3/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..db77bb4b7 Binary files /dev/null and b/mapbox_maps_flutter_v3/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/mapbox_maps_flutter_v3/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/mapbox_maps_flutter_v3/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..17987b79b Binary files /dev/null and b/mapbox_maps_flutter_v3/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/mapbox_maps_flutter_v3/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/mapbox_maps_flutter_v3/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..09d439148 Binary files /dev/null and b/mapbox_maps_flutter_v3/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/mapbox_maps_flutter_v3/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/mapbox_maps_flutter_v3/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..d5f1c8d34 Binary files /dev/null and b/mapbox_maps_flutter_v3/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/mapbox_maps_flutter_v3/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/mapbox_maps_flutter_v3/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..4d6372eeb Binary files /dev/null and b/mapbox_maps_flutter_v3/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/mapbox_maps_flutter_v3/example/android/app/src/main/res/values-night/styles.xml b/mapbox_maps_flutter_v3/example/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 000000000..06952be74 --- /dev/null +++ b/mapbox_maps_flutter_v3/example/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/mapbox_maps_flutter_v3/example/android/app/src/main/res/values/styles.xml b/mapbox_maps_flutter_v3/example/android/app/src/main/res/values/styles.xml new file mode 100644 index 000000000..cb1ef8805 --- /dev/null +++ b/mapbox_maps_flutter_v3/example/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/mapbox_maps_flutter_v3/example/android/app/src/profile/AndroidManifest.xml b/mapbox_maps_flutter_v3/example/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 000000000..399f6981d --- /dev/null +++ b/mapbox_maps_flutter_v3/example/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/mapbox_maps_flutter_v3/example/android/build.gradle.kts b/mapbox_maps_flutter_v3/example/android/build.gradle.kts new file mode 100644 index 000000000..89176ef44 --- /dev/null +++ b/mapbox_maps_flutter_v3/example/android/build.gradle.kts @@ -0,0 +1,21 @@ +allprojects { + repositories { + google() + mavenCentral() + } +} + +val newBuildDir: Directory = rootProject.layout.buildDirectory.dir("../../build").get() +rootProject.layout.buildDirectory.value(newBuildDir) + +subprojects { + val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name) + project.layout.buildDirectory.value(newSubprojectBuildDir) +} +subprojects { + project.evaluationDependsOn(":app") +} + +tasks.register("clean") { + delete(rootProject.layout.buildDirectory) +} diff --git a/mapbox_maps_flutter_v3/example/android/gradle.properties b/mapbox_maps_flutter_v3/example/android/gradle.properties new file mode 100644 index 000000000..f018a6181 --- /dev/null +++ b/mapbox_maps_flutter_v3/example/android/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError +android.useAndroidX=true +android.enableJetifier=true diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/mapbox_maps_flutter_v3/example/android/gradle/wrapper/gradle-wrapper.properties similarity index 91% rename from android/gradle/wrapper/gradle-wrapper.properties rename to mapbox_maps_flutter_v3/example/android/gradle/wrapper/gradle-wrapper.properties index 111c25e79..afa1e8eb0 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/mapbox_maps_flutter_v3/example/android/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip diff --git a/mapbox_maps_flutter_v3/example/android/settings.gradle.kts b/mapbox_maps_flutter_v3/example/android/settings.gradle.kts new file mode 100644 index 000000000..a439442c2 --- /dev/null +++ b/mapbox_maps_flutter_v3/example/android/settings.gradle.kts @@ -0,0 +1,25 @@ +pluginManagement { + val flutterSdkPath = run { + val properties = java.util.Properties() + file("local.properties").inputStream().use { properties.load(it) } + val flutterSdkPath = properties.getProperty("flutter.sdk") + require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" } + flutterSdkPath + } + + includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") + + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +plugins { + id("dev.flutter.flutter-plugin-loader") version "1.0.0" + id("com.android.application") version "8.7.0" apply false + id("org.jetbrains.kotlin.android") version "1.8.22" apply false +} + +include(":app") diff --git a/mapbox_maps_flutter_v3/example/integration_test/app.dart b/mapbox_maps_flutter_v3/example/integration_test/app.dart new file mode 100644 index 000000000..3a8af8367 --- /dev/null +++ b/mapbox_maps_flutter_v3/example/integration_test/app.dart @@ -0,0 +1,40 @@ +import 'dart:async'; + +import 'package:flutter/material.dart'; +import 'package:mapbox_maps_flutter_v3/mapbox_maps_flutter_v3.dart'; + +const ACCESS_TOKEN = String.fromEnvironment('ACCESS_TOKEN'); + +Future main( + {double? width, + double? height, + CameraOptions? camera, + Alignment alignment = Alignment.topLeft}) { + final completer = Completer(); + + MapboxOptions.setAccessToken(ACCESS_TOKEN); + + runApp(MaterialApp( + home: Align( + alignment: alignment, + child: SizedBox( + width: width, + height: height, + child: MapWidget( + key: ValueKey("mapWidget"), + cameraOptions: camera, + onMapCreated: (MapboxMap mapboxMap) { + completer.complete(mapboxMap); + }, + ), + ), + ))); + + return completer.future; +} + +void runEmpty() { + MapboxOptions.setAccessToken(ACCESS_TOKEN); + + runApp(MaterialApp()); +} diff --git a/mapbox_maps_flutter_v3/example/integration_test/camera_test.dart b/mapbox_maps_flutter_v3/example/integration_test/camera_test.dart new file mode 100644 index 000000000..b271f25cc --- /dev/null +++ b/mapbox_maps_flutter_v3/example/integration_test/camera_test.dart @@ -0,0 +1,74 @@ +import 'package:flutter_test/flutter_test.dart'; +import 'package:integration_test/integration_test.dart'; +import 'package:mapbox_maps_flutter_v3/mapbox_maps_flutter_v3.dart'; + +import 'app.dart' as app; + +void main() { + IntegrationTestWidgetsFlutterBinding.ensureInitialized(); + final initialCamera = CameraOptions( + center: Point(coordinates: Position(0, 0)), + padding: MbxEdgeInsets(top: 10, left: 20, bottom: 30, right: 40), + zoom: 15, + pitch: 60, + bearing: 12, + ); + + group('camera get and set', () { + testWidgets('set camera when creating a map', (WidgetTester tester) async { + final mapFuture = app.main(camera: initialCamera); + await tester.pumpAndSettle(); + final mapboxMap = await mapFuture; + + // Verify that the camera options are set correctly + final camera = await mapboxMap.getCameraState(); + expect(camera.center.coordinates.lng, + closeTo(initialCamera.center!.coordinates.lng, 0.0001)); + expect(camera.center.coordinates.lat, + closeTo(initialCamera.center!.coordinates.lat, 0.0001)); + expect(camera.padding.top, closeTo(initialCamera.padding!.top, 0.0001)); + expect(camera.padding.left, closeTo(initialCamera.padding!.left, 0.0001)); + expect(camera.padding.bottom, + closeTo(initialCamera.padding!.bottom, 0.0001)); + expect( + camera.padding.right, closeTo(initialCamera.padding!.right, 0.0001)); + expect(camera.zoom, closeTo(initialCamera.zoom!, 0.0001)); + expect(camera.pitch, closeTo(initialCamera.pitch!, 0.0001)); + expect(camera.bearing, closeTo(initialCamera.bearing!, 0.0001)); + }); + + testWidgets('set camera after map created', (tester) async { + final mapFuture = app.main(); + await tester.pumpAndSettle(); + final mapboxMap = await mapFuture; + + // Set the camera options + final cameraOptions = CameraOptions( + center: Point(coordinates: Position(1, 1)), + padding: MbxEdgeInsets(top: 10, left: 20, bottom: 30, right: 40), + zoom: 15, + pitch: 60, + bearing: 12, + ); + + await mapboxMap.setCamera(cameraOptions); + await tester.pumpAndSettle(); + + final camera = await mapboxMap.getCameraState(); + expect(camera.center.coordinates.lng, + closeTo(cameraOptions.center!.coordinates.lng, 0.0001)); + expect(camera.center.coordinates.lat, + closeTo(cameraOptions.center!.coordinates.lat, 0.0001)); + expect( + camera.padding.top, closeTo(cameraOptions.padding?.top ?? 0, 0.0001)); + expect(camera.padding.left, closeTo(cameraOptions.padding!.left, 0.0001)); + expect(camera.padding.bottom, + closeTo(cameraOptions.padding!.bottom, 0.0001)); + expect( + camera.padding.right, closeTo(cameraOptions.padding!.right, 0.0001)); + expect(camera.zoom, closeTo(cameraOptions.zoom!, 0.0001)); + expect(camera.pitch, closeTo(cameraOptions.pitch!, 0.0001)); + expect(camera.bearing, closeTo(cameraOptions.bearing!, 0.0001)); + }); + }); +} diff --git a/mapbox_maps_flutter_v3/example/ios/.gitignore b/mapbox_maps_flutter_v3/example/ios/.gitignore new file mode 100644 index 000000000..7a7f9873a --- /dev/null +++ b/mapbox_maps_flutter_v3/example/ios/.gitignore @@ -0,0 +1,34 @@ +**/dgph +*.mode1v3 +*.mode2v3 +*.moved-aside +*.pbxuser +*.perspectivev3 +**/*sync/ +.sconsign.dblite +.tags* +**/.vagrant/ +**/DerivedData/ +Icon? +**/Pods/ +**/.symlinks/ +profile +xcuserdata +**/.generated/ +Flutter/App.framework +Flutter/Flutter.framework +Flutter/Flutter.podspec +Flutter/Generated.xcconfig +Flutter/ephemeral/ +Flutter/app.flx +Flutter/app.zip +Flutter/flutter_assets/ +Flutter/flutter_export_environment.sh +ServiceDefinitions.json +Runner/GeneratedPluginRegistrant.* + +# Exceptions to above rules. +!default.mode1v3 +!default.mode2v3 +!default.pbxuser +!default.perspectivev3 diff --git a/mapbox_maps_flutter_v3/example/ios/Flutter/AppFrameworkInfo.plist b/mapbox_maps_flutter_v3/example/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 000000000..7c5696400 --- /dev/null +++ b/mapbox_maps_flutter_v3/example/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + MinimumOSVersion + 12.0 + + diff --git a/mapbox_maps_flutter_v3/example/ios/Flutter/Debug.xcconfig b/mapbox_maps_flutter_v3/example/ios/Flutter/Debug.xcconfig new file mode 100644 index 000000000..592ceee85 --- /dev/null +++ b/mapbox_maps_flutter_v3/example/ios/Flutter/Debug.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/mapbox_maps_flutter_v3/example/ios/Flutter/Release.xcconfig b/mapbox_maps_flutter_v3/example/ios/Flutter/Release.xcconfig new file mode 100644 index 000000000..592ceee85 --- /dev/null +++ b/mapbox_maps_flutter_v3/example/ios/Flutter/Release.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/mapbox_maps_flutter_v3/example/ios/Runner.xcodeproj/project.pbxproj b/mapbox_maps_flutter_v3/example/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 000000000..0ecc7a678 --- /dev/null +++ b/mapbox_maps_flutter_v3/example/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,638 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXBuildFile section */ + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; }; + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */; }; + 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 */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 97C146E61CF9000F007C117D /* Project object */; + proxyType = 1; + remoteGlobalIDString = 97C146ED1CF9000F007C117D; + remoteInfo = Runner; + }; +/* End PBXContainerItemProxy 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 = ""; }; + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; + 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 331C8082294A63A400263BE5 /* RunnerTests */ = { + isa = PBXGroup; + children = ( + 331C807B294A618700263BE5 /* RunnerTests.swift */, + ); + path = RunnerTests; + sourceTree = ""; + }; + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = ""; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + 331C8082294A63A400263BE5 /* RunnerTests */, + ); + sourceTree = ""; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + 331C8081294A63A400263BE5 /* RunnerTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C147021CF9000F007C117D /* Info.plist */, + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, + ); + path = Runner; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 331C8080294A63A400263BE5 /* RunnerTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; + buildPhases = ( + 331C807D294A63A400263BE5 /* Sources */, + 331C807F294A63A400263BE5 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 331C8086294A63A400263BE5 /* PBXTargetDependency */, + ); + name = RunnerTests; + productName = RunnerTests; + productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 97C146ED1CF9000F007C117D /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 9740EEB61CF901F6004384FC /* Run Script */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Runner; + packageProductDependencies = ( + 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */, + ); + productName = Runner; + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 97C146E61CF9000F007C117D /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = YES; + LastUpgradeCheck = 1510; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 331C8080294A63A400263BE5 = { + CreatedOnToolsVersion = 14.0; + TestTargetID = 97C146ED1CF9000F007C117D; + }; + 97C146ED1CF9000F007C117D = { + CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 1100; + }; + }; + }; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 97C146E51CF9000F007C117D; + packageReferences = ( + 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */, + ); + productRefGroup = 97C146EF1CF9000F007C117D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 97C146ED1CF9000F007C117D /* Runner */, + 331C8080294A63A400263BE5 /* RunnerTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 331C807F294A63A400263BE5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 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; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", + ); + name = "Thin Binary"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; + }; + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + 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 */ + 331C807D294A63A400263BE5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EA1CF9000F007C117D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 331C8086294A63A400263BE5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 97C146ED1CF9000F007C117D /* Runner */; + targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 97C146FA1CF9000F007C117D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C146FB1CF9000F007C117D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 249021D3217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + 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; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + 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 = 15.6; + 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; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.mapboxMapsFlutterV3Example; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Profile; + }; + 331C8088294A63A400263BE5 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.mapboxMapsFlutterV3Example.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Debug; + }; + 331C8089294A63A400263BE5 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.mapboxMapsFlutterV3Example.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Release; + }; + 331C808A294A63A400263BE5 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.mapboxMapsFlutterV3Example.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Profile; + }; + 97C147031CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + 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; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + 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 = 15.6; + 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; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + 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; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + 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 = 15.6; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 97C147061CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.mapboxMapsFlutterV3Example; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 97C147071CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.mapboxMapsFlutterV3Example; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 331C8088294A63A400263BE5 /* Debug */, + 331C8089294A63A400263BE5 /* Release */, + 331C808A294A63A400263BE5 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 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 */ + +/* Begin XCLocalSwiftPackageReference section */ + 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */ = { + isa = XCLocalSwiftPackageReference; + relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; + }; +/* End XCLocalSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */ = { + isa = XCSwiftPackageProductDependency; + productName = FlutterGeneratedPluginSwiftPackage; + }; +/* End XCSwiftPackageProductDependency section */ + }; + rootObject = 97C146E61CF9000F007C117D /* Project object */; +} diff --git a/mapbox_maps_flutter_v3/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/mapbox_maps_flutter_v3/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..919434a62 --- /dev/null +++ b/mapbox_maps_flutter_v3/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/mapbox_maps_flutter_v3/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/mapbox_maps_flutter_v3/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 000000000..18d981003 --- /dev/null +++ b/mapbox_maps_flutter_v3/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/mapbox_maps_flutter_v3/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/mapbox_maps_flutter_v3/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 000000000..f9b0d7c5e --- /dev/null +++ b/mapbox_maps_flutter_v3/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/mapbox_maps_flutter_v3/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/mapbox_maps_flutter_v3/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 000000000..a37adb51b --- /dev/null +++ b/mapbox_maps_flutter_v3/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,42 @@ +{ + "originHash" : "b80c6b13a9882c3fecf9cc3faa0bcbb0bc18462e6e58d2f8552acc6c4492081c", + "pins" : [ + { + "identity" : "mapbox-common-ios", + "kind" : "remoteSourceControl", + "location" : "https://github.com/mapbox/mapbox-common-ios.git", + "state" : { + "revision" : "316a4f97bcf45aaae632327b69fac545cc38e42f", + "version" : "24.12.0" + } + }, + { + "identity" : "mapbox-core-maps-ios", + "kind" : "remoteSourceControl", + "location" : "https://github.com/mapbox/mapbox-core-maps-ios.git", + "state" : { + "revision" : "853cfc3c431d42291e1c4a0d550fc8cf6ea90015", + "version" : "11.12.0" + } + }, + { + "identity" : "mapbox-maps-ios", + "kind" : "remoteSourceControl", + "location" : "https://github.com/mapbox/mapbox-maps-ios.git", + "state" : { + "revision" : "c141954157c3aaf09bc1bc3d233239666421b96e", + "version" : "11.12.0" + } + }, + { + "identity" : "turf-swift", + "kind" : "remoteSourceControl", + "location" : "https://github.com/mapbox/turf-swift.git", + "state" : { + "revision" : "bf840e6b9529d105687840fe2c9dcd74197d46d1", + "version" : "4.0.0" + } + } + ], + "version" : 3 +} diff --git a/mapbox_maps_flutter_v3/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/mapbox_maps_flutter_v3/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 000000000..d795332e1 --- /dev/null +++ b/mapbox_maps_flutter_v3/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/mapbox_maps_flutter_v3/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/mapbox_maps_flutter_v3/example/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..1d526a16e --- /dev/null +++ b/mapbox_maps_flutter_v3/example/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/mapbox_maps_flutter_v3/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/mapbox_maps_flutter_v3/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 000000000..18d981003 --- /dev/null +++ b/mapbox_maps_flutter_v3/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/mapbox_maps_flutter_v3/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/mapbox_maps_flutter_v3/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 000000000..f9b0d7c5e --- /dev/null +++ b/mapbox_maps_flutter_v3/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/mapbox_maps_flutter_v3/example/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved b/mapbox_maps_flutter_v3/example/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 000000000..a37adb51b --- /dev/null +++ b/mapbox_maps_flutter_v3/example/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,42 @@ +{ + "originHash" : "b80c6b13a9882c3fecf9cc3faa0bcbb0bc18462e6e58d2f8552acc6c4492081c", + "pins" : [ + { + "identity" : "mapbox-common-ios", + "kind" : "remoteSourceControl", + "location" : "https://github.com/mapbox/mapbox-common-ios.git", + "state" : { + "revision" : "316a4f97bcf45aaae632327b69fac545cc38e42f", + "version" : "24.12.0" + } + }, + { + "identity" : "mapbox-core-maps-ios", + "kind" : "remoteSourceControl", + "location" : "https://github.com/mapbox/mapbox-core-maps-ios.git", + "state" : { + "revision" : "853cfc3c431d42291e1c4a0d550fc8cf6ea90015", + "version" : "11.12.0" + } + }, + { + "identity" : "mapbox-maps-ios", + "kind" : "remoteSourceControl", + "location" : "https://github.com/mapbox/mapbox-maps-ios.git", + "state" : { + "revision" : "c141954157c3aaf09bc1bc3d233239666421b96e", + "version" : "11.12.0" + } + }, + { + "identity" : "turf-swift", + "kind" : "remoteSourceControl", + "location" : "https://github.com/mapbox/turf-swift.git", + "state" : { + "revision" : "bf840e6b9529d105687840fe2c9dcd74197d46d1", + "version" : "4.0.0" + } + } + ], + "version" : 3 +} diff --git a/mapbox_maps_flutter_v3/example/ios/Runner/AppDelegate.swift b/mapbox_maps_flutter_v3/example/ios/Runner/AppDelegate.swift new file mode 100644 index 000000000..626664468 --- /dev/null +++ b/mapbox_maps_flutter_v3/example/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import Flutter +import UIKit + +@main +@objc class AppDelegate: FlutterAppDelegate { + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + GeneratedPluginRegistrant.register(with: self) + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } +} diff --git a/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 000000000..d36b1fab2 --- /dev/null +++ b/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -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" + } +} diff --git a/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 000000000..dc9ada472 Binary files /dev/null and b/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 000000000..7353c41ec Binary files /dev/null and b/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 000000000..797d452e4 Binary files /dev/null and b/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 000000000..6ed2d933e Binary files /dev/null and b/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 000000000..4cd7b0099 Binary files /dev/null and b/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 000000000..fe730945a Binary files /dev/null and b/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 000000000..321773cd8 Binary files /dev/null and b/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 000000000..797d452e4 Binary files /dev/null and b/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 000000000..502f463a9 Binary files /dev/null and b/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 000000000..0ec303439 Binary files /dev/null and b/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 000000000..0ec303439 Binary files /dev/null and b/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 000000000..e9f5fea27 Binary files /dev/null and b/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 000000000..84ac32ae7 Binary files /dev/null and b/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 000000000..8953cba09 Binary files /dev/null and b/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 000000000..0467bf12a Binary files /dev/null and b/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 000000000..0bedcf2fd --- /dev/null +++ b/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -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" + } +} diff --git a/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 000000000..9da19eaca Binary files /dev/null and b/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ diff --git a/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 000000000..9da19eaca Binary files /dev/null and b/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ diff --git a/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 000000000..9da19eaca Binary files /dev/null and b/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ diff --git a/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 000000000..89c2725b7 --- /dev/null +++ b/mapbox_maps_flutter_v3/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -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. \ No newline at end of file diff --git a/mapbox_maps_flutter_v3/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/mapbox_maps_flutter_v3/example/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 000000000..f2e259c7c --- /dev/null +++ b/mapbox_maps_flutter_v3/example/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/mapbox_maps_flutter_v3/example/ios/Runner/Base.lproj/Main.storyboard b/mapbox_maps_flutter_v3/example/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 000000000..f3c28516f --- /dev/null +++ b/mapbox_maps_flutter_v3/example/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/mapbox_maps_flutter_v3/example/ios/Runner/Info.plist b/mapbox_maps_flutter_v3/example/ios/Runner/Info.plist new file mode 100644 index 000000000..a460020f5 --- /dev/null +++ b/mapbox_maps_flutter_v3/example/ios/Runner/Info.plist @@ -0,0 +1,49 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + Mapbox Maps Flutter V3 + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + mapbox_maps_flutter_v3_example + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + CADisableMinimumFrameDurationOnPhone + + UIApplicationSupportsIndirectInputEvents + + + diff --git a/mapbox_maps_flutter_v3/example/ios/Runner/Runner-Bridging-Header.h b/mapbox_maps_flutter_v3/example/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 000000000..308a2a560 --- /dev/null +++ b/mapbox_maps_flutter_v3/example/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/mapbox_maps_flutter_v3/example/ios/RunnerTests/RunnerTests.swift b/mapbox_maps_flutter_v3/example/ios/RunnerTests/RunnerTests.swift new file mode 100644 index 000000000..06fc4392f --- /dev/null +++ b/mapbox_maps_flutter_v3/example/ios/RunnerTests/RunnerTests.swift @@ -0,0 +1,29 @@ +import Flutter +import UIKit +import XCTest + +// If your plugin has been explicitly set to "type: .dynamic" in the Package.swift, +// you will need to add your plugin as a dependency of RunnerTests within Xcode. + +@testable import mapbox_maps_flutter_v3 + +// This demonstrates a simple unit test of the Swift portion of this plugin's implementation. +// +// See https://developer.apple.com/documentation/xctest for more information about using XCTest. + +class RunnerTests: XCTestCase { + + func testGetPlatformVersion() { + let plugin = MapboxMapsFlutterV3Plugin() + + let call = FlutterMethodCall(methodName: "getPlatformVersion", arguments: []) + + let resultExpectation = expectation(description: "result block must be called.") + plugin.handle(call) { result in + XCTAssertEqual(result as! String, "iOS " + UIDevice.current.systemVersion) + resultExpectation.fulfill() + } + waitForExpectations(timeout: 1) + } + +} diff --git a/mapbox_maps_flutter_v3/example/lib/main.dart b/mapbox_maps_flutter_v3/example/lib/main.dart new file mode 100644 index 000000000..ba69b26da --- /dev/null +++ b/mapbox_maps_flutter_v3/example/lib/main.dart @@ -0,0 +1,56 @@ +import 'package:flutter/material.dart'; +import 'package:mapbox_maps_flutter_v3/mapbox_maps_flutter_v3.dart'; + +import 'utils.dart'; + +void main() { + WidgetsFlutterBinding.ensureInitialized(); + runApp(const MyApp()); +} + +class MyApp extends StatefulWidget { + const MyApp({super.key}); + + @override + State createState() => _MyAppState(); +} + +class _MyAppState extends State { + static const String ACCESS_TOKEN = String.fromEnvironment( + "MAPBOX_ACCESS_TOKEN", + ); + + late final MapboxMap _mapboxMap; + + @override + void initState() { + super.initState(); + MapboxOptions.setAccessToken(ACCESS_TOKEN); + } + + _onMapCreated(MapboxMap mapboxMap) { + _mapboxMap = mapboxMap; + + Future.delayed(const Duration(seconds: 2), () { + _mapboxMap.setCamera( + CameraOptions( + center: City.saigon, + ), + ); + }); + } + + @override + Widget build(BuildContext context) { + return MaterialApp( + home: Scaffold( + appBar: AppBar(title: const Text('Example app')), + body: Center( + child: MapWidget( + cameraOptions: CameraOptions(center: City.helsinki, zoom: 6), + onMapCreated: _onMapCreated, + )), + ), + ); + } +} diff --git a/mapbox_maps_flutter_v3/example/lib/utils.dart b/mapbox_maps_flutter_v3/example/lib/utils.dart new file mode 100644 index 000000000..4aabe8e70 --- /dev/null +++ b/mapbox_maps_flutter_v3/example/lib/utils.dart @@ -0,0 +1,7 @@ +import 'package:mapbox_maps_flutter_v3/mapbox_maps_flutter_v3.dart'; + +extension City on Point { + static Point get helsinki => + Point(coordinates: Position.of([24.941, 60.173])); + static Point get saigon => Point(coordinates: Position.of([106.700, 10.776])); +} diff --git a/mapbox_maps_flutter_v3/example/pubspec.lock b/mapbox_maps_flutter_v3/example/pubspec.lock new file mode 100644 index 000000000..5777a47bd --- /dev/null +++ b/mapbox_maps_flutter_v3/example/pubspec.lock @@ -0,0 +1,413 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + args: + dependency: transitive + description: + name: args + sha256: d0481093c50b1da8910eb0bb301626d4d8eb7284aa739614d2b394ee09e3ea04 + url: "https://pub.dev" + source: hosted + version: "2.7.0" + async: + dependency: transitive + description: + name: async + sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63 + url: "https://pub.dev" + source: hosted + version: "2.12.0" + benchmark: + dependency: transitive + description: + name: benchmark + sha256: cb3eeea01e3f054df76ee9775ca680f3afa5f19f39b2bb426ba78ba27654493b + url: "https://pub.dev" + source: hosted + version: "0.3.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + characters: + dependency: transitive + description: + name: characters + sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 + url: "https://pub.dev" + source: hosted + version: "1.4.0" + clock: + dependency: transitive + description: + name: clock + sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b + url: "https://pub.dev" + source: hosted + version: "1.1.2" + collection: + dependency: transitive + description: + name: collection + sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" + url: "https://pub.dev" + source: hosted + version: "1.19.1" + cupertino_icons: + dependency: "direct main" + description: + name: cupertino_icons + sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 + url: "https://pub.dev" + source: hosted + version: "1.0.8" + dart_sort_queue: + dependency: transitive + description: + name: dart_sort_queue + sha256: f3353ba8b4850e072d3368757f62edb79af34a9703c3e3df9c59342721f5f5b1 + url: "https://pub.dev" + source: hosted + version: "0.0.2+3" + fake_async: + dependency: transitive + description: + name: fake_async + sha256: "6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc" + url: "https://pub.dev" + source: hosted + version: "1.3.2" + file: + dependency: transitive + description: + name: file + sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 + url: "https://pub.dev" + source: hosted + version: "7.0.1" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_driver: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1" + url: "https://pub.dev" + source: hosted + version: "5.0.0" + flutter_plugin_android_lifecycle: + dependency: transitive + description: + name: flutter_plugin_android_lifecycle + sha256: f948e346c12f8d5480d2825e03de228d0eb8c3a737e4cdaa122267b89c022b5e + url: "https://pub.dev" + source: hosted + version: "2.0.28" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + fuchsia_remote_debug_protocol: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + geotypes: + dependency: transitive + description: + name: geotypes + sha256: "5bedf57de92283133dd221e363812ef50eaaba414f0823b1974ef7d84b86991f" + url: "https://pub.dev" + source: hosted + version: "0.0.2" + integration_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + json_annotation: + dependency: transitive + description: + name: json_annotation + sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" + url: "https://pub.dev" + source: hosted + version: "4.9.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec + url: "https://pub.dev" + source: hosted + version: "10.0.8" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 + url: "https://pub.dev" + source: hosted + version: "3.0.9" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" + lints: + dependency: transitive + description: + name: lints + sha256: c35bb79562d980e9a453fc715854e1ed39e24e7d0297a880ef54e17f9874a9d7 + url: "https://pub.dev" + source: hosted + version: "5.1.1" + mapbox_maps_flutter: + dependency: "direct overridden" + description: + path: "../../mapbox_maps_flutter_mobile" + relative: true + source: path + version: "2.8.0" + mapbox_maps_flutter_interface: + dependency: "direct overridden" + description: + path: "../../mapbox_maps_flutter_interface" + relative: true + source: path + version: "0.0.1" + mapbox_maps_flutter_v3: + dependency: "direct main" + description: + path: ".." + relative: true + source: path + version: "0.0.1" + mapbox_maps_flutter_web: + dependency: "direct overridden" + description: + path: "../../mapbox_maps_flutter_web" + relative: true + source: path + version: "0.0.1" + matcher: + dependency: transitive + description: + name: matcher + sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 + url: "https://pub.dev" + source: hosted + version: "0.12.17" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec + url: "https://pub.dev" + source: hosted + version: "0.11.1" + meta: + dependency: transitive + description: + name: meta + sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c + url: "https://pub.dev" + source: hosted + version: "1.16.0" + path: + dependency: transitive + description: + name: path + sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" + url: "https://pub.dev" + source: hosted + version: "1.9.1" + platform: + dependency: transitive + description: + name: platform + sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984" + url: "https://pub.dev" + source: hosted + version: "3.1.6" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" + url: "https://pub.dev" + source: hosted + version: "2.1.8" + process: + dependency: transitive + description: + name: process + sha256: "107d8be718f120bbba9dcd1e95e3bd325b1b4a4f07db64154635ba03f2567a0d" + url: "https://pub.dev" + source: hosted + version: "5.0.3" + rbush: + dependency: transitive + description: + name: rbush + sha256: "48b683421b4afb43a642f82c6aa31911e54f3069143d31c7d33cbe329df13403" + url: "https://pub.dev" + source: hosted + version: "1.1.1" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + source_span: + dependency: transitive + description: + name: source_span + sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c" + url: "https://pub.dev" + source: hosted + version: "1.10.1" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" + url: "https://pub.dev" + source: hosted + version: "1.12.1" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" + url: "https://pub.dev" + source: hosted + version: "1.4.1" + sweepline_intersections: + dependency: transitive + description: + name: sweepline_intersections + sha256: a665c707200a4f07140a4029b41a7c4883beb3f04322cd8e08ebf650f69e1176 + url: "https://pub.dev" + source: hosted + version: "0.0.4" + sync_http: + dependency: transitive + description: + name: sync_http + sha256: "7f0cd72eca000d2e026bcd6f990b81d0ca06022ef4e32fb257b30d3d1014a961" + url: "https://pub.dev" + source: hosted + version: "0.3.1" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" + url: "https://pub.dev" + source: hosted + version: "1.2.2" + test_api: + dependency: transitive + description: + name: test_api + sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd + url: "https://pub.dev" + source: hosted + version: "0.7.4" + turf: + dependency: transitive + description: + name: turf + sha256: "75347c45a5c1de805db7cb182286f05a3770e01546626c4dc292709d15cbe436" + url: "https://pub.dev" + source: hosted + version: "0.0.10" + turf_equality: + dependency: transitive + description: + name: turf_equality + sha256: f0f44ffe389547941358e0d3d4a747db2bd56115b32ff1cede5e5bdf3126a3e2 + url: "https://pub.dev" + source: hosted + version: "0.1.0" + turf_pip: + dependency: transitive + description: + name: turf_pip + sha256: ba4fd414baffd5d7b30880658ad6db82461c49ec023f8ffd0c23d398ad8b14be + url: "https://pub.dev" + source: hosted + version: "0.0.2" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 + url: "https://pub.dev" + source: hosted + version: "1.4.0" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: "0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14" + url: "https://pub.dev" + source: hosted + version: "14.3.1" + web: + dependency: transitive + description: + name: web + sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a" + url: "https://pub.dev" + source: hosted + version: "1.1.1" + webdriver: + dependency: transitive + description: + name: webdriver + sha256: "3d773670966f02a646319410766d3b5e1037efb7f07cc68f844d5e06cd4d61c8" + url: "https://pub.dev" + source: hosted + version: "3.0.4" +sdks: + dart: ">=3.7.0-0 <4.0.0" + flutter: ">=3.27.0" diff --git a/mapbox_maps_flutter_v3/example/pubspec.yaml b/mapbox_maps_flutter_v3/example/pubspec.yaml new file mode 100644 index 000000000..a5a7b421a --- /dev/null +++ b/mapbox_maps_flutter_v3/example/pubspec.yaml @@ -0,0 +1,93 @@ +name: mapbox_maps_flutter_v3_example +description: "Demonstrates how to use the mapbox_maps_flutter_v3 plugin." +# The following line prevents the package from being accidentally published to +# pub.dev using `flutter pub publish`. This is preferred for private packages. +publish_to: 'none' # Remove this line if you wish to publish to pub.dev + +environment: + sdk: ">=3.6.0 <4.0.0" + +# Dependencies specify other packages that your package needs in order to work. +# To automatically upgrade your package dependencies to the latest versions +# consider running `flutter pub upgrade --major-versions`. Alternatively, +# dependencies can be manually updated by changing the version numbers below to +# the latest version available on pub.dev. To see which dependencies have newer +# versions available, run `flutter pub outdated`. +dependencies: + flutter: + sdk: flutter + + mapbox_maps_flutter_v3: + # When depending on this package from a real application you should use: + # mapbox_maps_flutter_v3: ^x.y.z + # See https://dart.dev/tools/pub/dependencies#version-constraints + # The example app is bundled with the plugin so we use a path dependency on + # the parent directory to use the current plugin's version. + path: ../ + + # The following adds the Cupertino Icons font to your application. + # Use with the CupertinoIcons class for iOS style icons. + cupertino_icons: ^1.0.8 + +dependency_overrides: + mapbox_maps_flutter_interface: + path: ../../mapbox_maps_flutter_interface + mapbox_maps_flutter: + path: ../../mapbox_maps_flutter_mobile + mapbox_maps_flutter_web: + path: ../../mapbox_maps_flutter_web + +dev_dependencies: + integration_test: + sdk: flutter + flutter_test: + sdk: flutter + + # The "flutter_lints" package below contains a set of recommended lints to + # encourage good coding practices. The lint set provided by the package is + # activated in the `analysis_options.yaml` file located at the root of your + # package. See that file for information about deactivating specific lint + # rules and activating additional ones. + flutter_lints: ^5.0.0 + +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +# The following section is specific to Flutter packages. +flutter: + + # The following line ensures that the Material Icons font is + # included with your application, so that you can use the icons in + # the material Icons class. + uses-material-design: true + + # To add assets to your application, add an assets section, like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/to/resolution-aware-images + + # For details regarding adding assets from package dependencies, see + # https://flutter.dev/to/asset-from-package + + # To add custom fonts to your application, add a fonts section here, + # in this "flutter" section. Each entry in this list should have a + # "family" key with the font family name, and a "fonts" key with a + # list giving the asset and other descriptors for the font. For + # example: + # fonts: + # - family: Schyler + # fonts: + # - asset: fonts/Schyler-Regular.ttf + # - asset: fonts/Schyler-Italic.ttf + # style: italic + # - family: Trajan Pro + # fonts: + # - asset: fonts/TrajanPro.ttf + # - asset: fonts/TrajanPro_Bold.ttf + # weight: 700 + # + # For details regarding fonts from package dependencies, + # see https://flutter.dev/to/font-from-package diff --git a/mapbox_maps_flutter_v3/example/web/favicon.png b/mapbox_maps_flutter_v3/example/web/favicon.png new file mode 100644 index 000000000..8aaa46ac1 Binary files /dev/null and b/mapbox_maps_flutter_v3/example/web/favicon.png differ diff --git a/mapbox_maps_flutter_v3/example/web/icons/Icon-192.png b/mapbox_maps_flutter_v3/example/web/icons/Icon-192.png new file mode 100644 index 000000000..b749bfef0 Binary files /dev/null and b/mapbox_maps_flutter_v3/example/web/icons/Icon-192.png differ diff --git a/mapbox_maps_flutter_v3/example/web/icons/Icon-512.png b/mapbox_maps_flutter_v3/example/web/icons/Icon-512.png new file mode 100644 index 000000000..88cfd48df Binary files /dev/null and b/mapbox_maps_flutter_v3/example/web/icons/Icon-512.png differ diff --git a/mapbox_maps_flutter_v3/example/web/icons/Icon-maskable-192.png b/mapbox_maps_flutter_v3/example/web/icons/Icon-maskable-192.png new file mode 100644 index 000000000..eb9b4d76e Binary files /dev/null and b/mapbox_maps_flutter_v3/example/web/icons/Icon-maskable-192.png differ diff --git a/mapbox_maps_flutter_v3/example/web/icons/Icon-maskable-512.png b/mapbox_maps_flutter_v3/example/web/icons/Icon-maskable-512.png new file mode 100644 index 000000000..d69c56691 Binary files /dev/null and b/mapbox_maps_flutter_v3/example/web/icons/Icon-maskable-512.png differ diff --git a/mapbox_maps_flutter_v3/example/web/index.html b/mapbox_maps_flutter_v3/example/web/index.html new file mode 100644 index 000000000..7e6a28bb8 --- /dev/null +++ b/mapbox_maps_flutter_v3/example/web/index.html @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + mapbox_maps_flutter_v3_example + + + + + + + + diff --git a/mapbox_maps_flutter_v3/example/web/manifest.json b/mapbox_maps_flutter_v3/example/web/manifest.json new file mode 100644 index 000000000..bfbc8e97c --- /dev/null +++ b/mapbox_maps_flutter_v3/example/web/manifest.json @@ -0,0 +1,35 @@ +{ + "name": "mapbox_maps_flutter_v3_example", + "short_name": "mapbox_maps_flutter_v3_example", + "start_url": ".", + "display": "standalone", + "background_color": "#0175C2", + "theme_color": "#0175C2", + "description": "Demonstrates how to use the mapbox_maps_flutter_v3 plugin.", + "orientation": "portrait-primary", + "prefer_related_applications": false, + "icons": [ + { + "src": "icons/Icon-192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "icons/Icon-512.png", + "sizes": "512x512", + "type": "image/png" + }, + { + "src": "icons/Icon-maskable-192.png", + "sizes": "192x192", + "type": "image/png", + "purpose": "maskable" + }, + { + "src": "icons/Icon-maskable-512.png", + "sizes": "512x512", + "type": "image/png", + "purpose": "maskable" + } + ] +} diff --git a/mapbox_maps_flutter_v3/ios/.gitignore b/mapbox_maps_flutter_v3/ios/.gitignore new file mode 100644 index 000000000..034771fc9 --- /dev/null +++ b/mapbox_maps_flutter_v3/ios/.gitignore @@ -0,0 +1,38 @@ +.idea/ +.vagrant/ +.sconsign.dblite +.svn/ + +.DS_Store +*.swp +profile + +DerivedData/ +build/ +GeneratedPluginRegistrant.h +GeneratedPluginRegistrant.m + +.generated/ + +*.pbxuser +*.mode1v3 +*.mode2v3 +*.perspectivev3 + +!default.pbxuser +!default.mode1v3 +!default.mode2v3 +!default.perspectivev3 + +xcuserdata + +*.moved-aside + +*.pyc +*sync/ +Icon? +.tags* + +/Flutter/Generated.xcconfig +/Flutter/ephemeral/ +/Flutter/flutter_export_environment.sh diff --git a/mapbox_maps_flutter_v3/ios/mapbox_maps_flutter_v3.podspec b/mapbox_maps_flutter_v3/ios/mapbox_maps_flutter_v3.podspec new file mode 100644 index 000000000..0a0b20abf --- /dev/null +++ b/mapbox_maps_flutter_v3/ios/mapbox_maps_flutter_v3.podspec @@ -0,0 +1,29 @@ +# +# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html. +# Run `pod lib lint mapbox_maps_flutter_v3.podspec` to validate before publishing. +# +Pod::Spec.new do |s| + s.name = 'mapbox_maps_flutter_v3' + s.version = '0.0.1' + s.summary = 'A new Flutter plugin project.' + s.description = <<-DESC +A new Flutter plugin project. + DESC + s.homepage = 'http://example.com' + s.license = { :file => '../LICENSE' } + s.author = { 'Your Company' => 'email@example.com' } + s.source = { :path => '.' } + s.source_files = 'mapbox_maps_flutter_v3/Sources/mapbox_maps_flutter_v3/**/*' + s.dependency 'Flutter' + s.platform = :ios, '12.0' + + # Flutter.framework does not contain a i386 slice. + s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' } + s.swift_version = '5.0' + + # If your plugin requires a privacy manifest, for example if it uses any + # required reason APIs, update the PrivacyInfo.xcprivacy file to describe your + # plugin's privacy impact, and then uncomment this line. For more information, + # see https://developer.apple.com/documentation/bundleresources/privacy_manifest_files + # s.resource_bundles = {'mapbox_maps_flutter_v3_privacy' => ['mapbox_maps_flutter_v3/Sources/mapbox_maps_flutter_v3/PrivacyInfo.xcprivacy']} +end diff --git a/mapbox_maps_flutter_v3/ios/mapbox_maps_flutter_v3/Package.swift b/mapbox_maps_flutter_v3/ios/mapbox_maps_flutter_v3/Package.swift new file mode 100644 index 000000000..c5f0a5e10 --- /dev/null +++ b/mapbox_maps_flutter_v3/ios/mapbox_maps_flutter_v3/Package.swift @@ -0,0 +1,32 @@ +// swift-tools-version: 5.9 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "mapbox_maps_flutter_v3", + platforms: [ + .iOS("12.0") + ], + products: [ + .library(name: "mapbox-maps-flutter-v3", targets: ["mapbox_maps_flutter_v3"]) + ], + dependencies: [], + targets: [ + .target( + name: "mapbox_maps_flutter_v3", + dependencies: [], + resources: [ + // If your plugin requires a privacy manifest, for example if it uses any required + // reason APIs, update the PrivacyInfo.xcprivacy file to describe your plugin's + // privacy impact, and then uncomment these lines. For more information, see + // https://developer.apple.com/documentation/bundleresources/privacy_manifest_files + // .process("PrivacyInfo.xcprivacy"), + + // If you have other resources that need to be bundled with your plugin, refer to + // the following instructions to add them: + // https://developer.apple.com/documentation/xcode/bundling-resources-with-a-swift-package + ] + ) + ] +) diff --git a/mapbox_maps_flutter_v3/ios/mapbox_maps_flutter_v3/Sources/mapbox_maps_flutter_v3/MapboxMapsFlutterV3Plugin.swift b/mapbox_maps_flutter_v3/ios/mapbox_maps_flutter_v3/Sources/mapbox_maps_flutter_v3/MapboxMapsFlutterV3Plugin.swift new file mode 100644 index 000000000..39f6ca50a --- /dev/null +++ b/mapbox_maps_flutter_v3/ios/mapbox_maps_flutter_v3/Sources/mapbox_maps_flutter_v3/MapboxMapsFlutterV3Plugin.swift @@ -0,0 +1,19 @@ +import Flutter +import UIKit + +public class MapboxMapsFlutterV3Plugin: NSObject, FlutterPlugin { + public static func register(with registrar: FlutterPluginRegistrar) { + let channel = FlutterMethodChannel(name: "mapbox_maps_flutter_v3", binaryMessenger: registrar.messenger()) + let instance = MapboxMapsFlutterV3Plugin() + registrar.addMethodCallDelegate(instance, channel: channel) + } + + public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) { + switch call.method { + case "getPlatformVersion": + result("iOS " + UIDevice.current.systemVersion) + default: + result(FlutterMethodNotImplemented) + } + } +} diff --git a/mapbox_maps_flutter_v3/ios/mapbox_maps_flutter_v3/Sources/mapbox_maps_flutter_v3/PrivacyInfo.xcprivacy b/mapbox_maps_flutter_v3/ios/mapbox_maps_flutter_v3/Sources/mapbox_maps_flutter_v3/PrivacyInfo.xcprivacy new file mode 100644 index 000000000..a34b7e2e6 --- /dev/null +++ b/mapbox_maps_flutter_v3/ios/mapbox_maps_flutter_v3/Sources/mapbox_maps_flutter_v3/PrivacyInfo.xcprivacy @@ -0,0 +1,14 @@ + + + + + NSPrivacyTrackingDomains + + NSPrivacyAccessedAPITypes + + NSPrivacyCollectedDataTypes + + NSPrivacyTracking + + + diff --git a/mapbox_maps_flutter_v3/lib/mapbox_maps_flutter_v3.dart b/mapbox_maps_flutter_v3/lib/mapbox_maps_flutter_v3.dart new file mode 100644 index 000000000..641ee72f2 --- /dev/null +++ b/mapbox_maps_flutter_v3/lib/mapbox_maps_flutter_v3.dart @@ -0,0 +1,6 @@ +library; + +export 'src/map_widget.dart'; +export 'src/mapbox_options.dart'; + +export 'package:mapbox_maps_flutter_interface/mapbox_maps_flutter_interface.dart'; diff --git a/mapbox_maps_flutter_v3/lib/src/map_widget.dart b/mapbox_maps_flutter_v3/lib/src/map_widget.dart new file mode 100644 index 000000000..5cc7f2e2a --- /dev/null +++ b/mapbox_maps_flutter_v3/lib/src/map_widget.dart @@ -0,0 +1,56 @@ +import 'package:flutter/widgets.dart'; +import 'package:mapbox_maps_flutter_interface/mapbox_maps_flutter_interface.dart'; + +typedef MapboxMap = MapboxMapInterface; + +/// A widget that displays a Mapbox map using the Mapbox Maps Flutter SDK. +/// +/// You use this class to display map information and to manipulate the map contents from your application. +/// You can center the map on a given coordinate, specify the size of the area you want to display, +/// and style the features of the map to fit your application's use case. +/// +/// Use of MapWidget requires a Mapbox API access token. +/// Obtain an access token on the [Mapbox account page](https://www.mapbox.com/studio/account/tokens/). +/// +/// Warning: Please note that you are responsible for getting permission to use the map data, +/// and for ensuring your use adheres to the relevant terms of use. +/// +/// ### Example: +/// ```dart +/// MapWidget( +/// cameraOptions: CameraOptions( +/// center: Point(37.7749, -122.4194), +/// zoom: 12.0, +/// ), +/// onMapCreated: (mapboxMap) { +/// // Handle map creation logic here. +/// }, +/// ) +/// ``` +class MapWidget extends StatelessWidget { + final MapboxMapsFlutterPlatform _platform; + + /// The initial Camera options when creating a MapWidget. + final CameraOptions? cameraOptions; + + /// Callback that is triggered when the map has been successfully created. + /// + /// This provides an opportunity to perform additional setup or configuration + /// once the map is ready. The [OnMapCreated] callback can be used to access + /// the [MapboxMap] instance and interact with it. + final OnMapCreated? onMapCreated; + + MapWidget({ + super.key, + this.cameraOptions, + this.onMapCreated, + }) : _platform = MapboxMapsFlutterPlatform.instance; + + @override + Widget build(BuildContext context) { + return _platform.buildView( + cameraOptions: cameraOptions, + onMapCreated: onMapCreated, + ); + } +} diff --git a/mapbox_maps_flutter_v3/lib/src/mapbox_options.dart b/mapbox_maps_flutter_v3/lib/src/mapbox_options.dart new file mode 100644 index 000000000..a179cfd34 --- /dev/null +++ b/mapbox_maps_flutter_v3/lib/src/mapbox_options.dart @@ -0,0 +1,22 @@ +import 'package:mapbox_maps_flutter_interface/mapbox_maps_flutter_interface.dart'; + +/// A class that provides options and configurations for Mapbox services. +/// +/// This class includes methods to get and set the public access token, which is +/// required to access Mapbox resources. The access token can be retrieved or +/// updated using the static methods provided. +final class MapboxOptions { + /// The public access token that is used to access resources provided by Mapbox services. + /// For more information about public access tokens, see + /// [Mapbox Access Tokens](https://docs.mapbox.com/help/getting-started/access-tokens/#public-tokens). + static Future get accessToken async { + return MapboxMapsFlutterPlatform.instance.getAccessToken(); + } + + /// The public access token that is used to access resources provided by Mapbox services. + /// For more information about public access tokens, see + /// [Mapbox Access Tokens](https://docs.mapbox.com/help/getting-started/access-tokens/#public-tokens). + static setAccessToken(String token) { + MapboxMapsFlutterPlatform.instance.setAccessToken(token); + } +} diff --git a/mapbox_maps_flutter_v3/pubspec.yaml b/mapbox_maps_flutter_v3/pubspec.yaml new file mode 100644 index 000000000..b814f5c1b --- /dev/null +++ b/mapbox_maps_flutter_v3/pubspec.yaml @@ -0,0 +1,67 @@ +name: mapbox_maps_flutter_v3 # Update this name +description: "A new Flutter package project." +version: 0.0.1 +homepage: + +environment: + sdk: ">=3.6.0 <4.0.0" + flutter: ">=1.17.0" + +resolution: workspace + +dependencies: + flutter: + sdk: flutter + mapbox_maps_flutter: any # Update this + mapbox_maps_flutter_interface: any + mapbox_maps_flutter_web: any + +dev_dependencies: + flutter_test: + sdk: flutter + flutter_lints: ^5.0.0 + +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +# The following section is specific to Flutter packages. +flutter: + plugin: + platforms: + android: + default_package: mapbox_maps_flutter + ios: + default_package: mapbox_maps_flutter + web: + default_package: mapbox_maps_flutter_web + + # To add assets to your package, add an assets section, like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + # + # For details regarding assets in packages, see + # https://flutter.dev/to/asset-from-package + # + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/to/resolution-aware-images + + # To add custom fonts to your package, add a fonts section here, + # in this "flutter" section. Each entry in this list should have a + # "family" key with the font family name, and a "fonts" key with a + # list giving the asset and other descriptors for the font. For + # example: + # fonts: + # - family: Schyler + # fonts: + # - asset: fonts/Schyler-Regular.ttf + # - asset: fonts/Schyler-Italic.ttf + # style: italic + # - family: Trajan Pro + # fonts: + # - asset: fonts/TrajanPro.ttf + # - asset: fonts/TrajanPro_Bold.ttf + # weight: 700 + # + # For details regarding fonts in packages, see + # https://flutter.dev/to/font-from-package diff --git a/mapbox_maps_flutter_web/.gitignore b/mapbox_maps_flutter_web/.gitignore new file mode 100644 index 000000000..e7d347d9d --- /dev/null +++ b/mapbox_maps_flutter_web/.gitignore @@ -0,0 +1,33 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.build/ +.buildlog/ +.history +.svn/ +.swiftpm/ +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/ +.flutter-plugins +.flutter-plugins-dependencies +build/ diff --git a/mapbox_maps_flutter_web/.metadata b/mapbox_maps_flutter_web/.metadata new file mode 100644 index 000000000..b0ba0f55c --- /dev/null +++ b/mapbox_maps_flutter_web/.metadata @@ -0,0 +1,30 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "c23637390482d4cf9598c3ce3f2be31aa7332daf" + channel: "stable" + +project_type: plugin + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf + base_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf + - platform: web + create_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf + base_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - 'lib/main.dart' + - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/mapbox_maps_flutter_web/CHANGELOG.md b/mapbox_maps_flutter_web/CHANGELOG.md new file mode 100644 index 000000000..41cc7d819 --- /dev/null +++ b/mapbox_maps_flutter_web/CHANGELOG.md @@ -0,0 +1,3 @@ +## 0.0.1 + +* TODO: Describe initial release. diff --git a/mapbox_maps_flutter_web/LICENSE b/mapbox_maps_flutter_web/LICENSE new file mode 100644 index 000000000..ba75c69f7 --- /dev/null +++ b/mapbox_maps_flutter_web/LICENSE @@ -0,0 +1 @@ +TODO: Add your license here. diff --git a/mapbox_maps_flutter_web/README.md b/mapbox_maps_flutter_web/README.md new file mode 100644 index 000000000..5ec24a4cf --- /dev/null +++ b/mapbox_maps_flutter_web/README.md @@ -0,0 +1,15 @@ +# mapbox_maps_flutter_web + +A new Flutter plugin project. + +## Getting Started + +This project is a starting point for a Flutter +[plug-in package](https://flutter.dev/to/develop-plugins), +a specialized package that includes platform-specific implementation code for +Android and/or iOS. + +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. + diff --git a/mapbox_maps_flutter_web/analysis_options.yaml b/mapbox_maps_flutter_web/analysis_options.yaml new file mode 100644 index 000000000..a5744c1cf --- /dev/null +++ b/mapbox_maps_flutter_web/analysis_options.yaml @@ -0,0 +1,4 @@ +include: package:flutter_lints/flutter.yaml + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/mapbox_maps_flutter_web/example/.gitignore b/mapbox_maps_flutter_web/example/.gitignore new file mode 100644 index 000000000..79c113f9b --- /dev/null +++ b/mapbox_maps_flutter_web/example/.gitignore @@ -0,0 +1,45 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.build/ +.buildlog/ +.history +.svn/ +.swiftpm/ +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 diff --git a/mapbox_maps_flutter_web/example/README.md b/mapbox_maps_flutter_web/example/README.md new file mode 100644 index 000000000..7effe2a48 --- /dev/null +++ b/mapbox_maps_flutter_web/example/README.md @@ -0,0 +1,16 @@ +# mapbox_maps_flutter_web_example + +Demonstrates how to use the mapbox_maps_flutter_web 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. diff --git a/mapbox_maps_flutter_web/example/analysis_options.yaml b/mapbox_maps_flutter_web/example/analysis_options.yaml new file mode 100644 index 000000000..0d2902135 --- /dev/null +++ b/mapbox_maps_flutter_web/example/analysis_options.yaml @@ -0,0 +1,28 @@ +# 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.dev/lints. + # + # 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 diff --git a/mapbox_maps_flutter_web/example/lib/main.dart b/mapbox_maps_flutter_web/example/lib/main.dart new file mode 100644 index 000000000..7446474ed --- /dev/null +++ b/mapbox_maps_flutter_web/example/lib/main.dart @@ -0,0 +1,56 @@ +import 'package:flutter/material.dart'; +import 'dart:async'; + +import 'package:flutter/services.dart'; + +void main() { + runApp(const MyApp()); +} + +class MyApp extends StatefulWidget { + const MyApp({super.key}); + + @override + State createState() => _MyAppState(); +} + +class _MyAppState extends State { + String _platformVersion = 'Unknown'; + + @override + void initState() { + super.initState(); + initPlatformState(); + } + + // Platform messages are asynchronous, so we initialize in an async method. + Future initPlatformState() async { + String platformVersion; + // Platform messages may fail, so we use a try/catch PlatformException. + // We also handle the message potentially returning null. + try { + platformVersion = 'Unknown platform version'; + } on PlatformException { + platformVersion = 'Failed to get platform version.'; + } + + // If the widget was removed from the tree while the asynchronous platform + // message was in flight, we want to discard the reply rather than calling + // setState to update our non-existent appearance. + if (!mounted) return; + + setState(() { + _platformVersion = platformVersion; + }); + } + + @override + Widget build(BuildContext context) { + return MaterialApp( + home: Scaffold( + appBar: AppBar(title: const Text('Plugin example app')), + body: Center(child: Text('Running on: $_platformVersion\n')), + ), + ); + } +} diff --git a/mapbox_maps_flutter_web/example/pubspec.lock b/mapbox_maps_flutter_web/example/pubspec.lock new file mode 100644 index 000000000..d7ec1b519 --- /dev/null +++ b/mapbox_maps_flutter_web/example/pubspec.lock @@ -0,0 +1,383 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + args: + dependency: transitive + description: + name: args + sha256: d0481093c50b1da8910eb0bb301626d4d8eb7284aa739614d2b394ee09e3ea04 + url: "https://pub.dev" + source: hosted + version: "2.7.0" + async: + dependency: transitive + description: + name: async + sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63 + url: "https://pub.dev" + source: hosted + version: "2.12.0" + benchmark: + dependency: transitive + description: + name: benchmark + sha256: cb3eeea01e3f054df76ee9775ca680f3afa5f19f39b2bb426ba78ba27654493b + url: "https://pub.dev" + source: hosted + version: "0.3.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + characters: + dependency: transitive + description: + name: characters + sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 + url: "https://pub.dev" + source: hosted + version: "1.4.0" + clock: + dependency: transitive + description: + name: clock + sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b + url: "https://pub.dev" + source: hosted + version: "1.1.2" + collection: + dependency: transitive + description: + name: collection + sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" + url: "https://pub.dev" + source: hosted + version: "1.19.1" + cupertino_icons: + dependency: "direct main" + description: + name: cupertino_icons + sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 + url: "https://pub.dev" + source: hosted + version: "1.0.8" + dart_sort_queue: + dependency: transitive + description: + name: dart_sort_queue + sha256: f3353ba8b4850e072d3368757f62edb79af34a9703c3e3df9c59342721f5f5b1 + url: "https://pub.dev" + source: hosted + version: "0.0.2+3" + fake_async: + dependency: transitive + description: + name: fake_async + sha256: "6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc" + url: "https://pub.dev" + source: hosted + version: "1.3.2" + file: + dependency: transitive + description: + name: file + sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 + url: "https://pub.dev" + source: hosted + version: "7.0.1" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_driver: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1" + url: "https://pub.dev" + source: hosted + version: "5.0.0" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + fuchsia_remote_debug_protocol: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + geotypes: + dependency: transitive + description: + name: geotypes + sha256: "5bedf57de92283133dd221e363812ef50eaaba414f0823b1974ef7d84b86991f" + url: "https://pub.dev" + source: hosted + version: "0.0.2" + integration_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + json_annotation: + dependency: transitive + description: + name: json_annotation + sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" + url: "https://pub.dev" + source: hosted + version: "4.9.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec + url: "https://pub.dev" + source: hosted + version: "10.0.8" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 + url: "https://pub.dev" + source: hosted + version: "3.0.9" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" + lints: + dependency: transitive + description: + name: lints + sha256: c35bb79562d980e9a453fc715854e1ed39e24e7d0297a880ef54e17f9874a9d7 + url: "https://pub.dev" + source: hosted + version: "5.1.1" + mapbox_maps_flutter_interface: + dependency: "direct overridden" + description: + path: "../../mapbox_maps_flutter_interface" + relative: true + source: path + version: "0.0.1" + mapbox_maps_flutter_web: + dependency: "direct main" + description: + path: ".." + relative: true + source: path + version: "0.0.1" + matcher: + dependency: transitive + description: + name: matcher + sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 + url: "https://pub.dev" + source: hosted + version: "0.12.17" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec + url: "https://pub.dev" + source: hosted + version: "0.11.1" + meta: + dependency: transitive + description: + name: meta + sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c + url: "https://pub.dev" + source: hosted + version: "1.16.0" + path: + dependency: transitive + description: + name: path + sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" + url: "https://pub.dev" + source: hosted + version: "1.9.1" + platform: + dependency: transitive + description: + name: platform + sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984" + url: "https://pub.dev" + source: hosted + version: "3.1.6" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" + url: "https://pub.dev" + source: hosted + version: "2.1.8" + process: + dependency: transitive + description: + name: process + sha256: "107d8be718f120bbba9dcd1e95e3bd325b1b4a4f07db64154635ba03f2567a0d" + url: "https://pub.dev" + source: hosted + version: "5.0.3" + rbush: + dependency: transitive + description: + name: rbush + sha256: "48b683421b4afb43a642f82c6aa31911e54f3069143d31c7d33cbe329df13403" + url: "https://pub.dev" + source: hosted + version: "1.1.1" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + source_span: + dependency: transitive + description: + name: source_span + sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c" + url: "https://pub.dev" + source: hosted + version: "1.10.1" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" + url: "https://pub.dev" + source: hosted + version: "1.12.1" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" + url: "https://pub.dev" + source: hosted + version: "1.4.1" + sweepline_intersections: + dependency: transitive + description: + name: sweepline_intersections + sha256: a665c707200a4f07140a4029b41a7c4883beb3f04322cd8e08ebf650f69e1176 + url: "https://pub.dev" + source: hosted + version: "0.0.4" + sync_http: + dependency: transitive + description: + name: sync_http + sha256: "7f0cd72eca000d2e026bcd6f990b81d0ca06022ef4e32fb257b30d3d1014a961" + url: "https://pub.dev" + source: hosted + version: "0.3.1" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" + url: "https://pub.dev" + source: hosted + version: "1.2.2" + test_api: + dependency: transitive + description: + name: test_api + sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd + url: "https://pub.dev" + source: hosted + version: "0.7.4" + turf: + dependency: transitive + description: + name: turf + sha256: "75347c45a5c1de805db7cb182286f05a3770e01546626c4dc292709d15cbe436" + url: "https://pub.dev" + source: hosted + version: "0.0.10" + turf_equality: + dependency: transitive + description: + name: turf_equality + sha256: f0f44ffe389547941358e0d3d4a747db2bd56115b32ff1cede5e5bdf3126a3e2 + url: "https://pub.dev" + source: hosted + version: "0.1.0" + turf_pip: + dependency: transitive + description: + name: turf_pip + sha256: ba4fd414baffd5d7b30880658ad6db82461c49ec023f8ffd0c23d398ad8b14be + url: "https://pub.dev" + source: hosted + version: "0.0.2" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: "0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14" + url: "https://pub.dev" + source: hosted + version: "14.3.1" + web: + dependency: transitive + description: + name: web + sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a" + url: "https://pub.dev" + source: hosted + version: "1.1.1" + webdriver: + dependency: transitive + description: + name: webdriver + sha256: "3d773670966f02a646319410766d3b5e1037efb7f07cc68f844d5e06cd4d61c8" + url: "https://pub.dev" + source: hosted + version: "3.0.4" +sdks: + dart: ">=3.7.0-0 <4.0.0" + flutter: ">=3.18.0-18.0.pre.54" diff --git a/mapbox_maps_flutter_web/example/pubspec.yaml b/mapbox_maps_flutter_web/example/pubspec.yaml new file mode 100644 index 000000000..c11ef9d20 --- /dev/null +++ b/mapbox_maps_flutter_web/example/pubspec.yaml @@ -0,0 +1,89 @@ +name: mapbox_maps_flutter_web_example +description: "Demonstrates how to use the mapbox_maps_flutter_web plugin." +# The following line prevents the package from being accidentally published to +# pub.dev using `flutter pub publish`. This is preferred for private packages. +publish_to: 'none' # Remove this line if you wish to publish to pub.dev + +environment: + sdk: ">=3.6.0 <4.0.0" + +# Dependencies specify other packages that your package needs in order to work. +# To automatically upgrade your package dependencies to the latest versions +# consider running `flutter pub upgrade --major-versions`. Alternatively, +# dependencies can be manually updated by changing the version numbers below to +# the latest version available on pub.dev. To see which dependencies have newer +# versions available, run `flutter pub outdated`. +dependencies: + flutter: + sdk: flutter + + mapbox_maps_flutter_web: + # When depending on this package from a real application you should use: + # mapbox_maps_flutter_web: ^x.y.z + # See https://dart.dev/tools/pub/dependencies#version-constraints + # The example app is bundled with the plugin so we use a path dependency on + # the parent directory to use the current plugin's version. + path: ../ + + # The following adds the Cupertino Icons font to your application. + # Use with the CupertinoIcons class for iOS style icons. + cupertino_icons: ^1.0.8 + +dependency_overrides: + mapbox_maps_flutter_interface: + path: ../../mapbox_maps_flutter_interface + +dev_dependencies: + integration_test: + sdk: flutter + flutter_test: + sdk: flutter + + # The "flutter_lints" package below contains a set of recommended lints to + # encourage good coding practices. The lint set provided by the package is + # activated in the `analysis_options.yaml` file located at the root of your + # package. See that file for information about deactivating specific lint + # rules and activating additional ones. + flutter_lints: ^5.0.0 + +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +# The following section is specific to Flutter packages. +flutter: + + # The following line ensures that the Material Icons font is + # included with your application, so that you can use the icons in + # the material Icons class. + uses-material-design: true + + # To add assets to your application, add an assets section, like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/to/resolution-aware-images + + # For details regarding adding assets from package dependencies, see + # https://flutter.dev/to/asset-from-package + + # To add custom fonts to your application, add a fonts section here, + # in this "flutter" section. Each entry in this list should have a + # "family" key with the font family name, and a "fonts" key with a + # list giving the asset and other descriptors for the font. For + # example: + # fonts: + # - family: Schyler + # fonts: + # - asset: fonts/Schyler-Regular.ttf + # - asset: fonts/Schyler-Italic.ttf + # style: italic + # - family: Trajan Pro + # fonts: + # - asset: fonts/TrajanPro.ttf + # - asset: fonts/TrajanPro_Bold.ttf + # weight: 700 + # + # For details regarding fonts from package dependencies, + # see https://flutter.dev/to/font-from-package diff --git a/mapbox_maps_flutter_web/example/test/widget_test.dart b/mapbox_maps_flutter_web/example/test/widget_test.dart new file mode 100644 index 000000000..df76b5acc --- /dev/null +++ b/mapbox_maps_flutter_web/example/test/widget_test.dart @@ -0,0 +1,27 @@ +// This is a basic Flutter widget test. +// +// To perform an interaction with a widget in your test, use the WidgetTester +// utility in the flutter_test package. For example, you can send tap and scroll +// gestures. You can also use WidgetTester to find child widgets in the widget +// tree, read text, and verify that the values of widget properties are correct. + +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; + +import 'package:mapbox_maps_flutter_web_example/main.dart'; + +void main() { + testWidgets('Verify Platform version', (WidgetTester tester) async { + // Build our app and trigger a frame. + await tester.pumpWidget(const MyApp()); + + // Verify that platform version is retrieved. + expect( + find.byWidgetPredicate( + (Widget widget) => + widget is Text && widget.data!.startsWith('Running on:'), + ), + findsOneWidget, + ); + }); +} diff --git a/mapbox_maps_flutter_web/example/web/favicon.png b/mapbox_maps_flutter_web/example/web/favicon.png new file mode 100644 index 000000000..8aaa46ac1 Binary files /dev/null and b/mapbox_maps_flutter_web/example/web/favicon.png differ diff --git a/mapbox_maps_flutter_web/example/web/icons/Icon-192.png b/mapbox_maps_flutter_web/example/web/icons/Icon-192.png new file mode 100644 index 000000000..b749bfef0 Binary files /dev/null and b/mapbox_maps_flutter_web/example/web/icons/Icon-192.png differ diff --git a/mapbox_maps_flutter_web/example/web/icons/Icon-512.png b/mapbox_maps_flutter_web/example/web/icons/Icon-512.png new file mode 100644 index 000000000..88cfd48df Binary files /dev/null and b/mapbox_maps_flutter_web/example/web/icons/Icon-512.png differ diff --git a/mapbox_maps_flutter_web/example/web/icons/Icon-maskable-192.png b/mapbox_maps_flutter_web/example/web/icons/Icon-maskable-192.png new file mode 100644 index 000000000..eb9b4d76e Binary files /dev/null and b/mapbox_maps_flutter_web/example/web/icons/Icon-maskable-192.png differ diff --git a/mapbox_maps_flutter_web/example/web/icons/Icon-maskable-512.png b/mapbox_maps_flutter_web/example/web/icons/Icon-maskable-512.png new file mode 100644 index 000000000..d69c56691 Binary files /dev/null and b/mapbox_maps_flutter_web/example/web/icons/Icon-maskable-512.png differ diff --git a/mapbox_maps_flutter_web/example/web/index.html b/mapbox_maps_flutter_web/example/web/index.html new file mode 100644 index 000000000..f931ada07 --- /dev/null +++ b/mapbox_maps_flutter_web/example/web/index.html @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + mapbox_maps_flutter_web_example + + + + + + diff --git a/mapbox_maps_flutter_web/example/web/manifest.json b/mapbox_maps_flutter_web/example/web/manifest.json new file mode 100644 index 000000000..36814e864 --- /dev/null +++ b/mapbox_maps_flutter_web/example/web/manifest.json @@ -0,0 +1,35 @@ +{ + "name": "mapbox_maps_flutter_web_example", + "short_name": "mapbox_maps_flutter_web_example", + "start_url": ".", + "display": "standalone", + "background_color": "#0175C2", + "theme_color": "#0175C2", + "description": "Demonstrates how to use the mapbox_maps_flutter_web plugin.", + "orientation": "portrait-primary", + "prefer_related_applications": false, + "icons": [ + { + "src": "icons/Icon-192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "icons/Icon-512.png", + "sizes": "512x512", + "type": "image/png" + }, + { + "src": "icons/Icon-maskable-192.png", + "sizes": "192x192", + "type": "image/png", + "purpose": "maskable" + }, + { + "src": "icons/Icon-maskable-512.png", + "sizes": "512x512", + "type": "image/png", + "purpose": "maskable" + } + ] +} diff --git a/mapbox_maps_flutter_web/lib/mapbox_maps_flutter_web.dart b/mapbox_maps_flutter_web/lib/mapbox_maps_flutter_web.dart new file mode 100644 index 000000000..92498fdfe --- /dev/null +++ b/mapbox_maps_flutter_web/lib/mapbox_maps_flutter_web.dart @@ -0,0 +1,3 @@ +library; + +export 'src/mapbox_maps_flutter_web.dart'; diff --git a/mapbox_maps_flutter_web/lib/src/bindings.dart b/mapbox_maps_flutter_web/lib/src/bindings.dart new file mode 100644 index 000000000..2370856ea --- /dev/null +++ b/mapbox_maps_flutter_web/lib/src/bindings.dart @@ -0,0 +1,73 @@ +@JS('mapboxgl') +library; + +import 'dart:js_interop'; + +import 'package:web/web.dart'; + +@JS() +external String accessToken; + +@JS() +@anonymous +extension type LngLat._(JSObject _) implements JSObject { + external LngLat(num lng, num lat); + external num lat; + external num lng; +} + +@JS() +@anonymous +extension type CameraOptions._(JSObject _) implements JSObject { + external factory CameraOptions({ + LngLat? center, + PaddingOptions? padding, + double? zoom, + double? bearing, + double? pitch, + }); + external LngLat? center; + external PaddingOptions? padding; + external double? zoom; + external double? bearing; + external double? pitch; +} + +@JS() +@anonymous +extension type PaddingOptions._(JSObject _) implements JSObject { + external factory PaddingOptions({ + num top, + num left, + num bottom, + num right, + }); + external num top; + external num left; + external num bottom; + external num right; +} + +@JS() +@anonymous +extension type MapOptions._(JSObject _) implements JSObject { + external factory MapOptions({ + required HTMLDivElement container, + LngLat? center, + PaddingOptions? padding, + double? zoom, + double? bearing, + double? pitch, + }); +} + +extension type Map._(JSObject _) implements JSObject { + external Map(MapOptions container); + external void on(String event, JSFunction callback); + external void jumpTo(CameraOptions camera); + external LngLat getCenter(); + external PaddingOptions getPadding(); + external double getZoom(); + external double getBearing(); + external double getPitch(); +} diff --git a/mapbox_maps_flutter_web/lib/src/conversion.dart b/mapbox_maps_flutter_web/lib/src/conversion.dart new file mode 100644 index 000000000..1846add2e --- /dev/null +++ b/mapbox_maps_flutter_web/lib/src/conversion.dart @@ -0,0 +1,36 @@ +import 'package:mapbox_maps_flutter_interface/mapbox_maps_flutter_interface.dart'; +import 'package:mapbox_maps_flutter_web/src/bindings.dart'; + +extension PointToLngLat on Point { + LngLat toLngLat() { + return LngLat(coordinates.lng, coordinates.lat); + } +} + +extension LngLatToPoint on LngLat { + Point toPoint() { + return Point(coordinates: Position(lng, lat)); + } +} + +extension PaddingOptionsToMbxEdgeInsets on PaddingOptions { + MbxEdgeInsets toMbxEdgeInsets() { + return MbxEdgeInsets( + top: top.toDouble(), + left: left.toDouble(), + bottom: bottom.toDouble(), + right: right.toDouble(), + ); + } +} + +extension MbxEdgeInsetsToPaddingOptions on MbxEdgeInsets { + PaddingOptions toPaddingOptions() { + return PaddingOptions( + top: top, + left: left, + bottom: bottom, + right: right, + ); + } +} diff --git a/mapbox_maps_flutter_web/lib/src/mapbox_map.dart b/mapbox_maps_flutter_web/lib/src/mapbox_map.dart new file mode 100644 index 000000000..d68855d71 --- /dev/null +++ b/mapbox_maps_flutter_web/lib/src/mapbox_map.dart @@ -0,0 +1,43 @@ +import 'package:mapbox_maps_flutter_interface/mapbox_maps_flutter_interface.dart'; +import 'package:mapbox_maps_flutter_web/src/bindings.dart' as gl_js; +import 'package:mapbox_maps_flutter_web/src/conversion.dart'; + +final class MapboxMap extends MapboxMapInterface { + final gl_js.Map nativeMap; + + MapboxMap(this.nativeMap); + + @override + Future getCameraState() { + final camera = CameraState( + center: nativeMap.getCenter().toPoint(), + padding: nativeMap.getPadding().toMbxEdgeInsets(), + zoom: nativeMap.getZoom(), + bearing: nativeMap.getBearing(), + pitch: nativeMap.getPitch(), + ); + return Future.value(camera); + } + + @override + Future setCamera(CameraOptions cameraOptions) { + final options = gl_js.CameraOptions(); + if (cameraOptions.center != null) { + options.center = cameraOptions.center!.toLngLat(); + } + if (cameraOptions.padding != null) { + options.padding = cameraOptions.padding!.toPaddingOptions(); + } + if (cameraOptions.zoom != null) { + options.zoom = cameraOptions.zoom; + } + if (cameraOptions.bearing != null) { + options.bearing = cameraOptions.bearing; + } + if (cameraOptions.pitch != null) { + options.pitch = cameraOptions.pitch; + } + nativeMap.jumpTo(options); + return Future.value(); + } +} diff --git a/mapbox_maps_flutter_web/lib/src/mapbox_maps_flutter_web.dart b/mapbox_maps_flutter_web/lib/src/mapbox_maps_flutter_web.dart new file mode 100644 index 000000000..12b05b150 --- /dev/null +++ b/mapbox_maps_flutter_web/lib/src/mapbox_maps_flutter_web.dart @@ -0,0 +1,83 @@ +import 'dart:js_interop'; +import 'dart:ui_web'; + +import 'package:flutter/widgets.dart'; +import 'package:flutter_web_plugins/flutter_web_plugins.dart'; +import 'package:mapbox_maps_flutter_interface/mapbox_maps_flutter_interface.dart'; +import 'package:mapbox_maps_flutter_web/src/bindings.dart' as gl_js; +import 'package:mapbox_maps_flutter_web/src/conversion.dart'; +import 'package:mapbox_maps_flutter_web/src/mapbox_map.dart'; +import 'package:web/web.dart'; + +const mapboxGlCss = 'https://api.mapbox.com/mapbox-gl-js/v3.11.1/mapbox-gl.css'; + +base class MapboxMapsFlutterWeb extends MapboxMapsFlutterPlatform { + /// Registers the platform implementation. + static void registerWith(Registrar registrar) { + MapboxMapsFlutterPlatform.instance = MapboxMapsFlutterWeb(); + } + + late HTMLDivElement _mapElement; + + @override + Widget buildView({ + CameraOptions? cameraOptions, + OnMapCreated? onMapCreated, + }) { + final viewType = 'mapbox-maps-flutter-web/$hashCode'; + + // Attach the mapDiv to the DOM + platformViewRegistry.registerViewFactory(viewType, (int id) { + _mapElement = document.createElement("div") as HTMLDivElement + ..style.position = 'absolute' + ..style.top = '0' + ..style.bottom = '0' + ..style.height = '100%' + ..style.width = '100%'; + + _initMap( + cameraOptions: cameraOptions, + onMapCreated: onMapCreated, + ); + return _mapElement; + }); + return HtmlElementView(viewType: viewType); + } + + _initMap({ + CameraOptions? cameraOptions, + OnMapCreated? onMapCreated, + }) async { + final link = document.createElement('link') as HTMLLinkElement + ..rel = 'stylesheet' + ..href = mapboxGlCss + ..type = 'text/css'; + _mapElement.append(link); + + await link.onLoad.first; + + final options = gl_js.MapOptions( + container: _mapElement, + center: cameraOptions?.center?.toLngLat(), + padding: cameraOptions?.padding?.toPaddingOptions(), + zoom: cameraOptions?.zoom, + bearing: cameraOptions?.bearing, + pitch: cameraOptions?.pitch, + ); + final nativeMap = gl_js.Map(options); + + onMapCreated?.call(MapboxMap(nativeMap)); + + nativeMap.on('load', (() {}).toJS); + } + + @override + Future getAccessToken() { + return Future.value(gl_js.accessToken); + } + + @override + void setAccessToken(String token) { + gl_js.accessToken = token; + } +} diff --git a/mapbox_maps_flutter_web/pubspec.yaml b/mapbox_maps_flutter_web/pubspec.yaml new file mode 100644 index 000000000..b65089668 --- /dev/null +++ b/mapbox_maps_flutter_web/pubspec.yaml @@ -0,0 +1,77 @@ +name: mapbox_maps_flutter_web +description: "A new Flutter plugin project." +version: 0.0.1 +homepage: + +environment: + sdk: ">=3.6.0 <4.0.0" + flutter: '>=3.3.0' + +resolution: workspace + +dependencies: + flutter: + sdk: flutter + flutter_web_plugins: + sdk: flutter + web: ^1.0.0 + plugin_platform_interface: ^2.0.2 + mapbox_maps_flutter_interface: any + +dev_dependencies: + flutter_test: + sdk: flutter + flutter_lints: ^5.0.0 + +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +# The following section is specific to Flutter packages. +flutter: + # This section identifies this Flutter project as a plugin project. + # The 'pluginClass' specifies the class (in Java, Kotlin, Swift, Objective-C, etc.) + # which should be registered in the plugin registry. This is required for + # using method channels. + # The Android 'package' specifies package in which the registered class is. + # This is required for using method channels on Android. + # The 'ffiPlugin' specifies that native code should be built and bundled. + # This is required for using `dart:ffi`. + # All these are used by the tooling to maintain consistency when + # adding or updating assets for this project. + plugin: + platforms: + implements: mapbox_maps_flutter_interface + web: + pluginClass: MapboxMapsFlutterWeb + fileName: src/mapbox_maps_flutter_web.dart + + # To add assets to your plugin package, add an assets section, like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + # + # For details regarding assets in packages, see + # https://flutter.dev/to/asset-from-package + # + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/to/resolution-aware-images + + # To add custom fonts to your plugin package, add a fonts section here, + # in this "flutter" section. Each entry in this list should have a + # "family" key with the font family name, and a "fonts" key with a + # list giving the asset and other descriptors for the font. For + # example: + # fonts: + # - family: Schyler + # fonts: + # - asset: fonts/Schyler-Regular.ttf + # - asset: fonts/Schyler-Italic.ttf + # style: italic + # - family: Trajan Pro + # fonts: + # - asset: fonts/TrajanPro.ttf + # - asset: fonts/TrajanPro_Bold.ttf + # weight: 700 + # + # For details regarding fonts in packages, see + # https://flutter.dev/to/font-from-package diff --git a/pubspec.yaml b/pubspec.yaml index 72055aa75..b1497aef4 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,37 +1,19 @@ -name: mapbox_maps_flutter -description: Interactive, thoroughly customizable maps powered by Mapbox Maps mobile SDKs. -version: 2.9.0 -homepage: https://github.com/mapbox/mapbox-maps-flutter - +name: _ +publish_to: none environment: - sdk: ">=3.4.4 <4.0.0" - flutter: ">=3.22.3" + sdk: ">=3.6.0 <4.0.0" +workspace: + - mapbox_maps_flutter_mobile + - mapbox_maps_flutter_interface + - mapbox_maps_flutter_web + - mapbox_maps_flutter_v3 dependencies: - flutter: - sdk: flutter - flutter_plugin_android_lifecycle: ^2.0.5 - turf: ^0.0.8 - typed_data: ^1.3.0 - meta: ^1.9.1 - -dev_dependencies: - integration_test: - sdk: flutter - flutter_test: - sdk: flutter - test: ^1.19.0 - flutter_lints: ^5.0.0 - -# For information on the generic Dart part of this file, see the -# following page: https://dart.dev/tools/pub/pubspec - -# The following section is specific to Flutter. -flutter: - plugin: - platforms: - android: - package: com.mapbox.maps.mapbox_maps - pluginClass: MapboxMapsPlugin - ios: - pluginClass: MapboxMapsPlugin + mapbox_maps_flutter: + path: mapbox_maps_flutter_mobile + mapbox_maps_flutter_interface: + path: mapbox_maps_flutter_interface + mapbox_maps_flutter_web: + path: mapbox_maps_flutter_web + mapbox_maps_flutter_v3: + path: mapbox_maps_flutter_v3 \ No newline at end of file diff --git a/scripts/check_test_suite.dart b/scripts/check_test_suite.dart index 316a4d559..c4ad7b23f 100644 --- a/scripts/check_test_suite.dart +++ b/scripts/check_test_suite.dart @@ -32,15 +32,18 @@ void main() { .where((testFile) => !includedTestFiles.contains(testFile)) .toList(); - missingTests.remove('all_test.dart'); // Exclude the aggregated test suite file itself + missingTests + .remove('all_test.dart'); // Exclude the aggregated test suite file itself if (missingTests.isNotEmpty) { - print('The following test files are missing from the aggregated test suite:'); + print( + 'The following test files are missing from the aggregated test suite:'); for (var missingTest in missingTests) { print(missingTest); } print(''); - print('Import the missing test files in the integration_test/all_test.dart.'); + print( + 'Import the missing test files in the integration_test/all_test.dart.'); print("Don't forget to invoke the main function of the test file as well."); exit(1); // Exit with error code 1 if there are missing tests } else { diff --git a/scripts/license.sh b/scripts/license.sh index fc8b3e236..c7c2fe5b8 100755 --- a/scripts/license.sh +++ b/scripts/license.sh @@ -3,45 +3,55 @@ set -eou pipefail # Function to display usage information usage() { - echo "Usage: $0 --mode " + echo "Usage: $0 --mode " exit 1 } mode="generate" + +# Check if exactly two arguments are provided +if [ "$#" -ne 2 ]; then + echo "Usage: $0 --mode=[generate|validate]" + exit 1 +fi + +PACKAGE_NAME="$1" +MODE="$2" + +# Extract the mode value +if [[ "$MODE" =~ --mode[=\ ]?(generate|validate) ]]; then + MODE="${BASH_REMATCH[1]}" +else + echo "Invalid mode. Use --mode generate or --mode validate" + exit 1 +fi + # Fetch the dependencies in JSON format deps=$(flutter pub deps --json) -# Parse command-line arguments -if [[ $# -eq 0 ]]; then - echo "Error: No arguments provided." - usage -fi +PACKAGE_INFO=$(echo "$deps" | jq --arg PACKAGE_NAME "$PACKAGE_NAME" ' + .packages + | map(select(.name == $PACKAGE_NAME)) + | first + | {version: .version, directDependencies: .directDependencies} +') -while [[ $# -gt 0 ]]; do - case "$1" in - --mode) - if [[ -n "$2" ]]; then - mode="$2" - shift 2 - else - echo "Error: --mode requires a value." - usage - fi - ;; - *) - usage - ;; - esac -done - -# Extract the archive URLs for direct dependencies, excluding the package named 'flutter' -package_info=$(echo "$deps" | jq -r '.packages[] | select(.kind == "direct" and .name != "flutter") | "\(.name) \(.version)"') -sdk_version=$(echo "$deps" | jq -r '.packages[] | select(.kind == "root") | .version') +# Extract directDependencies array from PACKAGE_INFO +DIRECT_DEPS=$(echo "$PACKAGE_INFO" | jq '.directDependencies') + +# Find all packages whose names are in directDependencies +MATCHING_PACKAGES=$(echo "$deps" | jq -s --argjson deps "$DIRECT_DEPS" ' + .[0].packages + | map(select(.name as $n | $deps | index($n))) + | map(select(.name != "flutter" and (.name | startswith("mapbox_maps_flutter") | not))) + | map({name, version}) +') + +PACKAGE_VERSION=$(echo "$PACKAGE_INFO" | jq -r '.version') deps_licenses="" # Loop through each name/version pair while read -r name version; do - package_metadata=$(curl -s "https://pub.dev/api/packages/$name/versions/$version") archive_url=$(echo "$package_metadata" | jq -r '.archive_url') repository_url=$(echo "$package_metadata" | jq -r '.pubspec.repository // "No repository URL found"') @@ -58,13 +68,21 @@ while read -r name version; do license_entry="### $name, $repository_url"$'\n\n'"\`\`\`"$'\n'"$(cat "$license_file")"$'\n'"\`\`\`"$'\n\n' deps_licenses+="$license_entry" else - dep_licenses+="No license file found for $name $version" + deps_licenses+="No license file found for $name $version" fi # Add your logic here to handle each package -done <<< "$package_info" +done < <(echo "$MATCHING_PACKAGES" | jq -r '.[] | "\(.name) \(.version)"') + +if [[ "$PACKAGE_NAME" == "mapbox_maps_flutter" ]]; then + mobile_dir="mapbox_maps_flutter_mobile" +else + mobile_dir="$PACKAGE_NAME" +fi + +ios_sdk_version=$(grep -A 1 'mapbox-maps-ios' $mobile_dir/ios/mapbox_maps_flutter/Package.swift | grep 'exact' | sed -E 's/.*"([0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9.]+)?)".*/\1/') +android_sdk_version=$(grep 'com.mapbox.maps:android' $mobile_dir/android/build.gradle | sed -E 's/.*"com\.mapbox\.maps:android:([0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9.]+)?)".*/\1/') -ios_sdk_version=$(grep -A 1 'mapbox-maps-ios' ios/mapbox_maps_flutter/Package.swift | grep 'exact' | sed -E 's/.*"([0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9.]+)?)".*/\1/') -android_sdk_version=$(grep 'com.mapbox.maps:android' android/build.gradle | sed -E 's/.*"com\.mapbox\.maps:android:([0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9.]+)?)".*/\1/') +# Fetch the license files for iOS and Android SDKs ios_license_content=$(curl -s "https://raw.githubusercontent.com/mapbox/mapbox-maps-ios/v$ios_sdk_version/LICENSE.md") android_license_content=$(curl -s "https://raw.githubusercontent.com/mapbox/mapbox-maps-android/v$android_sdk_version/LICENSE.md") @@ -88,22 +106,22 @@ __IOS_LICENSES__ __ANDROID_LICENSES__ " -license=$(echo "$license_template" | m4 -D __SDK_VERSION__="$sdk_version" \ +license=$(echo "$license_template" | m4 -D __SDK_VERSION__="$PACKAGE_VERSION" \ -D __DEPS_LICENSES__="$deps_licenses" \ -D __IOS_LICENSES__="$ios_license_content" \ -D __ANDROID_LICENSES__="$android_license_content" \ -D __YEAR__="$(date +%Y)") -if [ "$mode" == "validate" ]; then - if [[ "$(cat LICENSE)" == "$license" ]]; then +if [ "$MODE" == "validate" ]; then + if [[ "$(cat $mobile_dir/LICENSE)" == "$license" ]]; then echo "License file is up-to-date." exit 0 else echo "⚠️ License is not up-to-date. ⚠️" exit 1 fi -elif [ "$mode" == "generate" ]; then - echo "$license" > LICENSE +elif [ "$MODE" == "generate" ]; then + echo "$license" > $mobile_dir/LICENSE echo "License file has been updated." >&2 else usage diff --git a/scripts/update-version.sh b/scripts/update-version.sh index 7ec5f7df3..8fb5aec57 100755 --- a/scripts/update-version.sh +++ b/scripts/update-version.sh @@ -15,13 +15,13 @@ if ! [[ "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9]+(\.[0-9]+)*)?$ ]]; th exit 1 fi -echo "Updating MapboxMaps Flutter SDK version: $VERSION" +echo "Updating MapboxMaps Flutter Mobile SDK version: $VERSION" -PUBSPEC_FILE="$SCRIPT_DIR/../pubspec.yaml" +PUBSPEC_FILE="$SCRIPT_DIR/../mapbox_maps_flutter_mobile/pubspec.yaml" sed -i '' "s/^version: .*/version: $VERSION/" "$PUBSPEC_FILE" -PODSPEC_FILE="$SCRIPT_DIR/../ios/mapbox_maps_flutter.podspec" +PODSPEC_FILE="$SCRIPT_DIR/../mapbox_maps_flutter_mobile/ios/mapbox_maps_flutter.podspec" sed -i '' "s/\(s\.version *= *\)\'[^\']*\'/\1\'$VERSION\'/" "$PODSPEC_FILE" -PACKAGE_INFO_FILE="$SCRIPT_DIR/../lib/src/package_info.dart" +PACKAGE_INFO_FILE="$SCRIPT_DIR/../mapbox_maps_flutter_mobile/lib/src/package_info.dart" sed -i '' "s/^const String mapboxPluginVersion = .*/const String mapboxPluginVersion = '$VERSION';/" "$PACKAGE_INFO_FILE"