-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[flutter_local_notifications] Check permissions for iOS and macOS (#2145
) * Check notifications for iOS 10 and newer * Use check notification method with plugin * Check permissions for iOS 9 and below * Add check for example with iOS only * Update everything for macOS * Fixes for provisionalPermission * Add tests * Add feature to README * Remove logs * Rework for iOS * Macos, docs, fixes * Rename fields
- Loading branch information
Showing
9 changed files
with
249 additions
and
3 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
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
36 changes: 36 additions & 0 deletions
36
...r_local_notifications/lib/src/platform_specifics/darwin/notification_enabled_options.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,36 @@ | ||
/// Data class that represent current state of notification options. | ||
/// | ||
/// Used for Darwin systems, like iOS and macOS. | ||
class NotificationsEnabledOptions { | ||
/// Constructs an instance of [NotificationsEnabledOptions] | ||
const NotificationsEnabledOptions({ | ||
required this.isEnabled, | ||
required this.isSoundEnabled, | ||
required this.isAlertEnabled, | ||
required this.isBadgeEnabled, | ||
required this.isProvisionalEnabled, | ||
required this.isCriticalEnabled, | ||
}); | ||
|
||
/// Whenever notifications are enabled. | ||
/// | ||
/// Can be either [isEnabled] or [isProvisionalEnabled]. | ||
final bool isEnabled; | ||
|
||
/// Whenever sound notifications are enabled. | ||
final bool isSoundEnabled; | ||
|
||
/// Whenever alert notifications are enabled. | ||
final bool isAlertEnabled; | ||
|
||
/// Whenever badge notifications are enabled. | ||
final bool isBadgeEnabled; | ||
|
||
/// Whenever provisional notifications are enabled. | ||
/// | ||
/// Can be either [isEnabled] or [isProvisionalEnabled]. | ||
final bool isProvisionalEnabled; | ||
|
||
/// Whenever critical notifications are enabled. | ||
final bool isCriticalEnabled; | ||
} |
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