Skip to content

Commit 90617f5

Browse files
[Version 1.1.0] Merge pull request #81 from KeyValueSoftwareSystems/staging
2 parents c8f7f6a + c2fae66 commit 90617f5

File tree

75 files changed

+5710
-1587
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+5710
-1587
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: test
22

33
on:
44
push:
5-
branches: [ main, dev ]
5+
branches: [ master, staging, dev ]
66
pull_request:
7-
branches: [ main, dev ]
7+
branches: [ master, staging, dev ]
88

99
jobs:
1010
build:

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,22 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## 1.1.0
6+
7+
### Added
8+
- Added support for custom delete icon and a flag to toggle the visibility of the delete icon.
9+
- Added functionality to display thumbnail URL previews for media content.
10+
- Exposed avatar click property.
11+
- Implemented specific error code mapping.
12+
- Enhanced style and theme customizations.
13+
514
## 1.0.0
615
This is the first public release of the package.
716

817
### Added
918
- Flutter UI kit for displaying and managing in-app notifications.
1019

1120

21+
22+
23+

README.md

Lines changed: 108 additions & 123 deletions
Large diffs are not rendered by default.

analysis_options.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ analyzer:
1616
errors:
1717
inference_failure_on_instance_creation: false
1818
inference_failure_on_function_invocation: false
19+
implicit_dynamic_list_literal: false
20+
implicit_dynamic_map_literal: false
21+
implicit_dynamic_method: false
22+
implicit_dynamic_type: false
1923

2024
linter:
2125
# The lint rules applied to this project can be customized in the

example/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,5 @@ app.*.map.json
4141
/android/app/debug
4242
/android/app/profile
4343
/android/app/release
44+
45+
pubspec.lock

example/.packages

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# This file is deprecated. Tools should instead consume
2+
# `.dart_tool/package_config.json`.
3+
#
4+
# For more info see: https://dart.dev/go/dot-packages-deprecation
5+
#
6+
# Generated by pub on 2024-04-27 11:07:12.015241.
7+
async:file:///Users/anitta/.pub-cache/hosted/pub.dartlang.org/async-2.9.0/lib/
8+
boolean_selector:file:///Users/anitta/.pub-cache/hosted/pub.dartlang.org/boolean_selector-2.1.0/lib/
9+
characters:file:///Users/anitta/.pub-cache/hosted/pub.dartlang.org/characters-1.2.0/lib/
10+
charcode:file:///Users/anitta/.pub-cache/hosted/pub.dartlang.org/charcode-1.3.1/lib/
11+
clock:file:///Users/anitta/.pub-cache/hosted/pub.dartlang.org/clock-1.1.0/lib/
12+
collection:file:///Users/anitta/.pub-cache/hosted/pub.dartlang.org/collection-1.16.0/lib/
13+
cupertino_icons:file:///Users/anitta/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-1.0.5/lib/
14+
dio:file:///Users/anitta/.pub-cache/hosted/pub.dartlang.org/dio-5.4.1/lib/
15+
fake_async:file:///Users/anitta/.pub-cache/hosted/pub.dartlang.org/fake_async-1.3.0/lib/
16+
flutter:file:///Users/anitta/Desktop/Development/flutter/packages/flutter/lib/
17+
flutter_lints:file:///Users/anitta/.pub-cache/hosted/pub.dartlang.org/flutter_lints-2.0.1/lib/
18+
flutter_test:file:///Users/anitta/Desktop/Development/flutter/packages/flutter_test/lib/
19+
http_parser:file:///Users/anitta/.pub-cache/hosted/pub.dartlang.org/http_parser-4.0.2/lib/
20+
lints:file:///Users/anitta/.pub-cache/hosted/pub.dartlang.org/lints-2.0.1/lib/
21+
matcher:file:///Users/anitta/.pub-cache/hosted/pub.dartlang.org/matcher-0.12.11/lib/
22+
material_color_utilities:file:///Users/anitta/.pub-cache/hosted/pub.dartlang.org/material_color_utilities-0.1.4/lib/
23+
meta:file:///Users/anitta/.pub-cache/hosted/pub.dartlang.org/meta-1.7.0/lib/
24+
network_logger:file:///Users/anitta/.pub-cache/hosted/pub.dartlang.org/network_logger-1.0.4/lib/
25+
path:file:///Users/anitta/.pub-cache/hosted/pub.dartlang.org/path-1.8.1/lib/
26+
sirenapp_flutter_inbox:../lib/
27+
sky_engine:file:///Users/anitta/Desktop/Development/flutter/bin/cache/pkg/sky_engine/lib/
28+
source_span:file:///Users/anitta/.pub-cache/hosted/pub.dartlang.org/source_span-1.8.2/lib/
29+
stack_trace:file:///Users/anitta/.pub-cache/hosted/pub.dartlang.org/stack_trace-1.10.0/lib/
30+
stream_channel:file:///Users/anitta/.pub-cache/hosted/pub.dartlang.org/stream_channel-2.1.0/lib/
31+
string_scanner:file:///Users/anitta/.pub-cache/hosted/pub.dartlang.org/string_scanner-1.1.0/lib/
32+
term_glyph:file:///Users/anitta/.pub-cache/hosted/pub.dartlang.org/term_glyph-1.2.0/lib/
33+
test_api:file:///Users/anitta/.pub-cache/hosted/pub.dartlang.org/test_api-0.4.9/lib/
34+
typed_data:file:///Users/anitta/.pub-cache/hosted/pub.dartlang.org/typed_data-1.3.2/lib/
35+
vector_math:file:///Users/anitta/.pub-cache/hosted/pub.dartlang.org/vector_math-2.1.2/lib/
36+
example:lib/

