feat(install): generate routing config with URL strategy support#7
Merged
anilcancakir merged 2 commits intomasterfrom Apr 7, 2026
Merged
feat(install): generate routing config with URL strategy support#7anilcancakir merged 2 commits intomasterfrom
anilcancakir merged 2 commits intomasterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new always-generated lib/config/routing.dart during magic install to support URL strategy configuration (e.g., switching Flutter web URLs from hash to path strategy), and wires it into the generated main.dart bootstrap.
Changes:
- Add a new install stub (
assets/stubs/install/routing_config.stub) and expose it viaInstallStubs.routingConfigContent(). - Ensure
magic installalways generateslib/config/routing.dart. - Include the new routing config import + factory in generated
lib/main.dart.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Documents the new generated routing.dart config file in the project tree. |
| lib/src/stubs/install_stubs.dart | Adds a stub loader method for routing config content. |
| lib/src/commands/install_command.dart | Writes routing.dart on install and injects it into main.dart config imports/factories. |
| CLAUDE.md | Updates documented stub counts to reflect the current repository state. |
| CHANGELOG.md | Adds an Unreleased entry describing the new routing config generation. |
| assets/stubs/install/routing_config.stub | New template for lib/config/routing.dart with url_strategy defaulting to null. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
config/routing.dartgeneration tomagic install— supports the new URL strategy feature from fluttersdk/magic#40.routing_config.stubtemplate withurl_strategy: nulldefaultInstallStubs.routingConfigContent()methodapp.dartandview.dart) — no--without-routingflag needed since default is a no-opmain.dartTest plan
dart analyze— zero warningsmagic installin a fresh Flutter project generateslib/config/routing.dartmain.dartincludes routing config import and factory