fix: fix animationcontroller

This commit is contained in:
mike doornenbal 2024-04-29 14:06:04 +02:00
parent 9df43a3ff3
commit d3a380523b
8 changed files with 29 additions and 16 deletions

View file

@ -1,4 +1,9 @@
## [1.3.0] - 30 April 2024
## [1.3.1] - 30 April 2024
* Fix Animationcontroller not disposing correctly.
* Updated flutter_animated_widgets to 0.1.1
## [1.3.0] - 23 April 2024
* Fix issue with pubspec in flutter_notification_center_firebase

View file

@ -26,7 +26,10 @@ dependencies:
firebase_storage: ^11.0.14
flutter_notification_center:
path: ../
git:
url: https://github.com/Iconica-Development/flutter_notification_center
ref: 1.3.0
path: packages/flutter_notification_center
flutter_notification_center_firebase:
path: ../../flutter_notification_center_firebase

View file

@ -14,3 +14,4 @@ export "src/notification_detail.dart";
export "src/notification_bell_story.dart";
export "src/notification_center.dart";
export "src/services/notification_service.dart";
export "package:flutter_animated_widgets/flutter_animated_widgets.dart";

View file

@ -10,13 +10,15 @@ class NotificationConfig {
/// to use. The [style] parameter is optional and defines the style of the
/// notification. The [translations] parameter is also optional and provides
/// translations for notification messages.
const NotificationConfig(
{required this.service,
this.seperateNotificationsWithDivider = true,
this.translations = const NotificationTranslations(),
this.notificationWidgetBuilder,
this.showAsSnackBar = true,
this.enableNotificationPopups = true});
const NotificationConfig({
required this.service,
this.seperateNotificationsWithDivider = true,
this.translations = const NotificationTranslations(),
this.notificationWidgetBuilder,
this.showAsSnackBar = true,
this.enableNotificationPopups = true,
this.bellStyle = const AnimatedNotificationBellStyle(),
});
/// The notification service to use for delivering notifications.
final NotificationService service;
@ -36,4 +38,7 @@ class NotificationConfig {
/// Whether to show notification popups.
final bool enableNotificationPopups;
/// The style of the notification bell.
final AnimatedNotificationBellStyle bellStyle;
}

View file

@ -1,5 +1,4 @@
import "package:flutter/material.dart";
import "package:flutter_animated_widgets/flutter_animated_widgets.dart";
import "../flutter_notification_center.dart";
/// A bell icon widget that displays the number of active notifications.
@ -55,7 +54,7 @@ class _NotificationBellState extends State<NotificationBell> {
icon: AnimatedNotificationBell(
duration: const Duration(seconds: 1),
notificationCount: notificationAmount,
notificationIconSize: 45,
style: widget.config.bellStyle,
),
);
}

View file

@ -2,7 +2,7 @@ name: flutter_notification_center
description: "A Flutter package for displaying notifications in a notification center."
publish_to: 'none'
version: 1.3.0
version: 1.3.1
environment:
sdk: '>=3.3.2 <4.0.0'
@ -15,7 +15,7 @@ dependencies:
flutter_animated_widgets:
git:
url: https://github.com/Iconica-Development/flutter_animated_widgets
ref: 0.0.1
ref: 0.1.1
dev_dependencies:
flutter_test:

View file

@ -2,7 +2,7 @@ name: flutter_notification_center_firebase
description: "A new Flutter project."
publish_to: "none"
version: 1.3.0
version: 1.3.1
environment:
sdk: ">=2.18.0 <3.0.0"
@ -24,7 +24,7 @@ dependencies:
flutter_notification_center:
git:
url: https://github.com/Iconica-Development/flutter_notification_center
ref: 1.3.0
ref: 1.3.1
path: packages/flutter_notification_center
dev_dependencies:

View file

@ -17,7 +17,7 @@ dependencies:
flutter_animated_widgets:
git:
url: https://github.com/Iconica-Development/flutter_animated_widgets
ref: 0.0.1
ref: 0.1.1
dev_dependencies:
flutter_test: