-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Setup badges and sounds for PUSH notifications.
- Loading branch information
Showing
5 changed files
with
78 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
packages/masamune_notification/lib/src/push_notification_sound.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
part of '/masamune_notification.dart'; | ||
|
||
/// Sound of push notification. | ||
/// | ||
/// PUSH通知のサウンド。 | ||
enum PushNotificationSound { | ||
/// No sound. | ||
/// | ||
/// サウンドなし。 | ||
none, | ||
|
||
/// Default sound. | ||
/// | ||
/// デフォルトのサウンド。 | ||
defaultSound; | ||
|
||
/// Actual value. | ||
/// | ||
/// 実際の値。 | ||
String? get value { | ||
switch (this) { | ||
case PushNotificationSound.none: | ||
return null; | ||
case PushNotificationSound.defaultSound: | ||
return "default"; | ||
} | ||
} | ||
} |