A comprehensive Flutter example demonstrating how to implement and use the Awesome Notifications package for creating rich, interactive notifications in your Flutter applications.
- ๐ฑ Create basic notifications with title and body
- ๐ผ๏ธ Display notifications with large icons and big pictures
- โฐ Schedule notifications
- ๐ Schedule notifications using a custom dialog
- ๐ฏ Handle notification actions and responses
- ๐ Background task execution
- ๐จ Customizable notification layouts
- ๐ Badge counter management
- Flutter SDK
- Android Studio / VS Code
- Basic understanding of Flutter development
1- Add the following dependency to your pubspec.yaml
dependencies:
awesome_notifications: ^[latest_version]
2- Run:
flutter pub get
1- Configure minimum Android SDK requirements in android/app/build.gradle
android {
compileSdkVersion 34
defaultConfig {
minSdkVersion 21
targetSdkVersion 34
}
}
2- Add required permissions in android/app/src/main/AndroidManifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.myapp">
<application>
...
</application>
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
</manifest>
3- Export activities in AndroidManifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.myapp">
<application>
<activity
android:name=".MainActivity"
android:exported="true">
...
</activity>
</application>
</manifest>
await AwesomeNotificationsHelper.initializeLocalNotifications();
await AwesomeNotificationsHelper.initializeIsolateReceivePort();
await AwesomeNotificationsHelper.createNewNotification();
await AwesomeNotificationsHelper.scheduleNewNotification();
await AwesomeNotificationsHelper.scheduleMinuteNotifications();
// Reset badge counter
await AwesomeNotificationsHelper.resetBadgeCounter();
// Cancel all notifications
await AwesomeNotificationsHelper.cancelNotifications();
lib/
โโโ app.dart
โโโ main.dart
โโโ home_page.dart
โโโ notification_page.dart
โโโ awesome_notifications_helper.dart
โโโ schedule_notification_dialog.dart
A utility class that handles:
- Notification initialization
- Creation of notifications
- Scheduling notifications
- Scheduling notifications (including minute-based schedules)
- Permission management
- Action handling
- Background task execution
A dedicated widget to allow users to:
- Pick a date and time for the notification
- Toggle repeat notifications
- Return the selected options to schedule notifications accordingly
A dedicated page for displaying notification details, including:
- Title and body
- Large icons
- Big pictures
- Custom layouts
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
- Special thanks to the Awesome Notifications package maintainers
" ู ูู ูุงูู: ูุง ุฅูููู ุฅูููุง ุงููููููุ ูุญูุฏููู ูุง ุดูุฑูููู ููุ ูู ุงูู ููููู ููู ุงูุญูู ูุฏูุ ููู ุนููู ููููู ุดููุกู ููุฏููุฑูุ ูู ูููู ู ู ูุฆูุฉู ู ูุฑููุฉูุ ูุงููุชู ูู ุนูุฏููู ุนูุดูุฑู ุฑููุงุจูุ ูููุชูุจูุชู ูู ู ูุฆูุฉู ุญูุณูููุฉูุ ูู ูุญูููุชู ุนููู ู ูุฆูุฉู ุณููููุฆูุฉูุ ููุงููุชู ูู ุญูุฑูุฒูุง ู ููู ุงูุดููููุทุงูู ูููู ููู ุฐููู ุญุชููู ููู ูุณูููุ ูููู ู ููุฃูุชู ุฃุญูุฏู ุจุฃูููุถููู ู ู ููุง ุฌุงุกู ุจูุ ุฅูููุง ุฃุญูุฏู ุนูู ููู ุฃููุซูุฑู ู ูู ุฐููู "
ุตุญูุญ ุงูุจุฎุงุฑู