example/lib/main.dart

Lines changed: 94 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
import 'package:sirenapp_flutter_inbox/sirenapp_flutter_inbox.dart';
2-
import './siren_icon.dart';
3-
import './siren_window.dart';
42
import 'package:flutter/material.dart';
53

64
void main() {
@@ -50,13 +48,13 @@ class MyHomePageState extends State<MyHomePage> {
5048
: [
5149
IconButton(
5250
onPressed: () {
53-
Siren.deleteNotificationByDate(
51+
Siren.deleteByDate(
5452
startDate: DateTime.now().toUtc().toIso8601String());
5553
},
5654
icon: const Icon(Icons.delete_forever)),
5755
IconButton(
5856
onPressed: () {
59-
Siren.markNotificationsAsReadByDate(
57+
Siren.markAsReadByDate(
6058
startDate: DateTime.now().toUtc().toIso8601String());
6159
},
6260
icon: const Icon(Icons.mark_email_read)),
@@ -86,3 +84,95 @@ class MyHomePageState extends State<MyHomePage> {
8684
);
8785
}
8886
}
87+
88+
class SirenIconWidget extends StatefulWidget {
89+
const SirenIconWidget({Key? key}) : super(key: key);
90+
91+
@override
92+
State<SirenIconWidget> createState() => _SirenIconWidgetState();
93+
}
94+
95+
class _SirenIconWidgetState extends State<SirenIconWidget> {
96+
Icon? notificationIcon;
97+
bool? hideBadge;
98+
99+
@override
100+
Widget build(BuildContext context) {
101+
return Scaffold(
102+
body: Column(
103+
children: [
104+
const Spacer(),
105+
Center(
106+
child: SirenInboxIcon(
107+
notificationIcon: notificationIcon,
108+
darkMode: true,
109+
hideBadge: hideBadge,
110+
onError: (error) {
111+
// print('This is the inApp error message ${error.message}');
112+
},
113+
),
114+
),
115+
Text(
116+
'You are viewing ${notificationIcon == null ? 'default' : 'custom'} icon',
117+
),
118+
Text(
119+
'You are ${hideBadge == false ? 'viewing' : 'not viewing'} notification count',
120+
),
121+
const Spacer(),
122+
Padding(
123+
padding: const EdgeInsets.all(16),
124+
child: Row(
125+
mainAxisAlignment: MainAxisAlignment.spaceBetween,
126+
children: [
127+
ElevatedButton(
128+
onPressed: () {
129+
setState(() {
130+
notificationIcon = notificationIcon == null
131+
? const Icon(
132+
Icons.notification_add,
133+
color: Colors.black,
134+
)
135+
: null;
136+
});
137+
},
138+
child: Text(
139+
notificationIcon == null ? 'Custom Icon' : 'Default Icon',
140+
),
141+
),
142+
ElevatedButton(
143+
onPressed: () {
144+
setState(() {
145+
hideBadge = hideBadge == false ? true : false;
146+
});
147+
},
148+
child: Text(
149+
hideBadge == true ? 'Show Count Badge' : 'Hide Count Badge',
150+
),
151+
),
152+
],
153+
),
154+
),
155+
],
156+
),
157+
);
158+
}
159+
}
160+
161+
class SirenWindowWidget extends StatelessWidget {
162+
const SirenWindowWidget({super.key});
163+
164+
@override
165+
Widget build(BuildContext context) {
166+
return Scaffold(
167+
body: Stack(
168+
children: [
169+
SirenInbox(
170+
onError: (error) {
171+
// print('This is the inApp error message ${error.message}');
172+
},
173+
),
174+
],
175+
),
176+
);
177+
}
178+
}

example/lib/siren_icon.dart

Lines changed: 0 additions & 75 deletions
This file was deleted.

example/lib/siren_window.dart

Lines changed: 0 additions & 21 deletions
This file was deleted.

example/pubspec.lock

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,18 @@ packages:
4545
dependency: "direct main"
4646
description:
4747
name: cupertino_icons
48-
sha256: d57953e10f9f8327ce64a508a355f0b1ec902193f66288e8cb5070e7c47eeb2d
48+
sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6
4949
url: "https://pub.dev"
5050
source: hosted
51-
version: "1.0.6"
51+
version: "1.0.8"
5252
dio:
5353
dependency: transitive
5454
description:
5555
name: dio
56-
sha256: "49af28382aefc53562459104f64d16b9dfd1e8ef68c862d5af436cc8356ce5a8"
56+
sha256: "639179e1cc0957779e10dd5b786ce180c477c4c0aca5aaba5d1700fa2e834801"
5757
url: "https://pub.dev"
5858
source: hosted
59-
version: "5.4.1"
59+
version: "5.4.3"
6060
fake_async:
6161
dependency: transitive
6262
description:
@@ -248,5 +248,5 @@ packages:
248248
source: hosted
249249
version: "13.0.0"
250250
sdks:
251-
dart: ">=3.2.3 <4.0.0"
252-
flutter: ">=2.0.1"
251+
dart: ">=3.2.0-0 <4.0.0"
252+
flutter: ">=3.0.0"

0 commit comments

Comments
 (0)