mirror of
https://github.com/Iconica-Development/flutter_notification_center.git
synced 2025-05-18 16:43:44 +02:00
fix: change default style
This commit is contained in:
parent
2acb617512
commit
0b14e46833
4 changed files with 34 additions and 24 deletions
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#e8eaed"><path d="M680-840v80h-40v327l-80-80v-247H400v87l-87-87-33-33v-47h400ZM480-40l-40-40v-240H240v-80l80-80v-46L56-792l56-56 736 736-58 56-264-264h-6v240l-40 40ZM354-400h92l-44-44-2-2-46 46Zm126-193Zm-78 149Z"/></svg>
|
After Width: | Height: | Size: 319 B |
|
@ -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<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,
|
||||
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<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,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -208,7 +216,7 @@ class NotificationCenterState extends State<NotificationCenter> {
|
|||
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<NotificationCenter> {
|
|||
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,
|
||||
),
|
||||
|
|
|
@ -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/
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue