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