Repository navigation
feat: Add Router.isEmpty getter - #75
Conversation
📝 WalkthroughWalkthroughThe changes introduce a new Changes
Sequence Diagram(s)sequenceDiagram
participant Test
participant Router
participant PathTrie
Test->>Router: create Router<T>()
Test->>Router: check isEmpty
Router->>PathTrie: check isEmpty
PathTrie-->>Router: return true
Router-->>Test: return true
Test->>Router: add route
Test->>Router: check isEmpty
Router->>PathTrie: check isEmpty
PathTrie-->>Router: return false
Router-->>Test: return false
Possibly related PRs
Note ⚡️ AI Code Reviews for VS Code, Cursor, WindsurfCodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback. Note ⚡️ Faster reviews with cachingCodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (5)
⏰ Context from checks skipped due to timeout of 90000ms (2)
🔇 Additional comments (10)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
e85ac75 to
4ce5e47
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #75 +/- ##
==========================================
+ Coverage 81.32% 81.35% +0.03%
==========================================
Files 79 80 +1
Lines 2426 2430 +4
Branches 1361 1364 +3
==========================================
+ Hits 1973 1977 +4
Misses 453 453 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
4ce5e47 to
45deb92
Compare
45deb92 to
5cf1cfe
Compare
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
Description
isEmptygetter toRouter(lib/src/router/router.dart) to indicate if any routes have been added.isEmptygetter to_TrieNodeandPathTrie(lib/src/router/path_trie.dart) to indicate if the trie contains any routes.LookupResultclass fromlib/src/router/path_trie.dartto a new filelib/src/router/lookup_result.dartLookupResultfrom the main library filelib/relic.dart.Related Issues
Pre-Launch Checklist
Please ensure that your PR meets the following requirements before submitting:
///), ensuring consistency with existing project documentation.Breaking Changes
Summary by CodeRabbit
LookupResult<T>class to represent the outcome of route lookups, now available in the public API.isEmptyproperty to bothPathTrieandRouterclasses, allowing users to check if any routes are registered.isEmptyproperty in routers.