diff --git a/packages/flutter_notification_center/assets/unpin_icon.svg b/packages/flutter_notification_center/assets/unpin_icon.svg
new file mode 100644
index 0000000..4e21191
--- /dev/null
+++ b/packages/flutter_notification_center/assets/unpin_icon.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/packages/flutter_notification_center/lib/src/notification_center.dart b/packages/flutter_notification_center/lib/src/notification_center.dart
index dd78934..fc8bbf7 100644
--- a/packages/flutter_notification_center/lib/src/notification_center.dart
+++ b/packages/flutter_notification_center/lib/src/notification_center.dart
@@ -1,5 +1,6 @@
import "package:flutter/material.dart";
import "package:flutter_notification_center/flutter_notification_center.dart";
+import "package:flutter_svg/svg.dart";
import "package:intl/intl.dart";
/// Widget for displaying the notification center.
@@ -121,35 +122,39 @@ class NotificationCenterState extends State {
},
background: Container(
decoration: const BoxDecoration(
- color: Color.fromRGBO(59, 213, 111, 1),
+ color: Color(0xFF88CB33),
borderRadius: BorderRadius.only(
topLeft: Radius.circular(6),
bottomLeft: Radius.circular(6),
),
),
alignment: Alignment.centerLeft,
- child: const Padding(
- padding: EdgeInsets.only(left: 16.0),
- child: Icon(
- Icons.push_pin,
+ child: Padding(
+ padding: const EdgeInsets.only(left: 16.0),
+ child: SvgPicture.asset(
+ "assets/unpin_icon.svg",
+ package: "flutter_notification_center",
color: Colors.white,
+ height: 24,
),
),
),
secondaryBackground: Container(
decoration: const BoxDecoration(
- color: Color.fromRGBO(59, 213, 111, 1),
+ color: Color(0xFF88CB33),
borderRadius: BorderRadius.only(
topRight: Radius.circular(6),
bottomRight: Radius.circular(6),
),
),
alignment: Alignment.centerRight,
- child: const Padding(
- padding: EdgeInsets.only(right: 16.0),
- child: Icon(
- Icons.push_pin,
+ child: Padding(
+ padding: const EdgeInsets.only(right: 16.0),
+ child: SvgPicture.asset(
+ "assets/unpin_icon.svg",
+ package: "flutter_notification_center",
color: Colors.white,
+ height: 24,
),
),
),
@@ -189,18 +194,21 @@ class NotificationCenterState extends State {
},
background: Container(
decoration: const BoxDecoration(
- color: Color.fromRGBO(59, 213, 111, 1),
+ color: Color(0xFF88CB33),
borderRadius: BorderRadius.only(
topLeft: Radius.circular(6),
bottomLeft: Radius.circular(6),
),
),
alignment: Alignment.centerLeft,
- child: const Padding(
- padding: EdgeInsets.only(left: 16.0),
- child: Icon(
- Icons.push_pin,
- color: Colors.white,
+ child: Padding(
+ padding: const EdgeInsets.only(left: 16.0),
+ child: Transform.rotate(
+ angle: 0.5,
+ child: const Icon(
+ Icons.push_pin_outlined,
+ color: Colors.white,
+ ),
),
),
),
@@ -208,7 +216,7 @@ class NotificationCenterState extends State {
padding: const EdgeInsets.only(bottom: 8),
child: Container(
decoration: const BoxDecoration(
- color: Color.fromRGBO(255, 131, 131, 1),
+ color: Color(0xFFFF6161),
borderRadius: BorderRadius.only(
topRight: Radius.circular(6),
bottomRight: Radius.circular(6),
@@ -219,7 +227,7 @@ class NotificationCenterState extends State {
padding: EdgeInsets.only(right: 16.0),
child: Icon(
Icons.delete,
- color: Colors.black,
+ color: Colors.white,
),
),
),
@@ -247,7 +255,7 @@ Widget _notificationItem(
) {
var theme = Theme.of(context);
var dateTimePushed =
- DateFormat("dd-MM-yyyy HH:mm").format(notification.dateTimePushed!);
+ DateFormat("dd/MM/yyyy 'at' HH:mm").format(notification.dateTimePushed!);
return Padding(
padding: const EdgeInsets.only(bottom: 8),
child: Container(
@@ -284,9 +292,7 @@ Widget _notificationItem(
Transform.rotate(
angle: 0.5,
child: Icon(
- notification.isRead
- ? Icons.push_pin_outlined
- : Icons.push_pin,
+ Icons.push_pin_outlined,
color: config.pinnedIconColor,
size: 30,
),
diff --git a/packages/flutter_notification_center/pubspec.yaml b/packages/flutter_notification_center/pubspec.yaml
index a7dff27..f9f0a6e 100644
--- a/packages/flutter_notification_center/pubspec.yaml
+++ b/packages/flutter_notification_center/pubspec.yaml
@@ -1,7 +1,7 @@
name: flutter_notification_center
description: "A Flutter package for displaying notifications in a notification center."
publish_to: "none"
-version: 3.0.0
+version: 3.0.1
environment:
sdk: ">=3.3.2 <4.0.0"
@@ -15,6 +15,7 @@ dependencies:
git:
url: https://github.com/Iconica-Development/flutter_animated_widgets
ref: 0.3.1
+ flutter_svg: ^2.0.10+1
dev_dependencies:
flutter_test:
@@ -27,3 +28,5 @@ dev_dependencies:
# The following section is specific to Flutter packages.
flutter:
uses-material-design: true
+ assets:
+ - assets/
diff --git a/packages/flutter_notification_center_firebase/pubspec.yaml b/packages/flutter_notification_center_firebase/pubspec.yaml
index ad78e41..ae7b1b2 100644
--- a/packages/flutter_notification_center_firebase/pubspec.yaml
+++ b/packages/flutter_notification_center_firebase/pubspec.yaml
@@ -21,7 +21,7 @@ dependencies:
flutter_notification_center:
git:
url: https://github.com/Iconica-Development/flutter_notification_center
- ref: 3.0.0
+ ref: 3.0.1
path: packages/flutter_notification_center
dev_dependencies: