Skip to content

add extra callback for main marker change - #72

Closed
demon36 wants to merge 3 commits into
itsarvinddev:masterfrom
demon36:master
Closed

demon36 wants to merge 3 commits into
itsarvinddev:masterfrom
demon36:master

Conversation

@demon36

@demon36 demon36 commented Apr 27, 2026

Copy link
Copy Markdown

No description provided.

@kilo-code-bot

kilo-code-bot Bot commented Apr 27, 2026

Copy link
Copy Markdown

Kilo Code Review could not run — your account is out of credits.

Add credits or switch to a free model to enable reviews on this change.

itsarvinddev added a commit that referenced this pull request Sep 9, 2026
…uild

The first CI run failed four ways. Three were real; all three were things the
workflow existed to catch.

1. `channel: 3.38.0` — subosito/flutter-action's `channel` input only accepts
   stable/beta/master, so pinning the floor failed with "Unable to determine
   Flutter version for channel: 3.38.0". An exact release goes in
   `flutter-version`. The matrix is now an explicit `include` with an `id`, both
   because it reads better in the checks list and because `matrix.flutter-version`
   would have been parsed as subtraction in an Actions expression.

2. pana scored 150/160 on CI against 160/160 locally, losing the whole
   "example and screenshots" section to twelve "No such file or directory"
   errors. The screenshots are committed and are not LFS pointers -- pana shells
   out to ImageMagick and cwebp to generate thumbnails, and neither is on the
   ubuntu runner. Installed in that job.

3. The example's Android build failed on "You are applying Flutter's
   app_plugin_loader Gradle plugin imperatively using the apply script method,
   which is not possible anymore." The scaffold dated from 2022: Gradle 7.4,
   AGP 7.1.2, Kotlin 1.6.10, Groovy DSL, imperative plugin loader. Regenerated
   from the current Flutter template -- Kotlin DSL, declarative `plugins` block,
   Gradle 9.3.1, Java 17 -- keeping the API key meta-data and location
   permissions. Also dropped the legacy `package=` attribute from all three
   manifests (the namespace now lives in build.gradle.kts) and adopted the
   PROCESS_TEXT `queries` block the current template ships.

   `flutter build apk --debug` now succeeds locally.

The fourth failure is the third-party Kilo Code Review bot, which also reports
failure on the pre-existing #71 and #72.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
itsarvinddev added a commit that referenced this pull request Sep 12, 2026
…uild

The first CI run failed four ways. Three were real; all three were things the
workflow existed to catch.

1. `channel: 3.38.0` — subosito/flutter-action's `channel` input only accepts
   stable/beta/master, so pinning the floor failed with "Unable to determine
   Flutter version for channel: 3.38.0". An exact release goes in
   `flutter-version`. The matrix is now an explicit `include` with an `id`, both
   because it reads better in the checks list and because `matrix.flutter-version`
   would have been parsed as subtraction in an Actions expression.

2. pana scored 150/160 on CI against 160/160 locally, losing the whole
   "example and screenshots" section to twelve "No such file or directory"
   errors. The screenshots are committed and are not LFS pointers -- pana shells
   out to ImageMagick and cwebp to generate thumbnails, and neither is on the
   ubuntu runner. Installed in that job.

3. The example's Android build failed on "You are applying Flutter's
   app_plugin_loader Gradle plugin imperatively using the apply script method,
   which is not possible anymore." The scaffold dated from 2022: Gradle 7.4,
   AGP 7.1.2, Kotlin 1.6.10, Groovy DSL, imperative plugin loader. Regenerated
   from the current Flutter template -- Kotlin DSL, declarative `plugins` block,
   Gradle 9.3.1, Java 17 -- keeping the API key meta-data and location
   permissions. Also dropped the legacy `package=` attribute from all three
   manifests (the namespace now lives in build.gradle.kts) and adopted the
   PROCESS_TEXT `queries` block the current template ships.

   `flutter build apk --debug` now succeeds locally.

The fourth failure is the third-party Kilo Code Review bot, which also reports
failure on the pre-existing #71 and #72.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@itsarvinddev

Copy link
Copy Markdown
Owner

Thank you, @demon36 — this filled a genuine gap. There was no way to observe the picked coordinate as it changed; you only found out at the end, via onNext. The callback is in #73, credited to you with Co-Authored-By.

Three changes on top of your version, all mechanical rather than disagreements:

Renamed to onMainMarkerPositionChanged. The codebase says "position" throughout (initialPosition, _getAddressForPosition) and the sibling callbacks are past tense (onMapTypeChanged, onAddressDecoded), so this reads consistently with them.

Retyped ValueChanged<LatLng>. Function(LatLng?)? promised a null the call site could never actually produce, which just pushes an unnecessary null check onto everyone using it.

Moved out of _createMarkers. That is a pure builder called during build, so firing a host callback from it means emitting on every rebuild rather than on every move. It is now paired with each position assignment and routed through one helper, so it fires exactly once per change — and now covers paths your version could not reach from _createMarkers: the map tap, the current-location button, a chosen search suggestion, and MapLocationPickerController.moveTo.

The main marker is also draggable now, so the callback reports drags too — which is what the name suggests should happen.

Your dart format hunk was correct and is kept, as its own commit, since it was fixing indentation an earlier commit had broken.

Closing as superseded by #73. Thanks for spotting it.

itsarvinddev added a commit that referenced this pull request Sep 12, 2026
Closes #70, #68, #65, #14. Supersedes #72, #71, #67, #66.

pub.dev score 120/160 -> 160/160. Tests 0 -> 83, green on Flutter 3.38.1 (the declared floor) and 3.47.2.
@itsarvinddev

Copy link
Copy Markdown
Owner

#73 is merged and released as 4.0.0, carrying your change with credit — see the detailed comment above. Closing as superseded, not rejected. Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants