Skip to content

Commit

Permalink
Merge pull request #21 from cb-cloud/feature/guard-size-change-detection
Browse files Browse the repository at this point in the history
Guard size change detection
  • Loading branch information
Kurogoma4D authored Jul 1, 2022
2 parents d33e05d + 1ca3615 commit ec04ed3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 1.1.2
### FIX
- Prevent some `Completer` error.
- When the size of a notification was changed unexpectedly, a `Future already completed.` error could occur.

## 1.1.1
### FIX
- Fixed warnings for Flutter3.0.0
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ packages:
path: ".."
relative: true
source: path
version: "1.1.1"
version: "1.1.2"
matcher:
dependency: transitive
description:
Expand Down
1 change: 1 addition & 0 deletions lib/src/in_app_notification.dart
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ class _NotificationController extends InheritedWidget {
width: state.screenSize.width,
child: SizeListenableContainer(
onSizeChanged: (size) {
if (state.notificationSizeCompleter.isCompleted) return;
final topPadding = MediaQuery.of(context).viewPadding.top;
state.notificationSizeCompleter
.complete(size + Offset(0, topPadding));
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: in_app_notification
description: A Flutter package to show custom in-app notification with any Widgets.
version: 1.1.1
version: 1.1.2
repository: https://github.com/cb-cloud/flutter_in_app_notification

environment:
Expand Down

0 comments on commit ec04ed3

Please sign in to comment.