Skip to content

refactor: make BuiltInContainer public#240

Merged
payam-zahedi merged 4 commits into
mainfrom
feat/make-container-public
Apr 19, 2026
Merged

refactor: make BuiltInContainer public#240
payam-zahedi merged 4 commits into
mainfrom
feat/make-container-public

Conversation

@payam-zahedi

@payam-zahedi payam-zahedi commented Apr 19, 2026

Copy link
Copy Markdown
Owner

fixes: #228

@codecov

codecov Bot commented Apr 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.04%. Comparing base (670035c) to head (53322ba).
⚠️ Report is 5 commits behind head on main.

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     
Flag Coverage Δ
flutter 77.04% <100.00%> (+2.61%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 / _FadeDismissible from BuiltInBuilder into a new BuiltInContainer widget and exports it from the package.
  • Updates BuiltInBuilder to use BuiltInContainer and adjusts public exports accordingly.
  • Replaces the previous BuiltInBuilder cursor test with a new, broader BuiltInContainer test 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.

Comment thread lib/src/built_in/widget/built_in_container.dart
Comment thread lib/src/core/toastification.dart
Comment thread test/src/built_in/built_in_container_test.dart Outdated
Comment thread test/src/built_in/built_in_container_test.dart
Comment thread test/src/built_in/built_in_container_test.dart
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@payam-zahedi
payam-zahedi merged commit aa42f80 into main Apr 19, 2026
4 checks passed
@payam-zahedi
payam-zahedi deleted the feat/make-container-public branch April 19, 2026 08:34
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.

Add dragToClose option for custom toasts

2 participants