Skip to content

Commit

Permalink
Merge pull request #26 from Iconica-Development/bugfix/feedback
Browse files Browse the repository at this point in the history
fix: change default style
  • Loading branch information
Gorter-dev authored Jul 30, 2024
2 parents 2acb617 + dbf83cc commit 43a7f44
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 28 deletions.
1 change: 1 addition & 0 deletions packages/flutter_notification_center/assets/unpin_icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -121,35 +122,43 @@ class NotificationCenterState extends State<NotificationCenter> {
},
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: SvgPicture.asset(
"assets/unpin_icon.svg",
package: "flutter_notification_center",
theme: const SvgTheme(
currentColor: 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,
color: Colors.white,
child: Padding(
padding: const EdgeInsets.only(right: 16.0),
child: SvgPicture.asset(
"assets/unpin_icon.svg",
package: "flutter_notification_center",
theme: const SvgTheme(
currentColor: Colors.white,
),
height: 24,
),
),
),
Expand Down Expand Up @@ -189,26 +198,29 @@ class NotificationCenterState extends State<NotificationCenter> {
},
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,
),
),
),
),
secondaryBackground: Padding(
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),
Expand All @@ -219,7 +231,7 @@ class NotificationCenterState extends State<NotificationCenter> {
padding: EdgeInsets.only(right: 16.0),
child: Icon(
Icons.delete,
color: Colors.black,
color: Colors.white,
),
),
),
Expand Down Expand Up @@ -247,7 +259,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(
Expand Down Expand Up @@ -284,9 +296,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,
),
Expand Down
5 changes: 4 additions & 1 deletion packages/flutter_notification_center/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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:
Expand All @@ -27,3 +28,5 @@ dev_dependencies:
# The following section is specific to Flutter packages.
flutter:
uses-material-design: true
assets:
- assets/
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ class FirebaseNotificationService

Future<void> _startTimer() async {
_timer = Timer.periodic(const Duration(seconds: 15), (timer) async {
debugPrint("Checking for scheduled notifications");
await checkForScheduledNotifications();
});
}
Expand Down Expand Up @@ -354,7 +353,6 @@ class FirebaseNotificationService
var querySnapshot = await plannedNotificationsResult.get();

if (querySnapshot.docs.isEmpty) {
debugPrint("No scheduled notifications to be pushed");
return;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/flutter_notification_center_firebase/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 43a7f44

Please sign in to comment.