refactor: make BuiltInContainer public#240
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #240 +/- ##
==========================================
+ Coverage 74.43% 77.04% +2.61%
==========================================
Files 32 33 +1
Lines 927 928 +1
==========================================
+ Hits 690 715 +25
+ Misses 237 213 -24
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Refactors the built-in toast wrapper behavior into a standalone, publicly exported BuiltInContainer so custom toasts can reuse built-in interactions (hover pause, click handling, drag-to-dismiss), aligning with the goal in issue #228.
Changes:
- Extracts
_BuiltInContainer/_FadeDismissiblefromBuiltInBuilderinto a newBuiltInContainerwidget and exports it from the package. - Updates
BuiltInBuilderto useBuiltInContainerand adjusts public exports accordingly. - Replaces the previous
BuiltInBuildercursor test with a new, broaderBuiltInContainertest suite (margin, hover pause, tap, cursor, drag-to-dismiss).
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| test/src/built_in/built_in_container_test.dart | New widget tests covering BuiltInContainer behaviors (padding, hover pause, tap, cursor, drag-to-dismiss). |
| test/src/built_in/built_in_builder_test.dart | Removes the older BuiltInBuilder-focused cursor test file. |
| lib/toastification.dart | Exports BuiltInContainer publicly (hiding only test keys) and adjusts BuiltInBuilder export hides. |
| lib/src/core/toastification.dart | Updates showCustom API surface (removes dismissDirection parameter). |
| lib/src/built_in/widget/built_in_container.dart | Adds new public BuiltInContainer implementation (including drag-to-dismiss wrapper). |
| lib/src/built_in/built_in_builder.dart | Swaps internal container usage to the new exported BuiltInContainer and removes embedded container code. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
fixes: #228