Skip to content

1.0.1: programmatic phone changes, shared error tracker, reset grace - #10

Merged
itsarvinddev merged 2 commits into
mainfrom
fix/1.0.1-follow-ups
Sep 13, 2026
Merged

itsarvinddev merged 2 commits into
mainfrom
fix/1.0.1-follow-ups

Conversation

@itsarvinddev

Copy link
Copy Markdown
Owner

Summary

Follow-up fixes to 1.0.0, each with a regression test in test/regression_test.dart that fails before the change.

  • Programmatic phone changes no longer log "setState() or markNeedsBuild() called during build". Affected: prefill(countryIsoCode:), reset() to another country, a detected international number, toggling formatInput, replacing country lists, and prefilling +1… while the phone field is shown. flutter_intl_phone_field 0.1.1 rewrites its controller from didUpdateWidget; the identifier field now hands it a fresh mirror controller exactly when that rewrite is coming. The root fix is in itsarvinddev/flutter_intl_phone_field (0.1.2, not yet published); this workaround keeps 1.0.1 correct on 0.1.1 and is harmless on 0.1.2.
  • One error tracker per flow. A success now dismisses an error shown by an earlier copy of a screen (wrong code → Edit → Continue → right code).
  • Reset waits 150 ms for the app to navigate. No flash of the empty form before a late auth redirect. The form stays busy during the wait, and a step the app opens meanwhile is kept.
  • The keyboard action key no longer double-submits during a request (a 1.0.0 bug).
  • CI: demo deploy uses GITHUB_TOKEN (the PERSONAL_TOKEN secret was rejected, so every 1.0.0 deploy failed); the publish job now times out after 15 minutes instead of waiting for interactive sign-in.

Verification

  • flutter test: 199 passed, both on flutter_intl_phone_field 0.1.1 and with a path override to the patched 0.1.2.
  • flutter analyze lib test and dart format --set-exit-if-changed .: clean. Example app: analyze and tests clean.
  • Two adversarial review passes over these fixes. Their findings are fixed and covered by tests.

Known and unchanged from 1.0.0: if the app already has two SnackBars queued, a success can hide the app's message rather than the package error. Flutter has no public API for inspecting the SnackBar queue.

🤖 Generated with Claude Code

itsarvinddev and others added 2 commits September 13, 2026 12:38
…grace

- Changing the country from code (prefill, reset, a detected
  international number), toggling formatInput, replacing the country
  lists, or prefilling "+1..." while the phone field is shown no longer
  logs "setState() or markNeedsBuild() called during build". The field
  gets a fresh mirror controller when flutter_intl_phone_field 0.1.1 is
  about to rewrite it mid-build, and only then, so a host rebuilding
  with a new list instance keeps its undo history.
- The screens of a FlutterAnimatedLogin share one ScreenErrorSnackBar,
  so a success dismisses an error shown by an earlier copy of a screen
  (wrong code, Edit, Continue, right code).
- The post-success reset waits 150 ms of frames for the app to navigate.
  The form stays busy meanwhile, and a step the app opens during the
  wait is kept.
- The keyboard's action key no longer submits while a request or the
  reset wait is in progress.

Each has a regression test that fails before the change.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
- Build & Release failed on every push to main for 1.0.0: the
  PERSONAL_TOKEN secret was rejected ("Invalid username or token").
  The job already has contents: write, so its own token can push
  gh-pages.
- The tag-triggered publish job waited indefinitely for interactive
  pub.dev sign-in because automated publishing is not enabled for the
  package; give it a 15-minute timeout.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings September 13, 2026 07:09

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@itsarvinddev
itsarvinddev merged commit 89ad23b into main Sep 13, 2026
4 checks passed
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