Skip to content

Conversation

@Neelansh-ns
Copy link

Add Hot Reload Support to Marqueer Widget

This PR implements hot reload support for the Marqueer widget, enabling smooth development experience when modifying widget properties during Flutter hot reload.

Changes

  • Added didUpdateWidget lifecycle method to detect when key animation properties change
  • Automatically restarts animations when critical properties are updated (pps, direction, edgeDuration, infinity)
  • Preserves current scroll position during widget updates
  • Only restarts when autoStart is enabled

Benefits

  • Developers can now modify Marqueer properties and see changes immediately during hot reload
  • No need to perform full app restart when tweaking animation parameters
  • Maintains smooth user experience by preserving scroll state

Technical Details

  • Monitors property changes in didUpdateWidget
  • Cleanly stops current animations before restarting
  • Maintains scroll controller state to prevent jarring position resets

@Neelansh-ns
Copy link
Author

@GeceGibi Please review the above PR.

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.

1 participant