From ffe8b08efae9b269b884edcda6cb08ab067d0ae0 Mon Sep 17 00:00:00 2001 From: Peter Leibiger Date: Thu, 16 May 2024 01:31:49 +0200 Subject: [PATCH 1/9] chore: Prepare project for publishing * raise version to 0.19.0 * raise min Dart SDK to 3.0.0 as required by the `js: ^0.6.7` dependency * add `pubspec_overrides.yaml` files and move overridden local deps there * add `.pubignore` to prevent publishing unnecessary files * prepare new publish workflow * add supported platforms to `pubspec.yaml` --- .../pub-platform-interface-publish.yml | 23 -------- .github/workflows/pub-toplevel-publish.yml | 12 ---- .github/workflows/publish-single.yml | 29 ++++++++++ .github/workflows/publish.yml | 25 ++++++++ .gitignore | 8 +++ .pubignore | 4 ++ CHANGELOG.md | 4 ++ example/android/app/build.gradle | 2 +- example/ios/Podfile.lock | 11 ++-- example/pubspec.lock | 57 ++++++++----------- example/pubspec.yaml | 25 +------- example/pubspec_overrides.yaml | 7 +++ flutter_mapbox_gl.iml | 19 ------- maplibre_gl_platform_interface/pubspec.yaml | 10 ++-- maplibre_gl_web/pubspec.yaml | 21 +++---- maplibre_gl_web/pubspec_overrides.yaml | 3 + pubspec.yaml | 33 ++++------- pubspec_overrides.yaml | 5 ++ scripts/pubspec.yaml | 3 +- 19 files changed, 142 insertions(+), 159 deletions(-) delete mode 100644 .github/workflows/pub-platform-interface-publish.yml delete mode 100644 .github/workflows/pub-toplevel-publish.yml create mode 100644 .github/workflows/publish-single.yml create mode 100644 .github/workflows/publish.yml create mode 100644 .pubignore create mode 100644 example/pubspec_overrides.yaml delete mode 100644 flutter_mapbox_gl.iml create mode 100644 maplibre_gl_web/pubspec_overrides.yaml create mode 100644 pubspec_overrides.yaml diff --git a/.github/workflows/pub-platform-interface-publish.yml b/.github/workflows/pub-platform-interface-publish.yml deleted file mode 100644 index 7b6cd81d7..000000000 --- a/.github/workflows/pub-platform-interface-publish.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Publish maplibre_gl_platform_interface to pub.dev - -on: - push: - tags: - - 'pub-maplibre_gl_platform_interface-[0-9]+.[0-9]+.[0-9]+*' - workflow_dispatch: - -jobs: - publish: - permissions: - id-token: write # Required for authentication using OIDC - runs-on: ubuntu-latest - steps: - # Checkout repository - - uses: actions/checkout@v4 - # Setup Dart SDK with JWT token - - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d - # Publishing... - # skip validation due to https://github.com/dart-lang/setup-dart/issues/68 - - name: Publish to pub.dev - run: dart pub publish -f --skip-validation - working-directory: maplibre_gl_platform_interface diff --git a/.github/workflows/pub-toplevel-publish.yml b/.github/workflows/pub-toplevel-publish.yml deleted file mode 100644 index b5f53e4fb..000000000 --- a/.github/workflows/pub-toplevel-publish.yml +++ /dev/null @@ -1,12 +0,0 @@ -name: Publish top-level plugin to pub.dev - -on: - push: - tags: - - 'pub-maplibre_gl-[0-9]+.[0-9]+.[0-9]+*' - -jobs: - publish: - permissions: - id-token: write # Required for authentication using OIDC - uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1 diff --git a/.github/workflows/publish-single.yml b/.github/workflows/publish-single.yml new file mode 100644 index 000000000..6c967d007 --- /dev/null +++ b/.github/workflows/publish-single.yml @@ -0,0 +1,29 @@ +name: Publish a package to pub.dev + +on: + workflow_call: + inputs: + working-directory: + description: Directory of the package to publish + required: true + type: string + +permissions: + id-token: write + +jobs: + publish: + name: 'Publish to pub.dev' + permissions: + id-token: write # This is required for requesting the OIDC + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + # Setup Dart SDK with JWT token + - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 + - name: Install dependencies + run: dart pub get + # Publishing... + # skip validation due to https://github.com/dart-lang/setup-dart/issues/68 + - name: Publish to pub.dev + run: dart pub publish --force --skip-validation diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 000000000..a473bb762 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,25 @@ +name: Publish maplibre_gl packages to pub.dev + +on: + push: + tags: + - 'v[0-9]+.[0-9]+.[0-9]+*' + +permissions: + id-token: write + +jobs: + publish_maplibre_gl_platform_interface: + uses: ./.github/workflows/publish_single.yml + with: + working-directory: maplibre_gl_platform_interface + publish_maplibre_gl_web: + needs: [publish_maplibre_gl_platform_interface] + uses: ./.github/workflows/publish_single.yml + with: + working-directory: maplibre_gl_web + publish_maplibre_gl: + needs: [publish_maplibre_gl_web] + uses: ./.github/workflows/publish_single.yml + with: + working-directory: . diff --git a/.gitignore b/.gitignore index b9f4a1e3e..e8237d431 100644 --- a/.gitignore +++ b/.gitignore @@ -113,3 +113,11 @@ app.*.symbols !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages !/dev/ci/**/Gemfile.lock google-java-format-1.13.0-all-deps.jar + +# Ruby/CocoaPods +Gemfile* +.ruby-version + +# FVM Version Cache +.fvm/ +.fvmrc \ No newline at end of file diff --git a/.pubignore b/.pubignore new file mode 100644 index 000000000..53225997a --- /dev/null +++ b/.pubignore @@ -0,0 +1,4 @@ +scripts +screenshot.png +maplibre_gl_web +maplibre_gl_platform_interface diff --git a/CHANGELOG.md b/CHANGELOG.md index d7c73f4d0..ef2a8d4d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.19.0 +* Bump min Dart SDK to 3.0.0 +* Publish all packages to pub.dev + ## 0.18.0 ### Breaking Change: Already since 0.17.0, developers do not need to adapt their Podfile for iOS apps anymore as it was previously described in the Readme. Developers who previously added these lines should remove them, since not removing these lines may cause a build failure on iOS. (This change actually already landed in 0.17.0, but it may not have been sufficiently clear that not removing these lines might break builds). diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index d1263a733..2e6ec1b6d 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -36,7 +36,7 @@ android { } kotlinOptions { - jvmTarget = '1.8' + jvmTarget = JavaVersion.VERSION_1_8 } sourceSets { diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 9888b3670..c52f0ee44 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -16,7 +16,6 @@ DEPENDENCIES: - device_info_plus (from `.symlinks/plugins/device_info_plus/ios`) - Flutter (from `Flutter`) - location (from `.symlinks/plugins/location/ios`) - - MapLibre - maplibre_gl (from `.symlinks/plugins/maplibre_gl/ios`) - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) @@ -39,11 +38,11 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: device_info_plus: 7545d84d8d1b896cb16a4ff98c19f07ec4b298ea Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 - location: 3a2eed4dd2fab25e7b7baf2a9efefe82b512d740 + location: d5cf8598915965547c3f36761ae9cc4f4e87d22e MapLibre: 620fc933c1d6029b33738c905c1490d024e5d4ef - maplibre_gl: 249958f57ed5cca73baf413ad6cbdbc64be69658 - path_provider_foundation: c68054786f1b4f3343858c1e1d0caaded73f0be9 + maplibre_gl: a2efec727dd340e4c65e26d2b03b584f14881fd9 + path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943 -PODFILE CHECKSUM: 00bbce151cce7e3542226c3dbb2422a2cb667d7a +PODFILE CHECKSUM: 76b02dc813a095e7650def38e0c540365f37c732 -COCOAPODS: 1.12.1 +COCOAPODS: 1.15.2 diff --git a/example/pubspec.lock b/example/pubspec.lock index 78c6c7d17..2c1545966 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -45,10 +45,10 @@ packages: dependency: "direct main" description: name: collection - sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687 + sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c" url: "https://pub.dev" source: hosted - version: "1.17.2" + version: "1.17.1" convert: dependency: transitive description: @@ -179,65 +179,64 @@ packages: location: dependency: "direct main" description: - path: "packages/location" - ref: V4 - resolved-ref: "44745026a384c743cb5e64f94296303d9adbb237" - url: "https://github.com/781flyingdutchman/flutterlocation.git" - source: git - version: "4.4.1" + name: location + sha256: "06be54f682c9073cbfec3899eb9bc8ed90faa0e17735c9d9fa7fe426f5be1dd1" + url: "https://pub.dev" + source: hosted + version: "5.0.3" location_platform_interface: dependency: transitive description: name: location_platform_interface - sha256: "62eeaf1658e92e4459b727f55a3c328eccbac8ba043fa6d262ac5286ad48384c" + sha256: "8aa1d34eeecc979d7c9fe372931d84f6d2ebbd52226a54fe1620de6fdc0753b1" url: "https://pub.dev" source: hosted - version: "2.3.0" + version: "3.1.2" location_web: dependency: transitive description: name: location_web - sha256: "6c08c408a040534c0269c4ff9fe17eebb5a36dea16512fbaf116b9c8bc21545b" + sha256: ec484c66e8a4ff1ee5d044c203f4b6b71e3a0556a97b739a5bc9616de672412b url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "4.2.0" maplibre_gl: dependency: "direct main" description: path: ".." relative: true source: path - version: "0.18.0" + version: "0.19.0" maplibre_gl_platform_interface: - dependency: "direct main" + dependency: "direct overridden" description: path: "../maplibre_gl_platform_interface" relative: true source: path - version: "0.18.0" + version: "0.19.0" maplibre_gl_web: dependency: "direct overridden" description: path: "../maplibre_gl_web" relative: true source: path - version: "0.18.0" + version: "0.19.0" matcher: dependency: transitive description: name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb" url: "https://pub.dev" source: hosted - version: "0.12.16" + version: "0.12.15" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 url: "https://pub.dev" source: hosted - version: "0.5.0" + version: "0.2.0" meta: dependency: transitive description: @@ -343,10 +342,10 @@ packages: dependency: transitive description: name: source_span - sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.9.1" stack_trace: dependency: transitive description: @@ -383,10 +382,10 @@ packages: dependency: transitive description: name: test_api - sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8" + sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb url: "https://pub.dev" source: hosted - version: "0.6.0" + version: "0.5.1" typed_data: dependency: transitive description: @@ -403,14 +402,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" - web: - dependency: transitive - description: - name: web - sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10 - url: "https://pub.dev" - source: hosted - version: "0.1.4-beta" win32: dependency: transitive description: @@ -444,5 +435,5 @@ packages: source: hosted version: "6.3.0" sdks: - dart: ">=3.1.0-185.0.dev <4.0.0" + dart: ">=3.0.0 <4.0.0" flutter: ">=3.10.0" diff --git a/example/pubspec.yaml b/example/pubspec.yaml index cee50c31a..272b83c0c 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -14,18 +14,7 @@ dependencies: # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.5 - - maplibre_gl_platform_interface: - git: - url: https://github.com/maplibre/flutter-maplibre-gl.git - path: maplibre_gl_platform_interface - ref: git-release-0.17.0 - - maplibre_gl: - git: - url: https://github.com/maplibre/flutter-maplibre-gl.git - ref: git-release-0.17.0 - + maplibre_gl: ^0.19.0 location: ^5.0.3 path_provider: ^2.0.15 http: ^1.1.0 @@ -34,18 +23,6 @@ dependencies: platform: ^3.1.0 device_info_plus: ^9.0.2 -# The following lines can be useful if you make changes to this plugin (specifically to the two sub-plugins), -# e.g. because you contribute to the project. -# If the following lines are not commented out, your local versions of the sub-plugins will be used, -# instead of the hosted ones. -dependency_overrides: - maplibre_gl_platform_interface: - path: ../maplibre_gl_platform_interface - maplibre_gl_web: - path: ../maplibre_gl_web - maplibre_gl: - path: .. - dev_dependencies: flutter_lints: ^2.0.1 flutter_test: diff --git a/example/pubspec_overrides.yaml b/example/pubspec_overrides.yaml new file mode 100644 index 000000000..f24c5d539 --- /dev/null +++ b/example/pubspec_overrides.yaml @@ -0,0 +1,7 @@ +dependency_overrides: + maplibre_gl: + path: .. + maplibre_gl_platform_interface: + path: ../maplibre_gl_platform_interface + maplibre_gl_web: + path: ../maplibre_gl_web diff --git a/flutter_mapbox_gl.iml b/flutter_mapbox_gl.iml deleted file mode 100644 index 73e7ebd0d..000000000 --- a/flutter_mapbox_gl.iml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/maplibre_gl_platform_interface/pubspec.yaml b/maplibre_gl_platform_interface/pubspec.yaml index 47de1eef3..7bc93576c 100644 --- a/maplibre_gl_platform_interface/pubspec.yaml +++ b/maplibre_gl_platform_interface/pubspec.yaml @@ -1,13 +1,13 @@ name: maplibre_gl_platform_interface description: A common platform interface for the maplibre_gl plugin. -version: 0.18.0 +version: 0.19.0 homepage: https://github.com/maplibre/flutter-maplibre-gl +environment: + sdk: ">=3.0.0 <4.0.0" + flutter: ">=3.10.0" + dependencies: flutter: sdk: flutter meta: ^1.0.5 - -environment: - sdk: '>=2.14.0 <3.0.0' - flutter: '>=2.10.0' diff --git a/maplibre_gl_web/pubspec.yaml b/maplibre_gl_web/pubspec.yaml index 9144c1463..2ce418f30 100644 --- a/maplibre_gl_web/pubspec.yaml +++ b/maplibre_gl_web/pubspec.yaml @@ -1,8 +1,12 @@ name: maplibre_gl_web description: Web platform implementation of maplibre_gl -version: 0.18.0 +version: 0.19.0 homepage: https://github.com/maplibre/flutter-maplibre-gl +environment: + sdk: ">=3.0.0 <4.0.0" + flutter: ">=3.10.0" + flutter: plugin: platforms: @@ -17,21 +21,12 @@ dependencies: flutter_web_plugins: sdk: flutter meta: ^1.3.0 - maplibre_gl_platform_interface: - git: - url: https://github.com/maplibre/flutter-maplibre-gl.git - path: maplibre_gl_platform_interface - ref: main + maplibre_gl_platform_interface: ^0.19.0 image: ^4.0.17 -dependency_overrides: - maplibre_gl_platform_interface: - path: ../maplibre_gl_platform_interface - dev_dependencies: flutter_test: sdk: flutter -environment: - sdk: ">=2.12.0 <3.0.0" - flutter: ">=2.0.0" +platforms: + web: diff --git a/maplibre_gl_web/pubspec_overrides.yaml b/maplibre_gl_web/pubspec_overrides.yaml new file mode 100644 index 000000000..3ad0693b6 --- /dev/null +++ b/maplibre_gl_web/pubspec_overrides.yaml @@ -0,0 +1,3 @@ +dependency_overrides: + maplibre_gl_platform_interface: + path: ./maplibre_gl_platform_interface diff --git a/pubspec.yaml b/pubspec.yaml index baba8ee4a..7c2ac9f64 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,27 +1,17 @@ name: maplibre_gl description: A Flutter plugin for integrating Maplibre Maps inside a Flutter application on Android, iOS and web platforms. -version: 0.18.0 +version: 0.19.0 homepage: https://github.com/maplibre/flutter-maplibre-gl +environment: + sdk: ">=3.0.0 <4.0.0" + flutter: ">=3.10.0" + dependencies: flutter: sdk: flutter - maplibre_gl_platform_interface: - git: - url: https://github.com/maplibre/flutter-maplibre-gl.git - path: maplibre_gl_platform_interface - ref: main - maplibre_gl_web: - git: - url: https://github.com/maplibre/flutter-maplibre-gl.git - path: maplibre_gl_web - ref: main - -dependency_overrides: - maplibre_gl_platform_interface: - path: ./maplibre_gl_platform_interface - maplibre_gl_web: - path: ./maplibre_gl_web + maplibre_gl_platform_interface: ^0.19.0 + maplibre_gl_web: ^0.19.0 flutter: plugin: @@ -34,8 +24,7 @@ flutter: web: default_package: maplibre_gl_web -environment: - # Flutter 2.15 is the required min to be able to use Enum.name - sdk: '>=2.15.0 <3.0.0' - flutter: ">=2.8.1" - +platforms: + android: + ios: + web: diff --git a/pubspec_overrides.yaml b/pubspec_overrides.yaml new file mode 100644 index 000000000..e8fff836d --- /dev/null +++ b/pubspec_overrides.yaml @@ -0,0 +1,5 @@ +dependency_overrides: + maplibre_gl_platform_interface: + path: ./maplibre_gl_platform_interface + maplibre_gl_web: + path: ./maplibre_gl_web diff --git a/scripts/pubspec.yaml b/scripts/pubspec.yaml index f25e07ce1..ec0092b06 100644 --- a/scripts/pubspec.yaml +++ b/scripts/pubspec.yaml @@ -1,5 +1,6 @@ -name: mapbox_code_gen +name: maplibre_code_gen description: code generation for flutter-mapbox-gl +publish_to: 'none' version: 0.0.1 From 71459173761d1ce0d68f69d0459760500a95788f Mon Sep 17 00:00:00 2001 From: Peter Leibiger Date: Fri, 17 May 2024 14:42:19 +0200 Subject: [PATCH 2/9] Fix example --- example/pubspec.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 272b83c0c..b1c77236c 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -15,6 +15,7 @@ dependencies: # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.5 maplibre_gl: ^0.19.0 + maplibre_gl_platform_interface: ^0.19.0 location: ^5.0.3 path_provider: ^2.0.15 http: ^1.1.0 From 21e8feaaf6667f564f27affec3a331a1b33a1467 Mon Sep 17 00:00:00 2001 From: Peter Leibiger Date: Fri, 17 May 2024 14:56:52 +0200 Subject: [PATCH 3/9] Fix dependency override path --- maplibre_gl_web/pubspec_overrides.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maplibre_gl_web/pubspec_overrides.yaml b/maplibre_gl_web/pubspec_overrides.yaml index 3ad0693b6..e54872cb8 100644 --- a/maplibre_gl_web/pubspec_overrides.yaml +++ b/maplibre_gl_web/pubspec_overrides.yaml @@ -1,3 +1,3 @@ dependency_overrides: maplibre_gl_platform_interface: - path: ./maplibre_gl_platform_interface + path: ../maplibre_gl_platform_interface From 03a2e25b1e7b395c65b1d989bcb5922f5ebd98d7 Mon Sep 17 00:00:00 2001 From: Peter Leibiger Date: Fri, 17 May 2024 15:06:58 +0200 Subject: [PATCH 4/9] Adjust changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c2fc9d7f5..0cf9dc389 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ ## 0.19.0 -* Bump min Dart SDK to 3.0.0 +* Bump min Dart SDK to 3.0.0 (this was already implicitly required by transitive dependencies) * Publish all packages to pub.dev * Add support for Gradle/AGP namespace configuration * Bump Android `compileSdkVersion` to 34 From 98b78ad09e53d38d7117b6558775c8ff929ed766 Mon Sep 17 00:00:00 2001 From: Peter Leibiger Date: Sat, 18 May 2024 02:30:14 +0200 Subject: [PATCH 5/9] Convert to super parameters --- example/ios/Podfile.lock | 4 +- lib/src/annotation_manager.dart | 41 ++++++------------- lib/src/maplibre_map.dart | 5 +-- maplibre_gl_web/lib/src/geo/geojson.dart | 8 ++-- maplibre_gl_web/lib/src/geo/lng_lat.dart | 2 +- .../lib/src/geo/lng_lat_bounds.dart | 4 +- maplibre_gl_web/lib/src/geo/point.dart | 2 +- .../lib/src/style/evaluation_parameters.dart | 4 +- .../lib/src/style/sources/geojson_source.dart | 4 +- .../lib/src/style/sources/vector_source.dart | 4 +- maplibre_gl_web/lib/src/style/style.dart | 10 ++--- .../lib/src/style/style_image.dart | 8 ++-- maplibre_gl_web/lib/src/ui/camera.dart | 12 +++--- .../src/ui/control/attribution_control.dart | 8 ++-- .../lib/src/ui/control/geolocate_control.dart | 8 ++-- .../lib/src/ui/control/logo_control.dart | 4 +- .../src/ui/control/navigation_control.dart | 8 ++-- maplibre_gl_web/lib/src/ui/events.dart | 8 ++-- .../lib/src/ui/handler/box_zoom.dart | 4 +- .../lib/src/ui/handler/dblclick_zoom.dart | 4 +- .../lib/src/ui/handler/drag_pan.dart | 4 +- .../lib/src/ui/handler/drag_rotate.dart | 4 +- .../lib/src/ui/handler/keyboard.dart | 4 +- .../lib/src/ui/handler/scroll_zoom.dart | 4 +- .../lib/src/ui/handler/touch_zoom_rotate.dart | 4 +- maplibre_gl_web/lib/src/ui/map.dart | 10 ++--- maplibre_gl_web/lib/src/ui/marker.dart | 4 +- maplibre_gl_web/lib/src/ui/popup.dart | 4 +- maplibre_gl_web/lib/src/util/evented.dart | 4 +- 29 files changed, 89 insertions(+), 105 deletions(-) diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index c52f0ee44..0e2430f63 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -36,12 +36,12 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/path_provider_foundation/darwin" SPEC CHECKSUMS: - device_info_plus: 7545d84d8d1b896cb16a4ff98c19f07ec4b298ea + device_info_plus: c6fb39579d0f423935b0c9ce7ee2f44b71b9fce6 Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 location: d5cf8598915965547c3f36761ae9cc4f4e87d22e MapLibre: 620fc933c1d6029b33738c905c1490d024e5d4ef maplibre_gl: a2efec727dd340e4c65e26d2b03b584f14881fd9 - path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943 + path_provider_foundation: 3784922295ac71e43754bd15e0653ccfd36a147c PODFILE CHECKSUM: 76b02dc813a095e7650def38e0c540365f37c732 diff --git a/lib/src/annotation_manager.dart b/lib/src/annotation_manager.dart index dfd7cfeaa..4a63f0592 100644 --- a/lib/src/annotation_manager.dart +++ b/lib/src/annotation_manager.dart @@ -168,12 +168,9 @@ abstract class AnnotationManager { } class LineManager extends AnnotationManager { - LineManager(MaplibreMapController controller, - {void Function(Line)? onTap, bool enableInteraction = true}) + LineManager(super.controller, + {super.onTap, super.enableInteraction = true}) : super( - controller, - onTap: onTap, - enableInteraction: enableInteraction, selectLayer: (Line line) => line.options.linePattern == null ? 0 : 1, ); @@ -197,13 +194,10 @@ class LineManager extends AnnotationManager { class FillManager extends AnnotationManager { FillManager( - MaplibreMapController controller, { - void Function(Fill)? onTap, - bool enableInteraction = true, + super.controller, { + super.onTap, + super.enableInteraction = true, }) : super( - controller, - onTap: onTap, - enableInteraction: enableInteraction, selectLayer: (Fill fill) => fill.options.fillPattern == null ? 0 : 1, ); @@ -225,14 +219,10 @@ class FillManager extends AnnotationManager { class CircleManager extends AnnotationManager { CircleManager( - MaplibreMapController controller, { - void Function(Circle)? onTap, - bool enableInteraction = true, - }) : super( - controller, - enableInteraction: enableInteraction, - onTap: onTap, - ); + super.controller, { + super.onTap, + super.enableInteraction = true, + }); @override List get allLayerProperties => const [ @@ -250,22 +240,17 @@ class CircleManager extends AnnotationManager { class SymbolManager extends AnnotationManager { SymbolManager( - MaplibreMapController controller, { - void Function(Symbol)? onTap, + super.controller, { + super.onTap, bool iconAllowOverlap = false, bool textAllowOverlap = false, bool iconIgnorePlacement = false, bool textIgnorePlacement = false, - bool enableInteraction = true, + super.enableInteraction = true, }) : _iconAllowOverlap = iconAllowOverlap, _textAllowOverlap = textAllowOverlap, _iconIgnorePlacement = iconIgnorePlacement, - _textIgnorePlacement = textIgnorePlacement, - super( - controller, - enableInteraction: enableInteraction, - onTap: onTap, - ); + _textIgnorePlacement = textIgnorePlacement; bool _iconAllowOverlap; bool _textAllowOverlap; diff --git a/lib/src/maplibre_map.dart b/lib/src/maplibre_map.dart index 98c94a8fd..71ebd8865 100644 --- a/lib/src/maplibre_map.dart +++ b/lib/src/maplibre_map.dart @@ -12,7 +12,7 @@ typedef MapCreatedCallback = void Function(MaplibreMapController controller); /// Also refer to the documentation of [maplibre_gl] and [MaplibreMapController]. class MaplibreMap extends StatefulWidget { const MaplibreMap({ - Key? key, + super.key, required this.initialCameraPosition, this.styleString = "https://demotiles.maplibre.org/style.json", this.onMapCreated, @@ -63,8 +63,7 @@ class MaplibreMap extends StatefulWidget { "$myLocationRenderMode requires [myLocationEnabled] set to true.", ), assert(annotationOrder.length <= 4), - assert(annotationConsumeTapEvents.length > 0), - super(key: key); + assert(annotationConsumeTapEvents.length > 0); /// Defines the layer order of annotations displayed on map /// diff --git a/maplibre_gl_web/lib/src/geo/geojson.dart b/maplibre_gl_web/lib/src/geo/geojson.dart index fb575e21d..ea6a13b69 100644 --- a/maplibre_gl_web/lib/src/geo/geojson.dart +++ b/maplibre_gl_web/lib/src/geo/geojson.dart @@ -20,8 +20,8 @@ class FeatureCollection extends JsObjectWrapper { } /// Creates a new FeatureCollection from a [jsObject]. - FeatureCollection.fromJsObject(FeatureCollectionJsImpl jsObject) - : super.fromJsObject(jsObject); + FeatureCollection.fromJsObject(super.jsObject) + : super.fromJsObject(); } class Feature extends JsObjectWrapper { @@ -69,7 +69,7 @@ class Feature extends JsObjectWrapper { )); /// Creates a new Feature from a [jsObject]. - Feature.fromJsObject(FeatureJsImpl jsObject) : super.fromJsObject(jsObject); + Feature.fromJsObject(super.jsObject) : super.fromJsObject(); } class Geometry extends JsObjectWrapper { @@ -87,5 +87,5 @@ class Geometry extends JsObjectWrapper { )); /// Creates a new Geometry from a [jsObject]. - Geometry.fromJsObject(GeometryJsImpl jsObject) : super.fromJsObject(jsObject); + Geometry.fromJsObject(super.jsObject) : super.fromJsObject(); } diff --git a/maplibre_gl_web/lib/src/geo/lng_lat.dart b/maplibre_gl_web/lib/src/geo/lng_lat.dart index 57bc89365..62a88c2ae 100644 --- a/maplibre_gl_web/lib/src/geo/lng_lat.dart +++ b/maplibre_gl_web/lib/src/geo/lng_lat.dart @@ -84,5 +84,5 @@ class LngLat extends JsObjectWrapper { LngLat.fromJsObject(LngLatJsImpl.convert(input)); /// Creates a new LngLat from a [jsObject]. - LngLat.fromJsObject(LngLatJsImpl jsObject) : super.fromJsObject(jsObject); + LngLat.fromJsObject(super.jsObject) : super.fromJsObject(); } diff --git a/maplibre_gl_web/lib/src/geo/lng_lat_bounds.dart b/maplibre_gl_web/lib/src/geo/lng_lat_bounds.dart index 1e59cd8a1..d0c050aca 100644 --- a/maplibre_gl_web/lib/src/geo/lng_lat_bounds.dart +++ b/maplibre_gl_web/lib/src/geo/lng_lat_bounds.dart @@ -143,6 +143,6 @@ class LngLatBounds extends JsObjectWrapper { LngLatBounds.fromJsObject(LngLatBoundsJsImpl.convert(input)); /// Creates a new LngLatBounds from a [jsObject]. - LngLatBounds.fromJsObject(LngLatBoundsJsImpl jsObject) - : super.fromJsObject(jsObject); + LngLatBounds.fromJsObject(super.jsObject) + : super.fromJsObject(); } diff --git a/maplibre_gl_web/lib/src/geo/point.dart b/maplibre_gl_web/lib/src/geo/point.dart index 123999f0f..db631abc8 100644 --- a/maplibre_gl_web/lib/src/geo/point.dart +++ b/maplibre_gl_web/lib/src/geo/point.dart @@ -17,5 +17,5 @@ class Point extends JsObjectWrapper { )); /// Creates a new LngLat from a [jsObject]. - Point.fromJsObject(PointJsImpl jsObject) : super.fromJsObject(jsObject); + Point.fromJsObject(super.jsObject) : super.fromJsObject(); } diff --git a/maplibre_gl_web/lib/src/style/evaluation_parameters.dart b/maplibre_gl_web/lib/src/style/evaluation_parameters.dart index 9e7620394..06d9d158e 100644 --- a/maplibre_gl_web/lib/src/style/evaluation_parameters.dart +++ b/maplibre_gl_web/lib/src/style/evaluation_parameters.dart @@ -20,6 +20,6 @@ class EvaluationParameters extends JsObjectWrapper { dynamic getCrossfadeParameters() => jsObject.getCrossfadeParameters(); /// Creates a new EvaluationParameters from a [jsObject]. - EvaluationParameters.fromJsObject(EvaluationParametersJsImpl jsObject) - : super.fromJsObject(jsObject); + EvaluationParameters.fromJsObject(super.jsObject) + : super.fromJsObject(); } diff --git a/maplibre_gl_web/lib/src/style/sources/geojson_source.dart b/maplibre_gl_web/lib/src/style/sources/geojson_source.dart index 0a358931b..8113ade5b 100644 --- a/maplibre_gl_web/lib/src/style/sources/geojson_source.dart +++ b/maplibre_gl_web/lib/src/style/sources/geojson_source.dart @@ -22,8 +22,8 @@ class GeoJsonSource extends Source { GeoJsonSource.fromJsObject(jsObject.setData(featureCollection.jsObject)); /// Creates a new GeoJsonSource from a [jsObject]. - GeoJsonSource.fromJsObject(GeoJsonSourceJsImpl jsObject) - : super.fromJsObject(jsObject); + GeoJsonSource.fromJsObject(super.jsObject) + : super.fromJsObject(); @override get dict => { diff --git a/maplibre_gl_web/lib/src/style/sources/vector_source.dart b/maplibre_gl_web/lib/src/style/sources/vector_source.dart index 074cf2769..e5bd0ae22 100644 --- a/maplibre_gl_web/lib/src/style/sources/vector_source.dart +++ b/maplibre_gl_web/lib/src/style/sources/vector_source.dart @@ -28,8 +28,8 @@ class VectorSource extends Source { } /// Creates a new VectorSource from a [jsObject]. - VectorSource.fromJsObject(VectorSourceJsImpl jsObject) - : super.fromJsObject(jsObject); + VectorSource.fromJsObject(super.jsObject) + : super.fromJsObject(); @override get dict { diff --git a/maplibre_gl_web/lib/src/style/style.dart b/maplibre_gl_web/lib/src/style/style.dart index a4deb0f35..86be2ed0e 100644 --- a/maplibre_gl_web/lib/src/style/style.dart +++ b/maplibre_gl_web/lib/src/style/style.dart @@ -9,8 +9,8 @@ class StyleSetterOptions extends JsObjectWrapper { bool get validate => jsObject.validate; /// Creates a new StyleSetterOptions from a [jsObject]. - StyleSetterOptions.fromJsObject(StyleSetterOptionsJsImpl jsObject) - : super.fromJsObject(jsObject); + StyleSetterOptions.fromJsObject(super.jsObject) + : super.fromJsObject(); } class Style extends JsObjectWrapper { @@ -160,7 +160,7 @@ class Style extends JsObjectWrapper { jsObject.getResource(mapId, params.jsObject, callback); /// Creates a new Style from a [jsObject]. - Style.fromJsObject(StyleJsImpl jsObject) : super.fromJsObject(jsObject); + Style.fromJsObject(super.jsObject) : super.fromJsObject(); List get layers => jsObject.layers; } @@ -173,6 +173,6 @@ class StyleFunction extends JsObjectWrapper { StyleFunction.fromJsObject(StyleFunctionJsImpl(base: base, stops: stops)); /// Creates a new StyleFunction from a [jsObject]. - StyleFunction.fromJsObject(StyleFunctionJsImpl jsObject) - : super.fromJsObject(jsObject); + StyleFunction.fromJsObject(super.jsObject) + : super.fromJsObject(); } diff --git a/maplibre_gl_web/lib/src/style/style_image.dart b/maplibre_gl_web/lib/src/style/style_image.dart index cf4292456..c75f85afa 100644 --- a/maplibre_gl_web/lib/src/style/style_image.dart +++ b/maplibre_gl_web/lib/src/style/style_image.dart @@ -12,8 +12,8 @@ class StyleImage extends JsObjectWrapper { StyleImageInterface.fromJsObject(jsObject.userImage); /// Creates a new EvaluationParameters from a [jsObject]. - StyleImage.fromJsObject(StyleImageJsImpl jsObject) - : super.fromJsObject(jsObject); + StyleImage.fromJsObject(super.jsObject) + : super.fromJsObject(); } class StyleImageInterface extends JsObjectWrapper { @@ -26,6 +26,6 @@ class StyleImageInterface extends JsObjectWrapper { Function get onRemove => jsObject.onRemove; /// Creates a new EvaluationParameters from a [jsObject]. - StyleImageInterface.fromJsObject(StyleImageInterfaceJsImpl jsObject) - : super.fromJsObject(jsObject); + StyleImageInterface.fromJsObject(super.jsObject) + : super.fromJsObject(); } diff --git a/maplibre_gl_web/lib/src/ui/camera.dart b/maplibre_gl_web/lib/src/ui/camera.dart index 622b1c61b..202341fec 100644 --- a/maplibre_gl_web/lib/src/ui/camera.dart +++ b/maplibre_gl_web/lib/src/ui/camera.dart @@ -47,8 +47,8 @@ class CameraOptions extends JsObjectWrapper { )); /// Creates a new CameraOptions from a [jsObject]. - CameraOptions.fromJsObject(CameraOptionsJsImpl jsObject) - : super.fromJsObject(jsObject); + CameraOptions.fromJsObject(super.jsObject) + : super.fromJsObject(); } /// Options common to map movement methods that involve animation, such as {@link MapLibreMap#panBy} and @@ -90,8 +90,8 @@ class AnimationOptions extends JsObjectWrapper { )); /// Creates a new AnimationOptions from a [jsObject]. - AnimationOptions.fromJsObject(AnimationOptionsJsImpl jsObject) - : super.fromJsObject(jsObject); + AnimationOptions.fromJsObject(super.jsObject) + : super.fromJsObject(); } /// Options for setting padding on a call to {@link MapLibreMap#fitBounds}. All properties of this object must be @@ -125,8 +125,8 @@ class PaddingOptions extends JsObjectWrapper { )); /// Creates a new PaddingOptions from a [jsObject]. - PaddingOptions.fromJsObject(PaddingOptionsJsImpl jsObject) - : super.fromJsObject(jsObject); + PaddingOptions.fromJsObject(super.jsObject) + : super.fromJsObject(); } class Camera extends Evented { diff --git a/maplibre_gl_web/lib/src/ui/control/attribution_control.dart b/maplibre_gl_web/lib/src/ui/control/attribution_control.dart index df04cf9e4..5bc147257 100644 --- a/maplibre_gl_web/lib/src/ui/control/attribution_control.dart +++ b/maplibre_gl_web/lib/src/ui/control/attribution_control.dart @@ -17,8 +17,8 @@ class AttributionControlOptions /// Creates a new AttributionControlOptions from a [jsObject]. AttributionControlOptions.fromJsObject( - AttributionControlOptionsJsImpl jsObject) - : super.fromJsObject(jsObject); + super.jsObject) + : super.fromJsObject(); } /// A `AttributionControl` control contains zoom buttons and a compass. @@ -44,6 +44,6 @@ class AttributionControl extends JsObjectWrapper { onRemove() => jsObject.onRemove(); /// Creates a new MapOptions from a [jsObject]. - AttributionControl.fromJsObject(AttributionControlJsImpl jsObject) - : super.fromJsObject(jsObject); + AttributionControl.fromJsObject(super.jsObject) + : super.fromJsObject(); } diff --git a/maplibre_gl_web/lib/src/ui/control/geolocate_control.dart b/maplibre_gl_web/lib/src/ui/control/geolocate_control.dart index 0c148f663..11dd14e80 100644 --- a/maplibre_gl_web/lib/src/ui/control/geolocate_control.dart +++ b/maplibre_gl_web/lib/src/ui/control/geolocate_control.dart @@ -29,8 +29,8 @@ class GeolocateControlOptions )); /// Creates a new MapOptions from a [jsObject]. - GeolocateControlOptions.fromJsObject(GeolocateControlOptionsJsImpl jsObject) - : super.fromJsObject(jsObject); + GeolocateControlOptions.fromJsObject(super.jsObject) + : super.fromJsObject(); } class PositionOptions extends JsObjectWrapper { @@ -50,8 +50,8 @@ class PositionOptions extends JsObjectWrapper { )); /// Creates a new MapOptions from a [jsObject]. - PositionOptions.fromJsObject(PositionOptionsJsImpl jsObject) - : super.fromJsObject(jsObject); + PositionOptions.fromJsObject(super.jsObject) + : super.fromJsObject(); } /// A `GeolocateControl` control provides a button that uses the browser's geolocation diff --git a/maplibre_gl_web/lib/src/ui/control/logo_control.dart b/maplibre_gl_web/lib/src/ui/control/logo_control.dart index 966907018..48cf2090d 100644 --- a/maplibre_gl_web/lib/src/ui/control/logo_control.dart +++ b/maplibre_gl_web/lib/src/ui/control/logo_control.dart @@ -14,6 +14,6 @@ class LogoControl extends JsObjectWrapper { getDefaultPosition() => jsObject.getDefaultPosition(); /// Creates a new LogoControl from a [jsObject]. - LogoControl.fromJsObject(LogoControlJsImpl jsObject) - : super.fromJsObject(jsObject); + LogoControl.fromJsObject(super.jsObject) + : super.fromJsObject(); } diff --git a/maplibre_gl_web/lib/src/ui/control/navigation_control.dart b/maplibre_gl_web/lib/src/ui/control/navigation_control.dart index 703909a74..1fb3f9ecc 100644 --- a/maplibre_gl_web/lib/src/ui/control/navigation_control.dart +++ b/maplibre_gl_web/lib/src/ui/control/navigation_control.dart @@ -23,8 +23,8 @@ class NavigationControlOptions )); /// Creates a new NavigationControlOptions from a [jsObject]. - NavigationControlOptions.fromJsObject(NavigationControlOptionsJsImpl jsObject) - : super.fromJsObject(jsObject); + NavigationControlOptions.fromJsObject(super.jsObject) + : super.fromJsObject(); } /// A `NavigationControl` control contains zoom buttons and a compass. @@ -51,6 +51,6 @@ class NavigationControl extends JsObjectWrapper { onRemove() => jsObject.onRemove(); /// Creates a new MapOptions from a [jsObject]. - NavigationControl.fromJsObject(NavigationControlJsImpl jsObject) - : super.fromJsObject(jsObject); + NavigationControl.fromJsObject(super.jsObject) + : super.fromJsObject(); } diff --git a/maplibre_gl_web/lib/src/ui/events.dart b/maplibre_gl_web/lib/src/ui/events.dart index 60c29a96d..491a33eef 100644 --- a/maplibre_gl_web/lib/src/ui/events.dart +++ b/maplibre_gl_web/lib/src/ui/events.dart @@ -37,8 +37,8 @@ class MapMouseEvent extends JsObjectWrapper { bool get defaultPrevented => jsObject.defaultPrevented; /// Creates a new MapMouseEvent from a [jsObject]. - MapMouseEvent.fromJsObject(MapMouseEventJsImpl jsObject) - : super.fromJsObject(jsObject); + MapMouseEvent.fromJsObject(super.jsObject) + : super.fromJsObject(); } class MapTouchEvent extends JsObjectWrapper { @@ -80,6 +80,6 @@ class MapTouchEvent extends JsObjectWrapper { bool get defaultPrevented => jsObject.defaultPrevented; /// Creates a new MapTouchEvent from a [jsObject]. - MapTouchEvent.fromJsObject(MapTouchEventJsImpl jsObject) - : super.fromJsObject(jsObject); + MapTouchEvent.fromJsObject(super.jsObject) + : super.fromJsObject(); } diff --git a/maplibre_gl_web/lib/src/ui/handler/box_zoom.dart b/maplibre_gl_web/lib/src/ui/handler/box_zoom.dart index b60574d73..37ceac41f 100644 --- a/maplibre_gl_web/lib/src/ui/handler/box_zoom.dart +++ b/maplibre_gl_web/lib/src/ui/handler/box_zoom.dart @@ -30,6 +30,6 @@ class BoxZoomHandler extends JsObjectWrapper { onMouseDown(MouseEvent e) => jsObject.onMouseDown(e); /// Creates a new BoxZoomHandler from a [jsObject]. - BoxZoomHandler.fromJsObject(BoxZoomHandlerJsImpl jsObject) - : super.fromJsObject(jsObject); + BoxZoomHandler.fromJsObject(super.jsObject) + : super.fromJsObject(); } diff --git a/maplibre_gl_web/lib/src/ui/handler/dblclick_zoom.dart b/maplibre_gl_web/lib/src/ui/handler/dblclick_zoom.dart index bb39a71ba..cc5272f29 100644 --- a/maplibre_gl_web/lib/src/ui/handler/dblclick_zoom.dart +++ b/maplibre_gl_web/lib/src/ui/handler/dblclick_zoom.dart @@ -32,6 +32,6 @@ class DoubleClickZoomHandler onDblClick(MapMouseEvent e) => jsObject.onDblClick(e.jsObject); /// Creates a new DoubleClickZoomHandler from a [jsObject]. - DoubleClickZoomHandler.fromJsObject(DoubleClickZoomHandlerJsImpl jsObject) - : super.fromJsObject(jsObject); + DoubleClickZoomHandler.fromJsObject(super.jsObject) + : super.fromJsObject(); } diff --git a/maplibre_gl_web/lib/src/ui/handler/drag_pan.dart b/maplibre_gl_web/lib/src/ui/handler/drag_pan.dart index 73d41995e..6c800ecfd 100644 --- a/maplibre_gl_web/lib/src/ui/handler/drag_pan.dart +++ b/maplibre_gl_web/lib/src/ui/handler/drag_pan.dart @@ -32,6 +32,6 @@ class DragPanHandler extends JsObjectWrapper { onTouchStart(TouchEvent e) => jsObject.onTouchStart(e); /// Creates a new DragPanHandler from a [jsObject]. - DragPanHandler.fromJsObject(DragPanHandlerJsImpl jsObject) - : super.fromJsObject(jsObject); + DragPanHandler.fromJsObject(super.jsObject) + : super.fromJsObject(); } diff --git a/maplibre_gl_web/lib/src/ui/handler/drag_rotate.dart b/maplibre_gl_web/lib/src/ui/handler/drag_rotate.dart index afc541e3f..3e7e62cdd 100644 --- a/maplibre_gl_web/lib/src/ui/handler/drag_rotate.dart +++ b/maplibre_gl_web/lib/src/ui/handler/drag_rotate.dart @@ -30,6 +30,6 @@ class DragRotateHandler extends JsObjectWrapper { onMouseDown(MouseEvent e) => jsObject.onMouseDown(e); /// Creates a new DragPanHandler from a [jsObject]. - DragRotateHandler.fromJsObject(DragRotateHandlerJsImpl jsObject) - : super.fromJsObject(jsObject); + DragRotateHandler.fromJsObject(super.jsObject) + : super.fromJsObject(); } diff --git a/maplibre_gl_web/lib/src/ui/handler/keyboard.dart b/maplibre_gl_web/lib/src/ui/handler/keyboard.dart index ec976005f..73c33096c 100644 --- a/maplibre_gl_web/lib/src/ui/handler/keyboard.dart +++ b/maplibre_gl_web/lib/src/ui/handler/keyboard.dart @@ -21,6 +21,6 @@ class KeyboardHandler extends JsObjectWrapper { bool disable() => jsObject.disable(); /// Creates a new KeyboardHandler from a [jsObject]. - KeyboardHandler.fromJsObject(KeyboardHandlerJsImpl jsObject) - : super.fromJsObject(jsObject); + KeyboardHandler.fromJsObject(super.jsObject) + : super.fromJsObject(); } diff --git a/maplibre_gl_web/lib/src/ui/handler/scroll_zoom.dart b/maplibre_gl_web/lib/src/ui/handler/scroll_zoom.dart index 81ac94496..ca3abe901 100644 --- a/maplibre_gl_web/lib/src/ui/handler/scroll_zoom.dart +++ b/maplibre_gl_web/lib/src/ui/handler/scroll_zoom.dart @@ -46,6 +46,6 @@ class ScrollZoomHandler extends JsObjectWrapper { onWheel(WheelEvent e) => jsObject.onWheel(e); /// Creates a new ScrollZoomHandler from a [jsObject]. - ScrollZoomHandler.fromJsObject(ScrollZoomHandlerJsImpl jsObject) - : super.fromJsObject(jsObject); + ScrollZoomHandler.fromJsObject(super.jsObject) + : super.fromJsObject(); } diff --git a/maplibre_gl_web/lib/src/ui/handler/touch_zoom_rotate.dart b/maplibre_gl_web/lib/src/ui/handler/touch_zoom_rotate.dart index 16d75bef4..578dfd702 100644 --- a/maplibre_gl_web/lib/src/ui/handler/touch_zoom_rotate.dart +++ b/maplibre_gl_web/lib/src/ui/handler/touch_zoom_rotate.dart @@ -44,6 +44,6 @@ class TouchZoomRotateHandler onStart(TouchEvent e) => jsObject.onStart(e); /// Creates a new TouchZoomRotateHandler from a [jsObject]. - TouchZoomRotateHandler.fromJsObject(TouchZoomRotateHandlerJsImpl jsObject) - : super.fromJsObject(jsObject); + TouchZoomRotateHandler.fromJsObject(super.jsObject) + : super.fromJsObject(); } diff --git a/maplibre_gl_web/lib/src/ui/map.dart b/maplibre_gl_web/lib/src/ui/map.dart index 898b2fc2f..37fe18283 100644 --- a/maplibre_gl_web/lib/src/ui/map.dart +++ b/maplibre_gl_web/lib/src/ui/map.dart @@ -1296,8 +1296,8 @@ class MapOptions extends JsObjectWrapper { )); /// Creates a new MapOptions from a [jsObject]. - MapOptions.fromJsObject(MapOptionsJsImpl jsObject) - : super.fromJsObject(jsObject); + MapOptions.fromJsObject(super.jsObject) + : super.fromJsObject(); } class RequestParameters extends JsObjectWrapper { @@ -1327,8 +1327,8 @@ class RequestParameters extends JsObjectWrapper { )); /// Creates a new RequestParameters from a [jsObject]. - RequestParameters.fromJsObject(RequestParametersJsImpl jsObject) - : super.fromJsObject(jsObject); + RequestParameters.fromJsObject(super.jsObject) + : super.fromJsObject(); } /// Interface for interactive controls added to the map. This is a @@ -1379,5 +1379,5 @@ class IControl extends JsObjectWrapper { String getDefaultPosition() => jsObject.getDefaultPosition(); /// Creates a new IControl from a [jsObject]. - IControl.fromJsObject(IControlJsImpl jsObject) : super.fromJsObject(jsObject); + IControl.fromJsObject(super.jsObject) : super.fromJsObject(); } diff --git a/maplibre_gl_web/lib/src/ui/marker.dart b/maplibre_gl_web/lib/src/ui/marker.dart index e9251fbf0..9e24b74a4 100644 --- a/maplibre_gl_web/lib/src/ui/marker.dart +++ b/maplibre_gl_web/lib/src/ui/marker.dart @@ -155,6 +155,6 @@ class MarkerOptions extends JsObjectWrapper { )); /// Creates a new MarkerOptions from a [jsObject]. - MarkerOptions.fromJsObject(MarkerOptionsJsImpl jsObject) - : super.fromJsObject(jsObject); + MarkerOptions.fromJsObject(super.jsObject) + : super.fromJsObject(); } diff --git a/maplibre_gl_web/lib/src/ui/popup.dart b/maplibre_gl_web/lib/src/ui/popup.dart index 65d31f79e..67fa44677 100644 --- a/maplibre_gl_web/lib/src/ui/popup.dart +++ b/maplibre_gl_web/lib/src/ui/popup.dart @@ -215,6 +215,6 @@ class PopupOptions extends JsObjectWrapper { )); /// Creates a new PopupOptions from a [jsObject]. - PopupOptions.fromJsObject(PopupOptionsJsImpl jsObject) - : super.fromJsObject(jsObject); + PopupOptions.fromJsObject(super.jsObject) + : super.fromJsObject(); } diff --git a/maplibre_gl_web/lib/src/util/evented.dart b/maplibre_gl_web/lib/src/util/evented.dart index 46b733933..4c7d4f0f2 100644 --- a/maplibre_gl_web/lib/src/util/evented.dart +++ b/maplibre_gl_web/lib/src/util/evented.dart @@ -43,7 +43,7 @@ class Event extends JsObjectWrapper { preventDefault() => jsObject.preventDefault(); /// Creates a new Event from a [jsObject]. - Event.fromJsObject(EventJsImpl jsObject) : super.fromJsObject(jsObject); + Event.fromJsObject(super.jsObject) : super.fromJsObject(); } class Evented extends JsObjectWrapper { @@ -138,5 +138,5 @@ class Evented extends JsObjectWrapper { jsObject.setEventedParent(parent?.jsObject, data); /// Creates a new Evented from a [jsObject]. - Evented.fromJsObject(EventedJsImpl jsObject) : super.fromJsObject(jsObject); + Evented.fromJsObject(super.jsObject) : super.fromJsObject(); } From 8aab7fc95c4c7094c5c5138d4fe8329aa1ba28df Mon Sep 17 00:00:00 2001 From: Peter Leibiger Date: Sat, 18 May 2024 02:32:17 +0200 Subject: [PATCH 6/9] Format code --- lib/src/annotation_manager.dart | 3 +-- maplibre_gl_web/lib/src/geo/geojson.dart | 3 +-- maplibre_gl_web/lib/src/geo/lng_lat_bounds.dart | 3 +-- maplibre_gl_web/lib/src/style/evaluation_parameters.dart | 3 +-- .../lib/src/style/sources/geojson_source.dart | 3 +-- maplibre_gl_web/lib/src/style/sources/vector_source.dart | 3 +-- maplibre_gl_web/lib/src/style/style.dart | 6 ++---- maplibre_gl_web/lib/src/style/style_image.dart | 6 ++---- maplibre_gl_web/lib/src/ui/camera.dart | 9 +++------ .../lib/src/ui/control/attribution_control.dart | 7 ++----- .../lib/src/ui/control/geolocate_control.dart | 6 ++---- maplibre_gl_web/lib/src/ui/control/logo_control.dart | 3 +-- .../lib/src/ui/control/navigation_control.dart | 6 ++---- maplibre_gl_web/lib/src/ui/events.dart | 6 ++---- maplibre_gl_web/lib/src/ui/handler/box_zoom.dart | 3 +-- maplibre_gl_web/lib/src/ui/handler/dblclick_zoom.dart | 3 +-- maplibre_gl_web/lib/src/ui/handler/drag_pan.dart | 3 +-- maplibre_gl_web/lib/src/ui/handler/drag_rotate.dart | 3 +-- maplibre_gl_web/lib/src/ui/handler/keyboard.dart | 3 +-- maplibre_gl_web/lib/src/ui/handler/scroll_zoom.dart | 3 +-- .../lib/src/ui/handler/touch_zoom_rotate.dart | 3 +-- maplibre_gl_web/lib/src/ui/map.dart | 6 ++---- maplibre_gl_web/lib/src/ui/marker.dart | 3 +-- maplibre_gl_web/lib/src/ui/popup.dart | 3 +-- 24 files changed, 33 insertions(+), 67 deletions(-) diff --git a/lib/src/annotation_manager.dart b/lib/src/annotation_manager.dart index 4a63f0592..ea4d248fa 100644 --- a/lib/src/annotation_manager.dart +++ b/lib/src/annotation_manager.dart @@ -168,8 +168,7 @@ abstract class AnnotationManager { } class LineManager extends AnnotationManager { - LineManager(super.controller, - {super.onTap, super.enableInteraction = true}) + LineManager(super.controller, {super.onTap, super.enableInteraction = true}) : super( selectLayer: (Line line) => line.options.linePattern == null ? 0 : 1, ); diff --git a/maplibre_gl_web/lib/src/geo/geojson.dart b/maplibre_gl_web/lib/src/geo/geojson.dart index ea6a13b69..f523c5544 100644 --- a/maplibre_gl_web/lib/src/geo/geojson.dart +++ b/maplibre_gl_web/lib/src/geo/geojson.dart @@ -20,8 +20,7 @@ class FeatureCollection extends JsObjectWrapper { } /// Creates a new FeatureCollection from a [jsObject]. - FeatureCollection.fromJsObject(super.jsObject) - : super.fromJsObject(); + FeatureCollection.fromJsObject(super.jsObject) : super.fromJsObject(); } class Feature extends JsObjectWrapper { diff --git a/maplibre_gl_web/lib/src/geo/lng_lat_bounds.dart b/maplibre_gl_web/lib/src/geo/lng_lat_bounds.dart index d0c050aca..a620954e0 100644 --- a/maplibre_gl_web/lib/src/geo/lng_lat_bounds.dart +++ b/maplibre_gl_web/lib/src/geo/lng_lat_bounds.dart @@ -143,6 +143,5 @@ class LngLatBounds extends JsObjectWrapper { LngLatBounds.fromJsObject(LngLatBoundsJsImpl.convert(input)); /// Creates a new LngLatBounds from a [jsObject]. - LngLatBounds.fromJsObject(super.jsObject) - : super.fromJsObject(); + LngLatBounds.fromJsObject(super.jsObject) : super.fromJsObject(); } diff --git a/maplibre_gl_web/lib/src/style/evaluation_parameters.dart b/maplibre_gl_web/lib/src/style/evaluation_parameters.dart index 06d9d158e..bacfd9085 100644 --- a/maplibre_gl_web/lib/src/style/evaluation_parameters.dart +++ b/maplibre_gl_web/lib/src/style/evaluation_parameters.dart @@ -20,6 +20,5 @@ class EvaluationParameters extends JsObjectWrapper { dynamic getCrossfadeParameters() => jsObject.getCrossfadeParameters(); /// Creates a new EvaluationParameters from a [jsObject]. - EvaluationParameters.fromJsObject(super.jsObject) - : super.fromJsObject(); + EvaluationParameters.fromJsObject(super.jsObject) : super.fromJsObject(); } diff --git a/maplibre_gl_web/lib/src/style/sources/geojson_source.dart b/maplibre_gl_web/lib/src/style/sources/geojson_source.dart index 8113ade5b..0667e4d42 100644 --- a/maplibre_gl_web/lib/src/style/sources/geojson_source.dart +++ b/maplibre_gl_web/lib/src/style/sources/geojson_source.dart @@ -22,8 +22,7 @@ class GeoJsonSource extends Source { GeoJsonSource.fromJsObject(jsObject.setData(featureCollection.jsObject)); /// Creates a new GeoJsonSource from a [jsObject]. - GeoJsonSource.fromJsObject(super.jsObject) - : super.fromJsObject(); + GeoJsonSource.fromJsObject(super.jsObject) : super.fromJsObject(); @override get dict => { diff --git a/maplibre_gl_web/lib/src/style/sources/vector_source.dart b/maplibre_gl_web/lib/src/style/sources/vector_source.dart index e5bd0ae22..463b464a4 100644 --- a/maplibre_gl_web/lib/src/style/sources/vector_source.dart +++ b/maplibre_gl_web/lib/src/style/sources/vector_source.dart @@ -28,8 +28,7 @@ class VectorSource extends Source { } /// Creates a new VectorSource from a [jsObject]. - VectorSource.fromJsObject(super.jsObject) - : super.fromJsObject(); + VectorSource.fromJsObject(super.jsObject) : super.fromJsObject(); @override get dict { diff --git a/maplibre_gl_web/lib/src/style/style.dart b/maplibre_gl_web/lib/src/style/style.dart index 86be2ed0e..2805ceaca 100644 --- a/maplibre_gl_web/lib/src/style/style.dart +++ b/maplibre_gl_web/lib/src/style/style.dart @@ -9,8 +9,7 @@ class StyleSetterOptions extends JsObjectWrapper { bool get validate => jsObject.validate; /// Creates a new StyleSetterOptions from a [jsObject]. - StyleSetterOptions.fromJsObject(super.jsObject) - : super.fromJsObject(); + StyleSetterOptions.fromJsObject(super.jsObject) : super.fromJsObject(); } class Style extends JsObjectWrapper { @@ -173,6 +172,5 @@ class StyleFunction extends JsObjectWrapper { StyleFunction.fromJsObject(StyleFunctionJsImpl(base: base, stops: stops)); /// Creates a new StyleFunction from a [jsObject]. - StyleFunction.fromJsObject(super.jsObject) - : super.fromJsObject(); + StyleFunction.fromJsObject(super.jsObject) : super.fromJsObject(); } diff --git a/maplibre_gl_web/lib/src/style/style_image.dart b/maplibre_gl_web/lib/src/style/style_image.dart index c75f85afa..74977965f 100644 --- a/maplibre_gl_web/lib/src/style/style_image.dart +++ b/maplibre_gl_web/lib/src/style/style_image.dart @@ -12,8 +12,7 @@ class StyleImage extends JsObjectWrapper { StyleImageInterface.fromJsObject(jsObject.userImage); /// Creates a new EvaluationParameters from a [jsObject]. - StyleImage.fromJsObject(super.jsObject) - : super.fromJsObject(); + StyleImage.fromJsObject(super.jsObject) : super.fromJsObject(); } class StyleImageInterface extends JsObjectWrapper { @@ -26,6 +25,5 @@ class StyleImageInterface extends JsObjectWrapper { Function get onRemove => jsObject.onRemove; /// Creates a new EvaluationParameters from a [jsObject]. - StyleImageInterface.fromJsObject(super.jsObject) - : super.fromJsObject(); + StyleImageInterface.fromJsObject(super.jsObject) : super.fromJsObject(); } diff --git a/maplibre_gl_web/lib/src/ui/camera.dart b/maplibre_gl_web/lib/src/ui/camera.dart index 202341fec..ef72be799 100644 --- a/maplibre_gl_web/lib/src/ui/camera.dart +++ b/maplibre_gl_web/lib/src/ui/camera.dart @@ -47,8 +47,7 @@ class CameraOptions extends JsObjectWrapper { )); /// Creates a new CameraOptions from a [jsObject]. - CameraOptions.fromJsObject(super.jsObject) - : super.fromJsObject(); + CameraOptions.fromJsObject(super.jsObject) : super.fromJsObject(); } /// Options common to map movement methods that involve animation, such as {@link MapLibreMap#panBy} and @@ -90,8 +89,7 @@ class AnimationOptions extends JsObjectWrapper { )); /// Creates a new AnimationOptions from a [jsObject]. - AnimationOptions.fromJsObject(super.jsObject) - : super.fromJsObject(); + AnimationOptions.fromJsObject(super.jsObject) : super.fromJsObject(); } /// Options for setting padding on a call to {@link MapLibreMap#fitBounds}. All properties of this object must be @@ -125,8 +123,7 @@ class PaddingOptions extends JsObjectWrapper { )); /// Creates a new PaddingOptions from a [jsObject]. - PaddingOptions.fromJsObject(super.jsObject) - : super.fromJsObject(); + PaddingOptions.fromJsObject(super.jsObject) : super.fromJsObject(); } class Camera extends Evented { diff --git a/maplibre_gl_web/lib/src/ui/control/attribution_control.dart b/maplibre_gl_web/lib/src/ui/control/attribution_control.dart index 5bc147257..325fcb813 100644 --- a/maplibre_gl_web/lib/src/ui/control/attribution_control.dart +++ b/maplibre_gl_web/lib/src/ui/control/attribution_control.dart @@ -16,9 +16,7 @@ class AttributionControlOptions )); /// Creates a new AttributionControlOptions from a [jsObject]. - AttributionControlOptions.fromJsObject( - super.jsObject) - : super.fromJsObject(); + AttributionControlOptions.fromJsObject(super.jsObject) : super.fromJsObject(); } /// A `AttributionControl` control contains zoom buttons and a compass. @@ -44,6 +42,5 @@ class AttributionControl extends JsObjectWrapper { onRemove() => jsObject.onRemove(); /// Creates a new MapOptions from a [jsObject]. - AttributionControl.fromJsObject(super.jsObject) - : super.fromJsObject(); + AttributionControl.fromJsObject(super.jsObject) : super.fromJsObject(); } diff --git a/maplibre_gl_web/lib/src/ui/control/geolocate_control.dart b/maplibre_gl_web/lib/src/ui/control/geolocate_control.dart index 11dd14e80..dc645d2a4 100644 --- a/maplibre_gl_web/lib/src/ui/control/geolocate_control.dart +++ b/maplibre_gl_web/lib/src/ui/control/geolocate_control.dart @@ -29,8 +29,7 @@ class GeolocateControlOptions )); /// Creates a new MapOptions from a [jsObject]. - GeolocateControlOptions.fromJsObject(super.jsObject) - : super.fromJsObject(); + GeolocateControlOptions.fromJsObject(super.jsObject) : super.fromJsObject(); } class PositionOptions extends JsObjectWrapper { @@ -50,8 +49,7 @@ class PositionOptions extends JsObjectWrapper { )); /// Creates a new MapOptions from a [jsObject]. - PositionOptions.fromJsObject(super.jsObject) - : super.fromJsObject(); + PositionOptions.fromJsObject(super.jsObject) : super.fromJsObject(); } /// A `GeolocateControl` control provides a button that uses the browser's geolocation diff --git a/maplibre_gl_web/lib/src/ui/control/logo_control.dart b/maplibre_gl_web/lib/src/ui/control/logo_control.dart index 48cf2090d..b0b404ee0 100644 --- a/maplibre_gl_web/lib/src/ui/control/logo_control.dart +++ b/maplibre_gl_web/lib/src/ui/control/logo_control.dart @@ -14,6 +14,5 @@ class LogoControl extends JsObjectWrapper { getDefaultPosition() => jsObject.getDefaultPosition(); /// Creates a new LogoControl from a [jsObject]. - LogoControl.fromJsObject(super.jsObject) - : super.fromJsObject(); + LogoControl.fromJsObject(super.jsObject) : super.fromJsObject(); } diff --git a/maplibre_gl_web/lib/src/ui/control/navigation_control.dart b/maplibre_gl_web/lib/src/ui/control/navigation_control.dart index 1fb3f9ecc..fa9fb957f 100644 --- a/maplibre_gl_web/lib/src/ui/control/navigation_control.dart +++ b/maplibre_gl_web/lib/src/ui/control/navigation_control.dart @@ -23,8 +23,7 @@ class NavigationControlOptions )); /// Creates a new NavigationControlOptions from a [jsObject]. - NavigationControlOptions.fromJsObject(super.jsObject) - : super.fromJsObject(); + NavigationControlOptions.fromJsObject(super.jsObject) : super.fromJsObject(); } /// A `NavigationControl` control contains zoom buttons and a compass. @@ -51,6 +50,5 @@ class NavigationControl extends JsObjectWrapper { onRemove() => jsObject.onRemove(); /// Creates a new MapOptions from a [jsObject]. - NavigationControl.fromJsObject(super.jsObject) - : super.fromJsObject(); + NavigationControl.fromJsObject(super.jsObject) : super.fromJsObject(); } diff --git a/maplibre_gl_web/lib/src/ui/events.dart b/maplibre_gl_web/lib/src/ui/events.dart index 491a33eef..621d56ef0 100644 --- a/maplibre_gl_web/lib/src/ui/events.dart +++ b/maplibre_gl_web/lib/src/ui/events.dart @@ -37,8 +37,7 @@ class MapMouseEvent extends JsObjectWrapper { bool get defaultPrevented => jsObject.defaultPrevented; /// Creates a new MapMouseEvent from a [jsObject]. - MapMouseEvent.fromJsObject(super.jsObject) - : super.fromJsObject(); + MapMouseEvent.fromJsObject(super.jsObject) : super.fromJsObject(); } class MapTouchEvent extends JsObjectWrapper { @@ -80,6 +79,5 @@ class MapTouchEvent extends JsObjectWrapper { bool get defaultPrevented => jsObject.defaultPrevented; /// Creates a new MapTouchEvent from a [jsObject]. - MapTouchEvent.fromJsObject(super.jsObject) - : super.fromJsObject(); + MapTouchEvent.fromJsObject(super.jsObject) : super.fromJsObject(); } diff --git a/maplibre_gl_web/lib/src/ui/handler/box_zoom.dart b/maplibre_gl_web/lib/src/ui/handler/box_zoom.dart index 37ceac41f..8beaec0be 100644 --- a/maplibre_gl_web/lib/src/ui/handler/box_zoom.dart +++ b/maplibre_gl_web/lib/src/ui/handler/box_zoom.dart @@ -30,6 +30,5 @@ class BoxZoomHandler extends JsObjectWrapper { onMouseDown(MouseEvent e) => jsObject.onMouseDown(e); /// Creates a new BoxZoomHandler from a [jsObject]. - BoxZoomHandler.fromJsObject(super.jsObject) - : super.fromJsObject(); + BoxZoomHandler.fromJsObject(super.jsObject) : super.fromJsObject(); } diff --git a/maplibre_gl_web/lib/src/ui/handler/dblclick_zoom.dart b/maplibre_gl_web/lib/src/ui/handler/dblclick_zoom.dart index cc5272f29..b0e87d239 100644 --- a/maplibre_gl_web/lib/src/ui/handler/dblclick_zoom.dart +++ b/maplibre_gl_web/lib/src/ui/handler/dblclick_zoom.dart @@ -32,6 +32,5 @@ class DoubleClickZoomHandler onDblClick(MapMouseEvent e) => jsObject.onDblClick(e.jsObject); /// Creates a new DoubleClickZoomHandler from a [jsObject]. - DoubleClickZoomHandler.fromJsObject(super.jsObject) - : super.fromJsObject(); + DoubleClickZoomHandler.fromJsObject(super.jsObject) : super.fromJsObject(); } diff --git a/maplibre_gl_web/lib/src/ui/handler/drag_pan.dart b/maplibre_gl_web/lib/src/ui/handler/drag_pan.dart index 6c800ecfd..a67fdeddf 100644 --- a/maplibre_gl_web/lib/src/ui/handler/drag_pan.dart +++ b/maplibre_gl_web/lib/src/ui/handler/drag_pan.dart @@ -32,6 +32,5 @@ class DragPanHandler extends JsObjectWrapper { onTouchStart(TouchEvent e) => jsObject.onTouchStart(e); /// Creates a new DragPanHandler from a [jsObject]. - DragPanHandler.fromJsObject(super.jsObject) - : super.fromJsObject(); + DragPanHandler.fromJsObject(super.jsObject) : super.fromJsObject(); } diff --git a/maplibre_gl_web/lib/src/ui/handler/drag_rotate.dart b/maplibre_gl_web/lib/src/ui/handler/drag_rotate.dart index 3e7e62cdd..c7adac83f 100644 --- a/maplibre_gl_web/lib/src/ui/handler/drag_rotate.dart +++ b/maplibre_gl_web/lib/src/ui/handler/drag_rotate.dart @@ -30,6 +30,5 @@ class DragRotateHandler extends JsObjectWrapper { onMouseDown(MouseEvent e) => jsObject.onMouseDown(e); /// Creates a new DragPanHandler from a [jsObject]. - DragRotateHandler.fromJsObject(super.jsObject) - : super.fromJsObject(); + DragRotateHandler.fromJsObject(super.jsObject) : super.fromJsObject(); } diff --git a/maplibre_gl_web/lib/src/ui/handler/keyboard.dart b/maplibre_gl_web/lib/src/ui/handler/keyboard.dart index 73c33096c..ed4b02eec 100644 --- a/maplibre_gl_web/lib/src/ui/handler/keyboard.dart +++ b/maplibre_gl_web/lib/src/ui/handler/keyboard.dart @@ -21,6 +21,5 @@ class KeyboardHandler extends JsObjectWrapper { bool disable() => jsObject.disable(); /// Creates a new KeyboardHandler from a [jsObject]. - KeyboardHandler.fromJsObject(super.jsObject) - : super.fromJsObject(); + KeyboardHandler.fromJsObject(super.jsObject) : super.fromJsObject(); } diff --git a/maplibre_gl_web/lib/src/ui/handler/scroll_zoom.dart b/maplibre_gl_web/lib/src/ui/handler/scroll_zoom.dart index ca3abe901..95f2ebb02 100644 --- a/maplibre_gl_web/lib/src/ui/handler/scroll_zoom.dart +++ b/maplibre_gl_web/lib/src/ui/handler/scroll_zoom.dart @@ -46,6 +46,5 @@ class ScrollZoomHandler extends JsObjectWrapper { onWheel(WheelEvent e) => jsObject.onWheel(e); /// Creates a new ScrollZoomHandler from a [jsObject]. - ScrollZoomHandler.fromJsObject(super.jsObject) - : super.fromJsObject(); + ScrollZoomHandler.fromJsObject(super.jsObject) : super.fromJsObject(); } diff --git a/maplibre_gl_web/lib/src/ui/handler/touch_zoom_rotate.dart b/maplibre_gl_web/lib/src/ui/handler/touch_zoom_rotate.dart index 578dfd702..9ba5a74e1 100644 --- a/maplibre_gl_web/lib/src/ui/handler/touch_zoom_rotate.dart +++ b/maplibre_gl_web/lib/src/ui/handler/touch_zoom_rotate.dart @@ -44,6 +44,5 @@ class TouchZoomRotateHandler onStart(TouchEvent e) => jsObject.onStart(e); /// Creates a new TouchZoomRotateHandler from a [jsObject]. - TouchZoomRotateHandler.fromJsObject(super.jsObject) - : super.fromJsObject(); + TouchZoomRotateHandler.fromJsObject(super.jsObject) : super.fromJsObject(); } diff --git a/maplibre_gl_web/lib/src/ui/map.dart b/maplibre_gl_web/lib/src/ui/map.dart index 37fe18283..4e462392b 100644 --- a/maplibre_gl_web/lib/src/ui/map.dart +++ b/maplibre_gl_web/lib/src/ui/map.dart @@ -1296,8 +1296,7 @@ class MapOptions extends JsObjectWrapper { )); /// Creates a new MapOptions from a [jsObject]. - MapOptions.fromJsObject(super.jsObject) - : super.fromJsObject(); + MapOptions.fromJsObject(super.jsObject) : super.fromJsObject(); } class RequestParameters extends JsObjectWrapper { @@ -1327,8 +1326,7 @@ class RequestParameters extends JsObjectWrapper { )); /// Creates a new RequestParameters from a [jsObject]. - RequestParameters.fromJsObject(super.jsObject) - : super.fromJsObject(); + RequestParameters.fromJsObject(super.jsObject) : super.fromJsObject(); } /// Interface for interactive controls added to the map. This is a diff --git a/maplibre_gl_web/lib/src/ui/marker.dart b/maplibre_gl_web/lib/src/ui/marker.dart index 9e24b74a4..57e1b9c28 100644 --- a/maplibre_gl_web/lib/src/ui/marker.dart +++ b/maplibre_gl_web/lib/src/ui/marker.dart @@ -155,6 +155,5 @@ class MarkerOptions extends JsObjectWrapper { )); /// Creates a new MarkerOptions from a [jsObject]. - MarkerOptions.fromJsObject(super.jsObject) - : super.fromJsObject(); + MarkerOptions.fromJsObject(super.jsObject) : super.fromJsObject(); } diff --git a/maplibre_gl_web/lib/src/ui/popup.dart b/maplibre_gl_web/lib/src/ui/popup.dart index 67fa44677..14f895679 100644 --- a/maplibre_gl_web/lib/src/ui/popup.dart +++ b/maplibre_gl_web/lib/src/ui/popup.dart @@ -215,6 +215,5 @@ class PopupOptions extends JsObjectWrapper { )); /// Creates a new PopupOptions from a [jsObject]. - PopupOptions.fromJsObject(super.jsObject) - : super.fromJsObject(); + PopupOptions.fromJsObject(super.jsObject) : super.fromJsObject(); } From 25e75150a29b9a04e6d3df269b455955a78a80f0 Mon Sep 17 00:00:00 2001 From: Peter Leibiger Date: Sat, 18 May 2024 02:33:56 +0200 Subject: [PATCH 7/9] Cancel in progress jobs if new commits are pushed --- .github/workflows/flutter_ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/flutter_ci.yml b/.github/workflows/flutter_ci.yml index 9ad8ad459..690989156 100644 --- a/.github/workflows/flutter_ci.yml +++ b/.github/workflows/flutter_ci.yml @@ -2,6 +2,11 @@ name: Flutter CI on: [push, pull_request, workflow_dispatch] +# Ensure that new pushes/updates cancel running jobs +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: format: name: "Check formatting" From f19457c149bb32076be24764d2c03288befc5621 Mon Sep 17 00:00:00 2001 From: Peter Leibiger Date: Sun, 19 May 2024 00:08:59 +0200 Subject: [PATCH 8/9] Update .github/workflows/publish.yml Co-authored-by: Joscha <34318751+josxha@users.noreply.github.com> --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index a473bb762..8434b2e52 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -19,7 +19,7 @@ jobs: with: working-directory: maplibre_gl_web publish_maplibre_gl: - needs: [publish_maplibre_gl_web] + needs: [publish_maplibre_gl_platform_interface, publish_maplibre_gl_web] uses: ./.github/workflows/publish_single.yml with: working-directory: . From 8a215ebc8cd235fd8a591d74d0a7d6cc8d047c03 Mon Sep 17 00:00:00 2001 From: Peter Leibiger Date: Tue, 21 May 2024 13:41:43 +0200 Subject: [PATCH 9/9] Update .github/workflows/publish-single.yml Co-authored-by: Joscha <34318751+josxha@users.noreply.github.com> --- .github/workflows/publish-single.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-single.yml b/.github/workflows/publish-single.yml index 6c967d007..b5f91a6ca 100644 --- a/.github/workflows/publish-single.yml +++ b/.github/workflows/publish-single.yml @@ -20,7 +20,7 @@ jobs: steps: - uses: actions/checkout@v4 # Setup Dart SDK with JWT token - - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 + - uses: dart-lang/setup-dart@v1 - name: Install dependencies run: dart pub get # Publishing...