Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/tizen_notification/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## NEXT
## 0.2.1

* Add regression integration tests.
* Fix null check error when calling show() without TizenNotificationDetails.
* Update minimum Flutter and Dart version to 3.13 and 3.1.
* Update code format.

Expand Down
2 changes: 1 addition & 1 deletion packages/tizen_notification/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ To use this plugin, add `tizen_notification` as a dependency in your `pubspec.ya

```yaml
dependencies:
tizen_notification: ^0.2.0
tizen_notification: ^0.2.1
```

Then you can import `tizen_notification` in your Dart code:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
// Copyright 2026 Samsung Electronics Co., Ltd. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import 'package:tizen_notification/tizen_notification.dart';

void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();

late TizenNotificationPlugin plugin;

setUp(() {
plugin = TizenNotificationPlugin();
});
Comment thread
seungsoo47 marked this conversation as resolved.

tearDown(() async {
await plugin.cancelAll();
});

group('TizenNotificationPlugin', () {
testWidgets('show notification does not throw',
(WidgetTester tester) async {
await plugin.show(1, title: 'Test Title', body: 'Test Body');
});

testWidgets('show notification with default title and body does not throw',
(WidgetTester tester) async {
await plugin.show(2);
});

testWidgets('cancel notification does not throw',
(WidgetTester tester) async {
await plugin.show(3, title: 'To Cancel');
await plugin.cancel(3);
});

testWidgets('cancelAll does not throw', (WidgetTester tester) async {
await plugin.show(4, title: 'Notification 1');
await plugin.show(5, title: 'Notification 2');
await plugin.cancelAll();
});

testWidgets(
'show notification with TizenNotificationDetails does not throw',
(WidgetTester tester) async {
final TizenNotificationDetails details = TizenNotificationDetails(
properties: NotificationProperty.disableAutoDelete,
style: NotificationStyle.tray,
);
await plugin.show(
6,
title: 'Detailed',
body: 'With details',
notificationDetails: details,
);
await plugin.cancel(6);
});
});
}
10 changes: 10 additions & 0 deletions packages/tizen_notification/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,15 @@ dependencies:
tizen_notification:
path: ../

dev_dependencies:
flutter_driver:
sdk: flutter
flutter_test:
sdk: flutter
integration_test:
sdk: flutter
integration_test_tizen:
path: ../../integration_test/

flutter:
uses-material-design: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:integration_test/integration_test_driver.dart';

Future<void> main() => integrationDriver();
2 changes: 1 addition & 1 deletion packages/tizen_notification/lib/tizen_notification.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class TizenNotificationPlugin {

// Set disableAppLaunch automatically if appControl is unset.
if (notificationDetails?.appControl == null) {
final int properties = details['properties']! as int;
final int properties = (details['properties'] as int?) ?? 0;
details['properties'] =
properties | NotificationProperty.disableAppLaunch;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/tizen_notification/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: tizen_notification
description: Tizen notification APIs. Used to show and delete notifications on a Tizen device.
homepage: https://github.com/flutter-tizen/plugins
repository: https://github.com/flutter-tizen/plugins/tree/master/packages/tizen_notification
version: 0.2.0
version: 0.2.1

environment:
sdk: ">=3.1.0 <4.0.0"
Expand Down
Loading