├── linux ├── .gitignore ├── main.cc ├── flutter │ ├── generated_plugin_registrant.h │ ├── generated_plugin_registrant.cc │ ├── generated_plugins.cmake │ └── CMakeLists.txt ├── my_application.h ├── my_application.cc └── CMakeLists.txt ├── ios ├── Runner │ ├── Runner-Bridging-Header.h │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── 100.png │ │ │ ├── 114.png │ │ │ ├── 120.png │ │ │ ├── 128.png │ │ │ ├── 144.png │ │ │ ├── 152.png │ │ │ ├── 16.png │ │ │ ├── 167.png │ │ │ ├── 180.png │ │ │ ├── 20.png │ │ │ ├── 256.png │ │ │ ├── 29.png │ │ │ ├── 32.png │ │ │ ├── 40.png │ │ │ ├── 50.png │ │ │ ├── 512.png │ │ │ ├── 57.png │ │ │ ├── 58.png │ │ │ ├── 60.png │ │ │ ├── 64.png │ │ │ ├── 72.png │ │ │ ├── 76.png │ │ │ ├── 80.png │ │ │ ├── 87.png │ │ │ ├── 1024.png │ │ │ ├── Icon-App-20x20@1x.png │ │ │ ├── Icon-App-20x20@2x.png │ │ │ ├── Icon-App-20x20@3x.png │ │ │ ├── Icon-App-29x29@1x.png │ │ │ ├── Icon-App-29x29@2x.png │ │ │ ├── Icon-App-29x29@3x.png │ │ │ ├── Icon-App-40x40@1x.png │ │ │ ├── Icon-App-40x40@2x.png │ │ │ ├── Icon-App-40x40@3x.png │ │ │ ├── Icon-App-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.png │ │ │ ├── Icon-App-76x76@1x.png │ │ │ ├── Icon-App-76x76@2x.png │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ ├── Icon-App-83.5x83.5@2x.png │ │ │ └── Contents.json │ │ └── LaunchImage.imageset │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ ├── README.md │ │ │ └── Contents.json │ ├── AppDelegate.swift │ ├── Base.lproj │ │ ├── Main.storyboard │ │ └── LaunchScreen.storyboard │ └── Info.plist ├── Flutter │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── AppFrameworkInfo.plist ├── Runner.xcodeproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── WorkspaceSettings.xcsettings │ │ └── IDEWorkspaceChecks.plist ├── RunnerTests │ └── RunnerTests.swift ├── .gitignore └── Podfile ├── macos ├── Flutter │ ├── Flutter-Debug.xcconfig │ ├── Flutter-Release.xcconfig │ └── GeneratedPluginRegistrant.swift ├── Runner │ ├── Configs │ │ ├── Debug.xcconfig │ │ ├── Release.xcconfig │ │ ├── Warnings.xcconfig │ │ └── AppInfo.xcconfig │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ ├── app_icon_16.png │ │ │ ├── app_icon_32.png │ │ │ ├── app_icon_64.png │ │ │ ├── app_icon_1024.png │ │ │ ├── app_icon_128.png │ │ │ ├── app_icon_256.png │ │ │ ├── app_icon_512.png │ │ │ └── Contents.json │ ├── AppDelegate.swift │ ├── Release.entitlements │ ├── DebugProfile.entitlements │ ├── MainFlutterWindow.swift │ └── Info.plist ├── .gitignore ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── Runner.xcodeproj │ ├── project.xcworkspace │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme └── RunnerTests │ └── RunnerTests.swift ├── web ├── favicon.png ├── icons │ ├── Icon-192.png │ ├── Icon-512.png │ ├── Icon-maskable-192.png │ └── Icon-maskable-512.png ├── manifest.json └── index.html ├── assets ├── sound1.mp3 └── sound2.mp3 ├── output ├── Simulator1.png ├── Simulator2.png ├── Simulator3.png ├── Simulator4.png ├── big_image.png ├── big_text.png ├── chat_message.png ├── main_screen.png ├── button_notification.png ├── music_notification.png ├── reply_notification.png ├── simple_notification.png └── sound_notiifcation.png ├── android ├── app │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── raw │ │ │ │ │ ├── keep.xml │ │ │ │ │ ├── ic_stat.png │ │ │ │ │ └── noti_sound.mp3 │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ ├── ic_stat.png │ │ │ │ │ ├── ic_launcher.webp │ │ │ │ │ ├── ic_launcher_round.webp │ │ │ │ │ └── ic_launcher_foreground.webp │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ ├── ic_stat.png │ │ │ │ │ ├── ic_launcher.webp │ │ │ │ │ ├── ic_launcher_round.webp │ │ │ │ │ └── ic_launcher_foreground.webp │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ ├── ic_stat.png │ │ │ │ │ ├── ic_launcher.webp │ │ │ │ │ ├── ic_launcher_round.webp │ │ │ │ │ └── ic_launcher_foreground.webp │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ ├── ic_stat.png │ │ │ │ │ ├── ic_launcher.webp │ │ │ │ │ ├── ic_launcher_round.webp │ │ │ │ │ └── ic_launcher_foreground.webp │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ ├── ic_stat.png │ │ │ │ │ ├── ic_launcher.webp │ │ │ │ │ ├── ic_launcher_round.webp │ │ │ │ │ └── ic_launcher_foreground.webp │ │ │ │ ├── values │ │ │ │ │ ├── ic_launcher_background.xml │ │ │ │ │ └── styles.xml │ │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ │ ├── ic_launcher.xml │ │ │ │ │ └── ic_launcher_round.xml │ │ │ │ ├── drawable │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── drawable-v21 │ │ │ │ │ └── launch_background.xml │ │ │ │ └── values-night │ │ │ │ │ └── styles.xml │ │ │ ├── ic_launcher-playstore.png │ │ │ ├── kotlin │ │ │ │ └── com │ │ │ │ │ └── fire │ │ │ │ │ └── noti │ │ │ │ │ └── MainActivity.kt │ │ │ └── AndroidManifest.xml │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ └── profile │ │ │ └── AndroidManifest.xml │ └── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── .gitignore ├── build.gradle └── settings.gradle ├── windows ├── runner │ ├── resources │ │ └── app_icon.ico │ ├── resource.h │ ├── runner.exe.manifest │ ├── utils.h │ ├── flutter_window.h │ ├── main.cpp │ ├── CMakeLists.txt │ ├── utils.cpp │ ├── flutter_window.cpp │ ├── Runner.rc │ ├── win32_window.h │ └── win32_window.cpp ├── .gitignore ├── flutter │ ├── generated_plugin_registrant.h │ ├── generated_plugin_registrant.cc │ ├── generated_plugins.cmake │ └── CMakeLists.txt └── CMakeLists.txt ├── lib ├── notification │ ├── uuid.dart │ ├── go_specific_screen.dart │ ├── payLoadModel │ │ ├── arg.dart │ │ ├── navigation_details_model.dart │ │ └── data.dart │ ├── firebase_messaging │ │ ├── background_notification.dart │ │ ├── foreground_message.dart │ │ ├── firebase_initialization.dart │ │ ├── setup_interact_message.dart │ │ ├── notification_device_token.dart │ │ └── notification_permissions.dart │ ├── model │ │ └── button_model.dart │ ├── awesome_notification │ │ ├── notification_calendar.dart │ │ ├── notification_channel_service.dart │ │ └── awesome_notification_service.dart │ └── notification_implementation.dart ├── core │ ├── permistion.dart │ ├── router │ │ └── app_router.dart │ └── widget │ │ └── button.dart ├── presentation │ └── new_screen.dart └── main.dart ├── CHANGELOG.md ├── CONTRIBUTING.md ├── .gitignore ├── LICENSE ├── test └── widget_test.dart ├── SECURITY.md ├── analysis_options.yaml ├── .metadata ├── pubspec.yaml ├── .github └── workflows │ └── dart.yml ├── CODE_OF_CONDUCT.md ├── README.md └── pubspec.lock /linux/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral 2 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /macos/Flutter/Flutter-Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "ephemeral/Flutter-Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/web/favicon.png -------------------------------------------------------------------------------- /assets/sound1.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/assets/sound1.mp3 -------------------------------------------------------------------------------- /assets/sound2.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/assets/sound2.mp3 -------------------------------------------------------------------------------- /macos/Flutter/Flutter-Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "ephemeral/Flutter-Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /output/Simulator1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/output/Simulator1.png -------------------------------------------------------------------------------- /output/Simulator2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/output/Simulator2.png -------------------------------------------------------------------------------- /output/Simulator3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/output/Simulator3.png -------------------------------------------------------------------------------- /output/Simulator4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/output/Simulator4.png -------------------------------------------------------------------------------- /output/big_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/output/big_image.png -------------------------------------------------------------------------------- /output/big_text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/output/big_text.png -------------------------------------------------------------------------------- /output/chat_message.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/output/chat_message.png -------------------------------------------------------------------------------- /output/main_screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/output/main_screen.png -------------------------------------------------------------------------------- /web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/web/icons/Icon-192.png -------------------------------------------------------------------------------- /web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/web/icons/Icon-512.png -------------------------------------------------------------------------------- /output/button_notification.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/output/button_notification.png -------------------------------------------------------------------------------- /output/music_notification.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/output/music_notification.png -------------------------------------------------------------------------------- /output/reply_notification.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/output/reply_notification.png -------------------------------------------------------------------------------- /output/simple_notification.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/output/simple_notification.png -------------------------------------------------------------------------------- /output/sound_notiifcation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/output/sound_notiifcation.png -------------------------------------------------------------------------------- /web/icons/Icon-maskable-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/web/icons/Icon-maskable-192.png -------------------------------------------------------------------------------- /web/icons/Icon-maskable-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/web/icons/Icon-maskable-512.png -------------------------------------------------------------------------------- /macos/Runner/Configs/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Debug.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /android/app/src/main/res/raw/keep.xml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Release.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /macos/.gitignore: -------------------------------------------------------------------------------- 1 | # Flutter-related 2 | **/Flutter/ephemeral/ 3 | **/Pods/ 4 | 5 | # Xcode-related 6 | **/dgph 7 | **/xcuserdata/ 8 | -------------------------------------------------------------------------------- /windows/runner/resources/app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/windows/runner/resources/app_icon.ico -------------------------------------------------------------------------------- /android/app/src/main/res/raw/ic_stat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/android/app/src/main/res/raw/ic_stat.png -------------------------------------------------------------------------------- /android/app/src/main/res/raw/noti_sound.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/android/app/src/main/res/raw/noti_sound.mp3 -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /android/app/src/main/ic_launcher-playstore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/android/app/src/main/ic_launcher-playstore.png -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_stat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/android/app/src/main/res/mipmap-hdpi/ic_stat.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_stat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/android/app/src/main/res/mipmap-mdpi/ic_stat.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_stat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_stat.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_stat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_stat.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_stat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_stat.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.webp -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.webp -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/100.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/114.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/120.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/128.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/144.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/152.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/16.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/167.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/167.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/180.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/20.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/256.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/29.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/32.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/40.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/50.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/512.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/57.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/58.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/60.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/64.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/72.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/76.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/80.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/87.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/1024.png -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /lib/notification/uuid.dart: -------------------------------------------------------------------------------- 1 | import 'dart:math'; 2 | 3 | int generateSSID() { 4 | Random random = Random(); 5 | int ssidInt = random.nextInt(2147483647); 6 | return ssidInt; 7 | } 8 | -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/fire/noti/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.fire.noti 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() 6 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp -------------------------------------------------------------------------------- /android/app/src/main/res/values/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #000000 4 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamapuneet/Fire-Noti/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /linux/main.cc: -------------------------------------------------------------------------------- 1 | #include "my_application.h" 2 | 3 | int main(int argc, char** argv) { 4 | g_autoptr(MyApplication) app = my_application_new(); 5 | return g_application_run(G_APPLICATION(app), argc, argv); 6 | } 7 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macos/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip 6 | -------------------------------------------------------------------------------- /macos/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | @main 5 | class AppDelegate: FlutterAppDelegate { 6 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { 7 | return true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /macos/Runner/Release.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/to/reference-keystore 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/RunnerTests/RunnerTests.swift: -------------------------------------------------------------------------------- 1 | import Flutter 2 | import UIKit 3 | import XCTest 4 | 5 | class RunnerTests: XCTestCase { 6 | 7 | func testExample() { 8 | // If you add code to the Runner application, consider adding tests here. 9 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest. 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /macos/RunnerTests/RunnerTests.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | import XCTest 4 | 5 | class RunnerTests: XCTestCase { 6 | 7 | func testExample() { 8 | // If you add code to the Runner application, consider adding tests here. 9 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest. 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /windows/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral/ 2 | 3 | # Visual Studio user-specific files. 4 | *.suo 5 | *.user 6 | *.userosscache 7 | *.sln.docstates 8 | 9 | # Visual Studio build-related files. 10 | x64/ 11 | x86/ 12 | 13 | # Visual Studio cache files 14 | # files ending in .cache can be ignored 15 | *.[Cc]ache 16 | # but keep track of directories ending in .cache 17 | !*.[Cc]ache/ 18 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /linux/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 8 | #define GENERATED_PLUGIN_REGISTRANT_ 9 | 10 | #include 11 | 12 | // Registers Flutter plugins. 13 | void fl_register_plugins(FlPluginRegistry* registry); 14 | 15 | #endif // GENERATED_PLUGIN_REGISTRANT_ 16 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 8 | #define GENERATED_PLUGIN_REGISTRANT_ 9 | 10 | #include 11 | 12 | // Registers Flutter plugins. 13 | void RegisterPlugins(flutter::PluginRegistry* registry); 14 | 15 | #endif // GENERATED_PLUGIN_REGISTRANT_ 16 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | allprojects { 2 | repositories { 3 | google() 4 | mavenCentral() 5 | } 6 | } 7 | 8 | rootProject.buildDir = "../build" 9 | subprojects { 10 | project.buildDir = "${rootProject.buildDir}/${project.name}" 11 | } 12 | subprojects { 13 | project.evaluationDependsOn(":app") 14 | } 15 | 16 | tasks.register("clean", Delete) { 17 | delete rootProject.buildDir 18 | } 19 | -------------------------------------------------------------------------------- /lib/notification/go_specific_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'PayLoadModel/data.dart'; 3 | 4 | class NavigationService { 5 | final BuildContext context; 6 | 7 | NavigationService({required this.context}); 8 | 9 | /// Navigates to a specific screen based on the provided [NavigationDetailsModel]. 10 | Future goToScreen({required String screen}) async { 11 | 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macos/Runner/DebugProfile.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.cs.allow-jit 8 | 9 | com.apple.security.network.server 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## [Unreleased] 4 | 5 | ## [1.0.0] - 2024-10-26 6 | ### Added 7 | - Initial release of FireNoti with basic notification functionality. 8 | - Implemented Firebase Cloud Messaging integration. 9 | - Added support for simple notifications and sound notifications. 10 | 11 | ### Changed 12 | - Updated documentation for better clarity. 13 | 14 | ### Fixed 15 | - Minor bug fixes in notification handling. 16 | 17 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import Flutter 2 | import UIKit 3 | 4 | @main 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /lib/notification/payLoadModel/arg.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | Arg argFromJson(String str) => Arg.fromJson(json.decode(str)); 4 | String argToJson(Arg data) => json.encode(data.toJson()); 5 | class Arg { 6 | Arg({ 7 | this.id,}); 8 | 9 | Arg.fromJson(dynamic json) { 10 | id = json['id']; 11 | } 12 | dynamic id; 13 | 14 | Map toJson() { 15 | final map = {}; 16 | map['id'] = id; 17 | return map; 18 | } 19 | 20 | } -------------------------------------------------------------------------------- /linux/my_application.h: -------------------------------------------------------------------------------- 1 | #ifndef FLUTTER_MY_APPLICATION_H_ 2 | #define FLUTTER_MY_APPLICATION_H_ 3 | 4 | #include 5 | 6 | G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION, 7 | GtkApplication) 8 | 9 | /** 10 | * my_application_new: 11 | * 12 | * Creates a new Flutter-based application. 13 | * 14 | * Returns: a new #MyApplication. 15 | */ 16 | MyApplication* my_application_new(); 17 | 18 | #endif // FLUTTER_MY_APPLICATION_H_ 19 | -------------------------------------------------------------------------------- /macos/Runner/MainFlutterWindow.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | class MainFlutterWindow: NSWindow { 5 | override func awakeFromNib() { 6 | let flutterViewController = FlutterViewController() 7 | let windowFrame = self.frame 8 | self.contentViewController = flutterViewController 9 | self.setFrame(windowFrame, display: true) 10 | 11 | RegisterGeneratedPlugins(registry: flutterViewController) 12 | 13 | super.awakeFromNib() 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /windows/runner/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Runner.rc 4 | // 5 | #define IDI_APP_ICON 101 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 40001 13 | #define _APS_NEXT_CONTROL_VALUE 1001 14 | #define _APS_NEXT_SYMED_VALUE 101 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /linux/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #include "generated_plugin_registrant.h" 8 | 9 | #include 10 | 11 | void fl_register_plugins(FlPluginRegistry* registry) { 12 | g_autoptr(FlPluginRegistrar) awesome_notifications_registrar = 13 | fl_plugin_registry_get_registrar_for_plugin(registry, "AwesomeNotificationsPlugin"); 14 | awesome_notifications_plugin_register_with_registrar(awesome_notifications_registrar); 15 | } 16 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to FireNoti 2 | 3 | We welcome contributions to the FireNoti project! If you'd like to contribute, please follow these guidelines: 4 | 5 | ## How to Contribute 6 | 7 | 1. **Fork the Repository**: Click the "Fork" button at the top right of the repository page to create your own copy of the repository. 8 | 9 | 2. **Create a Branch**: Create a new branch for your feature or bug fix. It's best practice to name your branch something descriptive, like `feature/add-notification-sound`. 10 | 11 | ```bash 12 | git checkout -b feature/add-notification-sound 13 | -------------------------------------------------------------------------------- /macos/Flutter/GeneratedPluginRegistrant.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | import FlutterMacOS 6 | import Foundation 7 | 8 | import awesome_notifications 9 | import firebase_core 10 | import firebase_messaging 11 | 12 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { 13 | AwesomeNotificationsPlugin.register(with: registry.registrar(forPlugin: "AwesomeNotificationsPlugin")) 14 | FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin")) 15 | FLTFirebaseMessagingPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseMessagingPlugin")) 16 | } 17 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #include "generated_plugin_registrant.h" 8 | 9 | #include 10 | #include 11 | 12 | void RegisterPlugins(flutter::PluginRegistry* registry) { 13 | AwesomeNotificationsPluginCApiRegisterWithRegistrar( 14 | registry->GetRegistrarForPlugin("AwesomeNotificationsPluginCApi")); 15 | FirebaseCorePluginCApiRegisterWithRegistrar( 16 | registry->GetRegistrarForPlugin("FirebaseCorePluginCApi")); 17 | } 18 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Warnings.xcconfig: -------------------------------------------------------------------------------- 1 | WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings 2 | GCC_WARN_UNDECLARED_SELECTOR = YES 3 | CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES 4 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE 5 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES 6 | CLANG_WARN_PRAGMA_PACK = YES 7 | CLANG_WARN_STRICT_PROTOTYPES = YES 8 | CLANG_WARN_COMMA = YES 9 | GCC_WARN_STRICT_SELECTOR_MATCH = YES 10 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES 11 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES 12 | GCC_WARN_SHADOW = YES 13 | CLANG_WARN_UNREACHABLE_CODE = YES 14 | -------------------------------------------------------------------------------- /macos/Runner/Configs/AppInfo.xcconfig: -------------------------------------------------------------------------------- 1 | // Application-level settings for the Runner target. 2 | // 3 | // This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the 4 | // future. If not, the values below would default to using the project name when this becomes a 5 | // 'flutter create' template. 6 | 7 | // The application's name. By default this is also the title of the Flutter window. 8 | PRODUCT_NAME = noti 9 | 10 | // The application's bundle identifier 11 | PRODUCT_BUNDLE_IDENTIFIER = com.fire.noti 12 | 13 | // The copyright displayed in application information 14 | PRODUCT_COPYRIGHT = Copyright © 2024 com.fire. All rights reserved. 15 | -------------------------------------------------------------------------------- /windows/runner/runner.exe.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PerMonitorV2 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | **/dgph 2 | *.mode1v3 3 | *.mode2v3 4 | *.moved-aside 5 | *.pbxuser 6 | *.perspectivev3 7 | **/*sync/ 8 | .sconsign.dblite 9 | .tags* 10 | **/.vagrant/ 11 | **/DerivedData/ 12 | Icon? 13 | **/Pods/ 14 | **/.symlinks/ 15 | profile 16 | xcuserdata 17 | **/.generated/ 18 | Flutter/App.framework 19 | Flutter/Flutter.framework 20 | Flutter/Flutter.podspec 21 | Flutter/Generated.xcconfig 22 | Flutter/ephemeral/ 23 | Flutter/app.flx 24 | Flutter/app.zip 25 | Flutter/flutter_assets/ 26 | Flutter/flutter_export_environment.sh 27 | ServiceDefinitions.json 28 | Runner/GeneratedPluginRegistrant.* 29 | 30 | # Exceptions to above rules. 31 | !default.mode1v3 32 | !default.mode2v3 33 | !default.pbxuser 34 | !default.perspectivev3 35 | -------------------------------------------------------------------------------- /windows/runner/utils.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_UTILS_H_ 2 | #define RUNNER_UTILS_H_ 3 | 4 | #include 5 | #include 6 | 7 | // Creates a console for the process, and redirects stdout and stderr to 8 | // it for both the runner and the Flutter library. 9 | void CreateAndAttachConsole(); 10 | 11 | // Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string 12 | // encoded in UTF-8. Returns an empty std::string on failure. 13 | std::string Utf8FromUtf16(const wchar_t* utf16_string); 14 | 15 | // Gets the command line arguments passed in as a std::vector, 16 | // encoded in UTF-8. Returns an empty std::vector on failure. 17 | std::vector GetCommandLineArguments(); 18 | 19 | #endif // RUNNER_UTILS_H_ 20 | -------------------------------------------------------------------------------- /lib/notification/firebase_messaging/background_notification.dart: -------------------------------------------------------------------------------- 1 | import 'package:firebase_messaging/firebase_messaging.dart'; 2 | import 'package:flutter/material.dart'; 3 | import '../notification_implementation.dart'; 4 | 5 | @pragma('vm:entry-point') 6 | Future backgroundHandler(RemoteMessage message) async { 7 | // Handle the background message here 8 | debugPrint('Handling a background message: ${message.messageId}'); 9 | showNotification(message.data, null); 10 | // You can perform actions based on the message, such as updating local data or showing a notification 11 | } 12 | 13 | class BackGroundNotification { 14 | /// Initializes background notification handling. 15 | void backgroundInitializer() { 16 | FirebaseMessaging.onBackgroundMessage(backgroundHandler); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/notification/payLoadModel/navigation_details_model.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | NavigationDetailsModel navigationDetailsModelFromJson(String str) => NavigationDetailsModel.fromJson(json.decode(str)); 4 | String navigationDetailsModelToJson(NavigationDetailsModel data) => json.encode(data.toJson()); 5 | class NavigationDetailsModel { 6 | NavigationDetailsModel({ 7 | this.to, 8 | this.data,}); 9 | 10 | NavigationDetailsModel.fromJson(dynamic json) { 11 | to = json['to']; 12 | data = json['data'] != null ? NavigationDetailsModel.fromJson(json['data']) : null; 13 | } 14 | String? to; 15 | NavigationDetailsModel? data; 16 | 17 | Map toJson() { 18 | final map = {}; 19 | map['to'] = to; 20 | if (data != null) { 21 | map['data'] = data?.toJson(); 22 | } 23 | return map; 24 | } 25 | 26 | } -------------------------------------------------------------------------------- /linux/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | awesome_notifications 7 | ) 8 | 9 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 10 | ) 11 | 12 | set(PLUGIN_BUNDLED_LIBRARIES) 13 | 14 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 15 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) 16 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 17 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 18 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 19 | endforeach(plugin) 20 | 21 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 22 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) 23 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 24 | endforeach(ffi_plugin) 25 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 12.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | awesome_notifications 7 | firebase_core 8 | ) 9 | 10 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 11 | ) 12 | 13 | set(PLUGIN_BUNDLED_LIBRARIES) 14 | 15 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 16 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) 17 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 18 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 19 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 20 | endforeach(plugin) 21 | 22 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 23 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) 24 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 25 | endforeach(ffi_plugin) 26 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | def flutterSdkPath = { 3 | def properties = new Properties() 4 | file("local.properties").withInputStream { properties.load(it) } 5 | def flutterSdkPath = properties.getProperty("flutter.sdk") 6 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 7 | return flutterSdkPath 8 | }() 9 | 10 | includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") 11 | 12 | repositories { 13 | google() 14 | mavenCentral() 15 | gradlePluginPortal() 16 | } 17 | } 18 | 19 | plugins { 20 | id "dev.flutter.flutter-plugin-loader" version "1.0.0" 21 | id "com.android.application" version "8.1.0" apply false 22 | id "org.jetbrains.kotlin.android" version "1.8.22" apply false 23 | id 'com.google.gms.google-services' version '4.4.2' apply false 24 | 25 | } 26 | 27 | include ":app" 28 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | migrate_working_dir/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | android/app/google-services.json 19 | lib/firebase_options.dart 20 | # The .vscode folder contains launch configuration and tasks you configure in 21 | # VS Code which you may wish to be included in version control, so this line 22 | # is commented out by default. 23 | #.vscode/ 24 | 25 | # Flutter/Dart/Pub related 26 | **/doc/api/ 27 | **/ios/Flutter/.last_build_id 28 | .dart_tool/ 29 | .flutter-plugins 30 | .flutter-plugins-dependencies 31 | .pub-cache/ 32 | .pub/ 33 | /build/ 34 | 35 | # Symbolication related 36 | app.*.symbols 37 | 38 | # Obfuscation related 39 | app.*.map.json 40 | 41 | # Android Studio will place build artifacts here 42 | /android/app/debug 43 | /android/app/profile 44 | /android/app/release 45 | -------------------------------------------------------------------------------- /lib/notification/model/button_model.dart: -------------------------------------------------------------------------------- 1 | import 'package:awesome_notifications/awesome_notifications.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | 5 | class ButtonModel { 6 | final String key; 7 | final String label; 8 | final Color? color; 9 | final String? icon; 10 | final ActionType actionType; 11 | final bool autoDismissible; 12 | final bool enabled; 13 | final bool requireInputText; 14 | final bool showInCompactView; 15 | final bool isDangerousOption; 16 | 17 | ButtonModel({ 18 | required this.key, 19 | required this.label, 20 | this.color, 21 | this.icon, 22 | this.actionType= ActionType.Default, 23 | this.autoDismissible = true, 24 | this.enabled = true, 25 | this.requireInputText = false, 26 | this.showInCompactView = true, 27 | this.isDangerousOption = false, 28 | }); 29 | 30 | 31 | } 32 | 33 | enum ButtonType { 34 | simpleText, 35 | message, 36 | custom, 37 | } -------------------------------------------------------------------------------- /lib/core/permistion.dart: -------------------------------------------------------------------------------- 1 | import 'package:firebase_messaging/firebase_messaging.dart'; 2 | 3 | import '../notification/firebase_messaging/notification_permissions.dart'; 4 | 5 | void requestNotificationPermission({ 6 | required Function(String) onSuccess, 7 | required Function(String) onFailure, 8 | }) async { 9 | try { 10 | // Create an instance of NotificationPermissions 11 | NotificationPermissions notificationPermissions = 12 | NotificationPermissions(FirebaseMessaging.instance); 13 | 14 | // Request notification permission 15 | bool status = await notificationPermissions.requestNotificationPermission(); 16 | 17 | if (status) { 18 | // If permission is granted, call onSuccess callback 19 | onSuccess('✅ Notification permission granted'); 20 | } else { 21 | // If permission is denied, call onFailure callback 22 | onFailure('❌ Notification permission denied'); 23 | } 24 | } catch (e) { 25 | // Handle any exceptions that occur 26 | onFailure('🚨 An error occurred while requesting permission: $e'); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /windows/runner/flutter_window.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_FLUTTER_WINDOW_H_ 2 | #define RUNNER_FLUTTER_WINDOW_H_ 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | #include "win32_window.h" 10 | 11 | // A window that does nothing but host a Flutter view. 12 | class FlutterWindow : public Win32Window { 13 | public: 14 | // Creates a new FlutterWindow hosting a Flutter view running |project|. 15 | explicit FlutterWindow(const flutter::DartProject& project); 16 | virtual ~FlutterWindow(); 17 | 18 | protected: 19 | // Win32Window: 20 | bool OnCreate() override; 21 | void OnDestroy() override; 22 | LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam, 23 | LPARAM const lparam) noexcept override; 24 | 25 | private: 26 | // The project to run. 27 | flutter::DartProject project_; 28 | 29 | // The Flutter instance hosted by this window. 30 | std::unique_ptr flutter_controller_; 31 | }; 32 | 33 | #endif // RUNNER_FLUTTER_WINDOW_H_ 34 | -------------------------------------------------------------------------------- /android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 16 | 19 | 20 | -------------------------------------------------------------------------------- /lib/core/router/app_router.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../../presentation/main_screen.dart'; 3 | import '../../presentation/new_screen.dart'; 4 | 5 | class AppRouter { 6 | static const String splash = '/'; 7 | static const String newScreen = '${splash}new_screen'; 8 | 9 | static Route generateRoute(RouteSettings settings) { 10 | switch (settings.name) { 11 | case splash: 12 | return MaterialPageRoute(builder: (_) => const MainScreen()); 13 | case newScreen: 14 | final args = settings.arguments as Map; 15 | return MaterialPageRoute( 16 | builder: (_) => NewScreen( 17 | first: args['first'].toString(), 18 | second: args['second'].toString(), 19 | ), 20 | ); 21 | default: 22 | return _errorRoute(); 23 | } 24 | } 25 | 26 | static Route _errorRoute() { 27 | return MaterialPageRoute( 28 | builder: (_) => Scaffold( 29 | appBar: AppBar(title: const Text('Error')), 30 | body: const Center(child: Text('ERROR: Route not found')), 31 | ), 32 | ); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) [year] [your name or organization] 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | 1. The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | 2. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility in the flutter_test package. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:noti/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(const MyApp()); 17 | 18 | // Verify that our counter starts at 0. 19 | expect(find.text('0'), findsOneWidget); 20 | expect(find.text('1'), findsNothing); 21 | 22 | // Tap the '+' icon and trigger a frame. 23 | await tester.tap(find.byIcon(Icons.add)); 24 | await tester.pump(); 25 | 26 | // Verify that our counter has incremented. 27 | expect(find.text('0'), findsNothing); 28 | expect(find.text('1'), findsOneWidget); 29 | }); 30 | } 31 | -------------------------------------------------------------------------------- /lib/notification/firebase_messaging/foreground_message.dart: -------------------------------------------------------------------------------- 1 | import 'package:firebase_messaging/firebase_messaging.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | /// A class to manage foreground notification settings for Firebase Messaging. 5 | class ForegroundMessage { 6 | final FirebaseMessaging firebaseMessaging; 7 | 8 | /// Constructor to initialize [ForegroundMessage] with an instance of [FirebaseMessaging]. 9 | ForegroundMessage(this.firebaseMessaging); 10 | 11 | /// Configures foreground notification presentation options. 12 | /// 13 | /// This method sets the options for displaying notifications when the app is in the foreground. 14 | Future setForegroundNotificationOptions() async { 15 | try { 16 | await firebaseMessaging.setForegroundNotificationPresentationOptions( 17 | alert: true, // Show alert notifications 18 | badge: true, // Update the app badge 19 | sound: true, // Play sound for notifications 20 | ); 21 | debugPrint('Foreground notification presentation options set successfully.'); 22 | } catch (error) { 23 | debugPrint('Error setting foreground notification options: $error'); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /macos/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | NSHumanReadableCopyright 26 | $(PRODUCT_COPYRIGHT) 27 | NSMainNibFile 28 | MainMenu 29 | NSPrincipalClass 30 | NSApplication 31 | 32 | 33 | -------------------------------------------------------------------------------- /lib/presentation/new_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:noti/presentation/main_screen.dart'; 3 | 4 | class NewScreen extends StatelessWidget { 5 | final String first; 6 | final String second; 7 | const NewScreen({super.key, required this.first, required this.second}); 8 | 9 | @override 10 | Widget build(BuildContext context) { 11 | final color = Theme.of(context).colorScheme.onTertiaryContainer; 12 | return Scaffold( 13 | appBar: AppBar(title: const Text('New Screen', 14 | style: TextStyle(color: Colors.white),), 15 | iconTheme: const IconThemeData(color: Colors.white), 16 | titleSpacing: -5, 17 | backgroundColor: color,), 18 | body: Padding( 19 | padding: const EdgeInsets.symmetric(horizontal: 35), 20 | child: Center( 21 | child: Column( 22 | mainAxisSize: MainAxisSize.min, 23 | children: [ 24 | Text(first,style: const TextStyle(fontWeight: FontWeight.w500,fontSize: 20),), 25 | box, 26 | Text(second,style: const TextStyle(fontWeight: FontWeight.w500,),textAlign: TextAlign.center,), 27 | ], 28 | ), 29 | ), 30 | ), 31 | ); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lib/notification/firebase_messaging/firebase_initialization.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'dart:io'; 3 | import 'package:firebase_messaging/firebase_messaging.dart'; 4 | import 'package:flutter/foundation.dart'; 5 | import 'package:flutter/widgets.dart'; 6 | import 'package:flutter/material.dart'; 7 | 8 | class FirebaseInitialization { 9 | final Function(Map data, BuildContext? context) 10 | showNotification; 11 | final BuildContext context; 12 | 13 | FirebaseInitialization( 14 | {required this.showNotification, required this.context}); 15 | 16 | /// Initializes Firebase Messaging and listens for foreground messages. 17 | Future firebaseInit() async { 18 | FirebaseMessaging.onMessage.listen((RemoteMessage payloads) async { 19 | // Extract data from the payload 20 | Map data = payloads.data; 21 | 22 | if (data.isNotEmpty) { 23 | // Show notification based on the platform 24 | if ((Platform.isAndroid || Platform.isIOS) && context.mounted) { 25 | showNotification.call(data, context); 26 | } 27 | } else { 28 | if (kDebugMode) { 29 | debugPrint('Received empty payload data'); 30 | } 31 | } 32 | }); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /lib/core/widget/button.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Button extends StatelessWidget { 4 | final String text; 5 | final VoidCallback onPressed; 6 | final Color borderColor; 7 | final Color textColor; 8 | final double borderWidth; 9 | final double borderRadius; 10 | final EdgeInsetsGeometry padding; 11 | 12 | const Button({ 13 | super.key, 14 | required this.text, 15 | required this.onPressed, 16 | this.borderColor = Colors.blue, 17 | this.textColor = Colors.blue, 18 | this.borderWidth = 2.0, 19 | this.borderRadius = 8.0, 20 | this.padding = const EdgeInsets.symmetric(horizontal: 24, vertical: 12), 21 | }); 22 | 23 | @override 24 | Widget build(BuildContext context) { 25 | return GestureDetector( 26 | onTap: onPressed, 27 | child: Container( 28 | padding: padding, 29 | decoration: BoxDecoration( 30 | border: Border.all(color: borderColor, width: borderWidth), 31 | borderRadius: BorderRadius.circular(borderRadius), 32 | ), 33 | child: Center( 34 | child: Text( 35 | text, 36 | style: TextStyle( 37 | color: textColor, 38 | fontSize: 16, 39 | fontWeight: FontWeight.w500 40 | ), 41 | ), 42 | ), 43 | ), 44 | ); 45 | } 46 | } -------------------------------------------------------------------------------- /windows/runner/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "flutter_window.h" 6 | #include "utils.h" 7 | 8 | int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, 9 | _In_ wchar_t *command_line, _In_ int show_command) { 10 | // Attach to console when present (e.g., 'flutter run') or create a 11 | // new console when running with a debugger. 12 | if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) { 13 | CreateAndAttachConsole(); 14 | } 15 | 16 | // Initialize COM, so that it is available for use in the library and/or 17 | // plugins. 18 | ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); 19 | 20 | flutter::DartProject project(L"data"); 21 | 22 | std::vector command_line_arguments = 23 | GetCommandLineArguments(); 24 | 25 | project.set_dart_entrypoint_arguments(std::move(command_line_arguments)); 26 | 27 | FlutterWindow window(project); 28 | Win32Window::Point origin(10, 10); 29 | Win32Window::Size size(1280, 720); 30 | if (!window.Create(L"noti", origin, size)) { 31 | return EXIT_FAILURE; 32 | } 33 | window.SetQuitOnClose(true); 34 | 35 | ::MSG msg; 36 | while (::GetMessage(&msg, nullptr, 0, 0)) { 37 | ::TranslateMessage(&msg); 38 | ::DispatchMessage(&msg); 39 | } 40 | 41 | ::CoUninitialize(); 42 | return EXIT_SUCCESS; 43 | } 44 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Reporting a Vulnerability 4 | 5 | We take security seriously in our project. If you discover a security vulnerability in this project, please report it as soon as possible. We appreciate your help in keeping our software and users safe. 6 | 7 | ### Steps to Report a Vulnerability 8 | 9 | 1. **Email Us**: Send an email to [developer.puneet.sharma@gmail.com] with a detailed description of the vulnerability, including the following information: 10 | - A summary of the vulnerability. 11 | - Steps to reproduce the vulnerability. 12 | - Any relevant code snippets or screenshots. 13 | - The potential impact of the vulnerability. 14 | 15 | 2. **Do Not Share Publicly**: Please do not disclose the vulnerability publicly until it has been addressed. This helps us mitigate potential risks to users and systems. 16 | 17 | 3. **Follow Up**: We will acknowledge your report within 48 hours and provide you with updates as we work on a fix. You can expect a follow-up within one to two weeks. 18 | 19 | ## Response Time 20 | 21 | We aim to respond to all vulnerability reports within five business days and will keep you updated on our progress towards resolving the issue. 22 | 23 | ## Acknowledgments 24 | 25 | We would like to thank all security researchers who help us improve the security of our project. We will publicly acknowledge your contribution in the release notes of the next version if you prefer. 26 | 27 | Thank you for helping us keep our software secure! -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id "com.android.application" 3 | id "kotlin-android" 4 | // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. 5 | id "dev.flutter.flutter-gradle-plugin" 6 | } 7 | 8 | android { 9 | namespace = "com.fire.noti" 10 | compileSdk = flutter.compileSdkVersion 11 | ndkVersion = flutter.ndkVersion 12 | 13 | compileOptions { 14 | sourceCompatibility = JavaVersion.VERSION_1_8 15 | targetCompatibility = JavaVersion.VERSION_1_8 16 | } 17 | 18 | kotlinOptions { 19 | jvmTarget = JavaVersion.VERSION_1_8 20 | } 21 | 22 | defaultConfig { 23 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 24 | applicationId = "com.fire.noti" 25 | // You can update the following values to match your application needs. 26 | // For more information, see: https://flutter.dev/to/review-gradle-config. 27 | minSdk = 24 28 | targetSdk = 24 29 | versionCode = flutter.versionCode 30 | versionName = flutter.versionName 31 | } 32 | 33 | buildTypes { 34 | release { 35 | // TODO: Add your own signing config for the release build. 36 | // Signing with the debug keys for now, so `flutter run --release` works. 37 | signingConfig = signingConfigs.debug 38 | } 39 | } 40 | } 41 | 42 | flutter { 43 | source = "../.." 44 | } 45 | -------------------------------------------------------------------------------- /analysis_options.yaml: -------------------------------------------------------------------------------- 1 | # This file configures the analyzer, which statically analyzes Dart code to 2 | # check for errors, warnings, and lints. 3 | # 4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled 5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be 6 | # invoked from the command line by running `flutter analyze`. 7 | 8 | # The following line activates a set of recommended lints for Flutter apps, 9 | # packages, and plugins designed to encourage good coding practices. 10 | include: package:flutter_lints/flutter.yaml 11 | 12 | linter: 13 | # The lint rules applied to this project can be customized in the 14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml` 15 | # included above or to enable additional rules. A list of all available lints 16 | # and their documentation is published at https://dart.dev/lints. 17 | # 18 | # Instead of disabling a lint rule for the entire project in the 19 | # section below, it can also be suppressed for a single line of code 20 | # or a specific dart file by using the `// ignore: name_of_lint` and 21 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file 22 | # producing the lint. 23 | rules: 24 | # avoid_print: false # Uncomment to disable the `avoid_print` rule 25 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule 26 | 27 | # Additional information about this file can be found at 28 | # https://dart.dev/guides/language/analysis-options 29 | -------------------------------------------------------------------------------- /ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | platform :ios, '13.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | project 'Runner', { 8 | 'Debug' => :debug, 9 | 'Profile' => :release, 10 | 'Release' => :release, 11 | } 12 | 13 | def flutter_root 14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) 15 | unless File.exist?(generated_xcode_build_settings_path) 16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" 17 | end 18 | 19 | File.foreach(generated_xcode_build_settings_path) do |line| 20 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 21 | return matches[1].strip if matches 22 | end 23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" 24 | end 25 | 26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 27 | 28 | flutter_ios_podfile_setup 29 | 30 | target 'Runner' do 31 | use_frameworks! 32 | use_modular_headers! 33 | 34 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) 35 | target 'RunnerTests' do 36 | inherit! :search_paths 37 | end 38 | end 39 | 40 | post_install do |installer| 41 | installer.pods_project.targets.each do |target| 42 | flutter_additional_ios_build_settings(target) 43 | end 44 | end 45 | -------------------------------------------------------------------------------- /web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "noti", 3 | "short_name": "noti", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "FireNoti is a powerful notification management solution that leverages Firebase FCM to deliver real-time push notifications with ease. Designed for developers and businesses, FireNoti provides a seamless way to integrate push notifications into your mobile app, ensuring your users stay informed and engaged. With features like customizable alerts, instant message delivery, and reliable performance, FireNoti makes managing notifications simple and efficient. Whether you need to send updates, alerts, or promotional messages, FireNoti ensures your notifications reach the right audience at the right time.", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | }, 22 | { 23 | "src": "icons/Icon-maskable-192.png", 24 | "sizes": "192x192", 25 | "type": "image/png", 26 | "purpose": "maskable" 27 | }, 28 | { 29 | "src": "icons/Icon-maskable-512.png", 30 | "sizes": "512x512", 31 | "type": "image/png", 32 | "purpose": "maskable" 33 | } 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /lib/notification/firebase_messaging/setup_interact_message.dart: -------------------------------------------------------------------------------- 1 | import 'package:firebase_messaging/firebase_messaging.dart'; 2 | import 'package:flutter/cupertino.dart'; 3 | import '../PayLoadModel/data.dart'; 4 | import '../go_specific_screen.dart'; 5 | 6 | class SetupInteractMessage { 7 | final FirebaseMessaging firebaseMessaging; 8 | final BuildContext context; 9 | 10 | SetupInteractMessage({required this.firebaseMessaging, required this.context}); 11 | 12 | /// Sets up the interaction with incoming messages and handles navigation. 13 | void setupInteractMessage() async { 14 | // Check for any initial message that opened the app 15 | RemoteMessage? payloads = await firebaseMessaging.getInitialMessage(); 16 | 17 | // If there is a payload, convert it to NavigationDetailsModel 18 | if (payloads != null) { 19 | _handlePayload(payloads); 20 | } 21 | 22 | // Listen for messages when the app is in the background 23 | FirebaseMessaging.onMessageOpenedApp.listen((payloads) { 24 | _handlePayload(payloads); 25 | }); 26 | } 27 | 28 | /// Handles the incoming payload and navigates to the specified screen. 29 | void _handlePayload(RemoteMessage payloads) { 30 | try { 31 | final navigationDetailsModel = NavigationDetailsModel.fromJson(payloads.data); 32 | // Navigate to the specified screen using the NavigationService 33 | NavigationService(context: context).goToScreen(screen: navigationDetailsModel.screen ??''); 34 | } catch (error) { 35 | // Handle any parsing or navigation errors 36 | debugPrint('Error handling payload: $error'); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "16x16", 5 | "idiom" : "mac", 6 | "filename" : "app_icon_16.png", 7 | "scale" : "1x" 8 | }, 9 | { 10 | "size" : "16x16", 11 | "idiom" : "mac", 12 | "filename" : "app_icon_32.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "32x32", 17 | "idiom" : "mac", 18 | "filename" : "app_icon_32.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "32x32", 23 | "idiom" : "mac", 24 | "filename" : "app_icon_64.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "128x128", 29 | "idiom" : "mac", 30 | "filename" : "app_icon_128.png", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "size" : "128x128", 35 | "idiom" : "mac", 36 | "filename" : "app_icon_256.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "256x256", 41 | "idiom" : "mac", 42 | "filename" : "app_icon_256.png", 43 | "scale" : "1x" 44 | }, 45 | { 46 | "size" : "256x256", 47 | "idiom" : "mac", 48 | "filename" : "app_icon_512.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "512x512", 53 | "idiom" : "mac", 54 | "filename" : "app_icon_512.png", 55 | "scale" : "1x" 56 | }, 57 | { 58 | "size" : "512x512", 59 | "idiom" : "mac", 60 | "filename" : "app_icon_1024.png", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: "2663184aa79047d0a33a14a3b607954f8fdd8730" 8 | channel: "stable" 9 | 10 | project_type: app 11 | 12 | # Tracks metadata for the flutter migrate command 13 | migration: 14 | platforms: 15 | - platform: root 16 | create_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730 17 | base_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730 18 | - platform: android 19 | create_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730 20 | base_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730 21 | - platform: ios 22 | create_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730 23 | base_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730 24 | - platform: linux 25 | create_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730 26 | base_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730 27 | - platform: macos 28 | create_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730 29 | base_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730 30 | - platform: web 31 | create_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730 32 | base_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730 33 | - platform: windows 34 | create_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730 35 | base_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730 36 | 37 | # User provided section 38 | 39 | # List of Local paths (relative to this file) that should be 40 | # ignored by the migrate tool. 41 | # 42 | # Files that are not part of the templates will be ignored by default. 43 | unmanaged_files: 44 | - 'lib/main.dart' 45 | - 'ios/Runner.xcodeproj/project.pbxproj' 46 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: noti 2 | description: > 3 | FireNoti is a powerful notification management solution that leverages Firebase FCM to deliver real-time push notifications with ease. 4 | Designed for developers and businesses, FireNoti provides a seamless way to integrate push notifications into your mobile app, 5 | ensuring your users stay informed and engaged. With features like customizable alerts, instant message delivery, and reliable performance, 6 | FireNoti makes managing notifications simple and efficient. Whether you need to send updates, alerts, or promotional messages, 7 | FireNoti ensures your notifications reach the right audience at the right time. 8 | 9 | # This package will not be published to pub.dev 10 | publish_to: 'none' 11 | 12 | # The current version of the package, following semantic versioning. 13 | version: 1.0.0+1 14 | 15 | # Environment SDK specifies the version of Dart SDK required to run the package. 16 | environment: 17 | sdk: ^3.5.3 18 | 19 | # Dependencies required for the application to run. 20 | dependencies: 21 | flutter: 22 | sdk: flutter 23 | 24 | firebase_messaging: ^15.1.3 25 | awesome_notifications: ^0.10.0 26 | firebase_core: ^3.6.0 27 | 28 | # Development dependencies for testing and linting. 29 | dev_dependencies: 30 | # Flutter Test package for running tests in a Flutter environment. 31 | flutter_test: 32 | sdk: flutter 33 | 34 | # Linting package for enforcing code style and best practices. 35 | flutter_lints: ^4.0.0 36 | 37 | # Flutter configuration. 38 | flutter: 39 | # Enabling Material Design for the application. 40 | uses-material-design: true 41 | 42 | # Assets to be included in the application. 43 | assets: 44 | # Uncomment and add the paths to your image assets. 45 | - assets/sound1.mp3 46 | - assets/sound2.mp3 47 | # - images/a_dot_ham.jpeg 48 | 49 | # License information for the package. 50 | license: GPL-3.0 51 | -------------------------------------------------------------------------------- /web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | noti 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /windows/runner/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.14) 2 | project(runner LANGUAGES CXX) 3 | 4 | # Define the application target. To change its name, change BINARY_NAME in the 5 | # top-level CMakeLists.txt, not the value here, or `flutter run` will no longer 6 | # work. 7 | # 8 | # Any new source files that you add to the application should be added here. 9 | add_executable(${BINARY_NAME} WIN32 10 | "flutter_window.cpp" 11 | "main.cpp" 12 | "utils.cpp" 13 | "win32_window.cpp" 14 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" 15 | "Runner.rc" 16 | "runner.exe.manifest" 17 | ) 18 | 19 | # Apply the standard set of build settings. This can be removed for applications 20 | # that need different build settings. 21 | apply_standard_settings(${BINARY_NAME}) 22 | 23 | # Add preprocessor definitions for the build version. 24 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION=\"${FLUTTER_VERSION}\"") 25 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MAJOR=${FLUTTER_VERSION_MAJOR}") 26 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MINOR=${FLUTTER_VERSION_MINOR}") 27 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_PATCH=${FLUTTER_VERSION_PATCH}") 28 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_BUILD=${FLUTTER_VERSION_BUILD}") 29 | 30 | # Disable Windows macros that collide with C++ standard library functions. 31 | target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") 32 | 33 | # Add dependency libraries and include directories. Add any application-specific 34 | # dependencies here. 35 | target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) 36 | target_link_libraries(${BINARY_NAME} PRIVATE "dwmapi.lib") 37 | target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") 38 | 39 | # Run the Flutter tool portions of the build. This must not be removed. 40 | add_dependencies(${BINARY_NAME} flutter_assemble) 41 | -------------------------------------------------------------------------------- /lib/notification/firebase_messaging/notification_device_token.dart: -------------------------------------------------------------------------------- 1 | import 'package:firebase_messaging/firebase_messaging.dart'; 2 | import 'package:flutter/widgets.dart'; 3 | 4 | /// A class to manage device tokens for Firebase Cloud Messaging (FCM). 5 | /// 6 | /// This class helps you get, refresh, and delete the device token used for notifications. 7 | class NotificationDeviceToken { 8 | final FirebaseMessaging _firebaseMessaging; 9 | 10 | /// Constructor to initialize [NotificationDeviceToken]. 11 | NotificationDeviceToken(this._firebaseMessaging); 12 | 13 | /// Gets the device token for sending notifications. 14 | /// 15 | /// This method retrieves the current device token. You can use this token to send notifications 16 | /// to this device. 17 | /// 18 | /// Returns: 19 | /// - A `Future` that provides the device token. If the token cannot be found, 20 | /// it returns an empty string. 21 | Future getDeviceToken() async { 22 | String? deviceToken = await _firebaseMessaging.getToken(); 23 | debugPrint('Device Token: $deviceToken'); 24 | return deviceToken; 25 | } 26 | 27 | /// Listens for changes to the device token. 28 | /// 29 | /// This method sets up a listener that triggers whenever the token is updated. 30 | /// It's important to listen for updates because the token may change. 31 | void listenForTokenRefresh() { 32 | _firebaseMessaging.getNotificationSettings(); 33 | _firebaseMessaging.onTokenRefresh.listen((String deviceToken) { 34 | debugPrint('Updated Device Token: $deviceToken'); 35 | }); 36 | } 37 | 38 | /// Deletes the current device token. 39 | /// 40 | /// Use this method to remove the device token when you no longer want to receive notifications. 41 | Future deleteDeviceToken() async { 42 | try { 43 | await _firebaseMessaging.deleteToken(); 44 | debugPrint("Device token deleted successfully!"); 45 | } catch (error) { 46 | debugPrint("Failed to delete device token: $error"); 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /lib/notification/awesome_notification/notification_calendar.dart: -------------------------------------------------------------------------------- 1 | import 'package:awesome_notifications/awesome_notifications.dart'; 2 | 3 | class NotificationCalendar extends NotificationSchedule { 4 | /// Constructs a [NotificationCalendar] with specific scheduling options. 5 | NotificationCalendar({ 6 | required super.timeZone, 7 | required this.year, 8 | required this.month, 9 | required this.day, 10 | required this.hour, 11 | required this.minute, 12 | required this.second, 13 | required this.millisecond, 14 | super.allowWhileIdle, 15 | super.repeats, 16 | super.preciseAlarm, 17 | super.delayTolerance, 18 | }); 19 | 20 | /// The year for the scheduled notification. 21 | int year; 22 | 23 | /// The month for the scheduled notification. 24 | int month; 25 | 26 | /// The day for the scheduled notification. 27 | int day; 28 | 29 | /// The hour for the scheduled notification. 30 | int hour; 31 | 32 | /// The minute for the scheduled notification. 33 | int minute; 34 | 35 | /// The second for the scheduled notification. 36 | int second; 37 | 38 | /// The millisecond for the scheduled notification. 39 | int millisecond; 40 | 41 | @override 42 | Map toMap() { 43 | final map = super.toMap(); 44 | map.addAll({ 45 | 'year': year, 46 | 'month': month, 47 | 'day': day, 48 | 'hour': hour, 49 | 'minute': minute, 50 | 'second': second, 51 | 'millisecond': millisecond, 52 | }); 53 | return map; 54 | } 55 | 56 | @override 57 | NotificationCalendar? fromMap(Map mapData) { 58 | super.fromMap(mapData); 59 | year = mapData['year']; 60 | month = mapData['month']; 61 | day = mapData['day']; 62 | hour = mapData['hour']; 63 | minute = mapData['minute']; 64 | second = mapData['second']; 65 | millisecond = mapData['millisecond']; 66 | return this; 67 | } 68 | 69 | @override 70 | void validate() { 71 | // TODO: implement validate 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /windows/runner/utils.cpp: -------------------------------------------------------------------------------- 1 | #include "utils.h" 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #include 9 | 10 | void CreateAndAttachConsole() { 11 | if (::AllocConsole()) { 12 | FILE *unused; 13 | if (freopen_s(&unused, "CONOUT$", "w", stdout)) { 14 | _dup2(_fileno(stdout), 1); 15 | } 16 | if (freopen_s(&unused, "CONOUT$", "w", stderr)) { 17 | _dup2(_fileno(stdout), 2); 18 | } 19 | std::ios::sync_with_stdio(); 20 | FlutterDesktopResyncOutputStreams(); 21 | } 22 | } 23 | 24 | std::vector GetCommandLineArguments() { 25 | // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use. 26 | int argc; 27 | wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc); 28 | if (argv == nullptr) { 29 | return std::vector(); 30 | } 31 | 32 | std::vector command_line_arguments; 33 | 34 | // Skip the first argument as it's the binary name. 35 | for (int i = 1; i < argc; i++) { 36 | command_line_arguments.push_back(Utf8FromUtf16(argv[i])); 37 | } 38 | 39 | ::LocalFree(argv); 40 | 41 | return command_line_arguments; 42 | } 43 | 44 | std::string Utf8FromUtf16(const wchar_t* utf16_string) { 45 | if (utf16_string == nullptr) { 46 | return std::string(); 47 | } 48 | unsigned int target_length = ::WideCharToMultiByte( 49 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, 50 | -1, nullptr, 0, nullptr, nullptr) 51 | -1; // remove the trailing null character 52 | int input_length = (int)wcslen(utf16_string); 53 | std::string utf8_string; 54 | if (target_length == 0 || target_length > utf8_string.max_size()) { 55 | return utf8_string; 56 | } 57 | utf8_string.resize(target_length); 58 | int converted_length = ::WideCharToMultiByte( 59 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, 60 | input_length, utf8_string.data(), target_length, nullptr, nullptr); 61 | if (converted_length == 0) { 62 | return std::string(); 63 | } 64 | return utf8_string; 65 | } 66 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | Noti 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | noti 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(FLUTTER_BUILD_NUMBER) 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | CADisableMinimumFrameDurationOnPhone 45 | 46 | UIApplicationSupportsIndirectInputEvents 47 | 48 | NSUserTrackingUsageDescription 49 | We need your permission to show notifications. 50 | UIBackgroundModes 51 | 52 | fetch 53 | remote-notification 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:firebase_core/firebase_core.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'core/router/app_router.dart'; 4 | // 🚨 Removed the import for security 5 | import 'firebase_options.dart'; 6 | import 'notification/awesome_notification/notification_channel_service.dart'; 7 | import 'notification/notification_implementation.dart'; 8 | 9 | // 🔒 We have removed the firebase_options.dart file for security purposes. 10 | // 📥 Please remember to add the google-services.json file. 11 | // ✅ You can use the Firebase CLI, and it will work properly. 12 | FirebaseOptions options = DefaultFirebaseOptions.currentPlatform; 13 | 14 | 15 | 16 | void main() async { 17 | WidgetsFlutterBinding.ensureInitialized(); 18 | await Firebase.initializeApp(options: options); 19 | runApp(const MyApp()); 20 | } 21 | 22 | class MyApp extends StatefulWidget { 23 | const MyApp({super.key}); 24 | 25 | static NavigatorObserver navigatorObserver = NavigatorObserver(); 26 | @override 27 | State createState() => _MyAppState(); 28 | } 29 | 30 | class _MyAppState extends State { 31 | @override 32 | void initState() { 33 | fireNoti(); 34 | super.initState(); 35 | } 36 | fireNoti() async { 37 | String icon = 'resource://mipmap/ic_stat'; 38 | String sound = 'resource://raw/noti_sound'; 39 | final notification = NotificationImplementation( 40 | awesomeChannelService: AwesomeChannelService( 41 | notificationIcon: icon, 42 | sound: sound, 43 | ), 44 | 45 | ); 46 | notification.initialize(); 47 | await notification.fcmInitialize(context); 48 | } 49 | 50 | @override 51 | Widget build(BuildContext context) { 52 | return MaterialApp( 53 | title: 'FireNoti', 54 | debugShowCheckedModeBanner: false, 55 | theme: ThemeData( 56 | colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), 57 | useMaterial3: true, 58 | ), 59 | navigatorObservers: [MyApp.navigatorObserver], 60 | initialRoute: AppRouter.splash, 61 | onGenerateRoute: AppRouter.generateRoute, 62 | ); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /lib/notification/firebase_messaging/notification_permissions.dart: -------------------------------------------------------------------------------- 1 | import 'package:firebase_messaging/firebase_messaging.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | /// A class to manage notification permissions for Firebase Messaging. 5 | class NotificationPermissions { 6 | final FirebaseMessaging firebaseMessaging; 7 | 8 | /// Constructor to initialize [NotificationPermissions]. 9 | NotificationPermissions(this.firebaseMessaging); 10 | 11 | /// Requests notification permission from the user. 12 | /// 13 | /// This method prompts the user for permission to send notifications. 14 | /// It checks the authorization status after the request. 15 | Future requestNotificationPermission() async { 16 | NotificationSettings settings = await firebaseMessaging.requestPermission( 17 | alert: true, // 📬 Show alerts 18 | announcement: false, // 🔕 No announcements 19 | badge: true, // 🔔 Allow badge updates 20 | carPlay: false, // 🚗 No CarPlay support 21 | criticalAlert: false, // ⚠️ No critical alerts 22 | provisional: false, // 🚧 No provisional permission 23 | sound: true, // 🔊 Allow sound notifications 24 | ); 25 | 26 | // Handle the user's response to the permission request. 27 | return _handlePermissionResponse(settings.authorizationStatus); 28 | } 29 | 30 | /// Handles the response from the notification permission request. 31 | /// 32 | /// This method logs the authorization status to the console. 33 | bool _handlePermissionResponse(AuthorizationStatus status) { 34 | switch (status) { 35 | case AuthorizationStatus.authorized: 36 | debugPrint('✅ User granted permission: Authorized'); 37 | break; 38 | case AuthorizationStatus.provisional: 39 | debugPrint('⚠️ User granted permission: Provisional'); 40 | break; 41 | case AuthorizationStatus.denied: 42 | debugPrint('❌ User granted permission: Denied'); 43 | break; 44 | case AuthorizationStatus.notDetermined: 45 | debugPrint('❓ User granted permission: Not Determined'); 46 | break; 47 | } 48 | // Return true if permission is granted, otherwise false. 49 | return status == AuthorizationStatus.authorized || status == AuthorizationStatus.provisional; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /windows/runner/flutter_window.cpp: -------------------------------------------------------------------------------- 1 | #include "flutter_window.h" 2 | 3 | #include 4 | 5 | #include "flutter/generated_plugin_registrant.h" 6 | 7 | FlutterWindow::FlutterWindow(const flutter::DartProject& project) 8 | : project_(project) {} 9 | 10 | FlutterWindow::~FlutterWindow() {} 11 | 12 | bool FlutterWindow::OnCreate() { 13 | if (!Win32Window::OnCreate()) { 14 | return false; 15 | } 16 | 17 | RECT frame = GetClientArea(); 18 | 19 | // The size here must match the window dimensions to avoid unnecessary surface 20 | // creation / destruction in the startup path. 21 | flutter_controller_ = std::make_unique( 22 | frame.right - frame.left, frame.bottom - frame.top, project_); 23 | // Ensure that basic setup of the controller was successful. 24 | if (!flutter_controller_->engine() || !flutter_controller_->view()) { 25 | return false; 26 | } 27 | RegisterPlugins(flutter_controller_->engine()); 28 | SetChildContent(flutter_controller_->view()->GetNativeWindow()); 29 | 30 | flutter_controller_->engine()->SetNextFrameCallback([&]() { 31 | this->Show(); 32 | }); 33 | 34 | // Flutter can complete the first frame before the "show window" callback is 35 | // registered. The following call ensures a frame is pending to ensure the 36 | // window is shown. It is a no-op if the first frame hasn't completed yet. 37 | flutter_controller_->ForceRedraw(); 38 | 39 | return true; 40 | } 41 | 42 | void FlutterWindow::OnDestroy() { 43 | if (flutter_controller_) { 44 | flutter_controller_ = nullptr; 45 | } 46 | 47 | Win32Window::OnDestroy(); 48 | } 49 | 50 | LRESULT 51 | FlutterWindow::MessageHandler(HWND hwnd, UINT const message, 52 | WPARAM const wparam, 53 | LPARAM const lparam) noexcept { 54 | // Give Flutter, including plugins, an opportunity to handle window messages. 55 | if (flutter_controller_) { 56 | std::optional result = 57 | flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam, 58 | lparam); 59 | if (result) { 60 | return *result; 61 | } 62 | } 63 | 64 | switch (message) { 65 | case WM_FONTCHANGE: 66 | flutter_controller_->engine()->ReloadSystemFonts(); 67 | break; 68 | } 69 | 70 | return Win32Window::MessageHandler(hwnd, message, wparam, lparam); 71 | } 72 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /.github/workflows/dart.yml: -------------------------------------------------------------------------------- 1 | # This is a basic workflow to help you get started with Actions 2 | 3 | name: APK Build 4 | 5 | # Controls when the workflow will run 6 | on: 7 | # Triggers the workflow on push or pull request events but only for the master branch 8 | push: 9 | branches: [ main ] 10 | # pull_request: 11 | # branches: [ master ] 12 | 13 | # Allows you to run this workflow manually from the Actions tab 14 | workflow_dispatch: 15 | 16 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel 17 | jobs: 18 | # This workflow contains a single job called "build" 19 | build: 20 | # The type of runner that the job will run on 21 | runs-on: ubuntu-latest 22 | 23 | # Steps represent a sequence of tasks that will be executed as part of the job 24 | steps: 25 | - name: Export Release Timestamp 26 | run: echo "APP_VERSION=v$(date +'%Y.%m.%d.%H.%M.%S')" >> $GITHUB_ENV 27 | 28 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it 29 | - uses: actions/checkout@v2 30 | 31 | - name: Flutter action 32 | # You may pin to the exact commit or the version. 33 | # uses: subosito/flutter-action@4389e6cbc6cb8a4b18c628ff96ff90be0e926aa8 34 | uses: subosito/flutter-action@v1.5.3 35 | with: 36 | flutter-version: "3.27.3" 37 | channel: stable 38 | 39 | - name: Fetch dependencies 40 | run: flutter pub get 41 | 42 | - name: Flutter Doctor 43 | run: flutter doctor 44 | 45 | - name: Build APK 46 | run: flutter build apk 47 | 48 | - name: Rename APK with Fire-Noti & Date 49 | run: | 50 | DATE=$(date +'%d_%m_%Y') 51 | NEW_NAME="fire_noti_${DATE}.apk" 52 | mv build/app/outputs/flutter-apk/app-release.apk build/app/outputs/flutter-apk/$NEW_NAME 53 | echo "APK_NAME=$NEW_NAME" >> $GITHUB_ENV 54 | 55 | - name: Generate Release Notes 56 | run: | 57 | echo "Fire-Noti and date: $(date +'%d-%m-%Y (%I:%M %p)')" > release_notes.txt 58 | 59 | - name: Release App 60 | uses: ncipollo/release-action@v1 61 | 62 | with: 63 | tag: ${{ env.APP_VERSION }} 64 | name: ${{ env.APP_VERSION }} 65 | token: ${{ secrets.GITHUB_TOKEN }} 66 | tag_name: v1.0.${{ github.run_number }} 67 | release_name: "Flutter App v1.0.${{ github.run_number }}" 68 | body_path: release_notes.txt 69 | draft: false 70 | prerelease: false 71 | files: build/app/outputs/flutter-apk/${{ env.APK_NAME }} 72 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Code of Conduct 2 | 3 | ## Introduction 4 | 5 | As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting code, and other activities. We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion. 6 | 7 | ## Our Standards 8 | 9 | Examples of behavior that contributes to creating a positive environment include: 10 | 11 | - Using welcoming and inclusive language 12 | - Being respectful of differing viewpoints and experiences 13 | - Gracefully accepting constructive criticism 14 | - Focusing on what is best for the community 15 | - Showing empathy towards other community members 16 | 17 | Examples of unacceptable behavior by participants include: 18 | 19 | - The use of sexualized language or imagery and unwelcome sexual attention or advances 20 | - Trolling, insulting/derogatory comments, and personal or political attacks 21 | - Public or private harassment 22 | - Publishing others' private information, such as a physical or electronic address, without explicit permission 23 | - Other conduct which could reasonably be considered inappropriate in a professional setting 24 | 25 | ## Our Responsibilities 26 | 27 | Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. 28 | 29 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that do not align with this Code of Conduct, and will communicate reasons for moderation decisions when appropriate. 30 | 31 | ## Scope 32 | 33 | This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. 34 | 35 | ## Enforcement 36 | 37 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. 38 | 39 | ## Attribution 40 | 41 | This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 1.4. 42 | -------------------------------------------------------------------------------- /linux/flutter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file controls Flutter-level build steps. It should not be edited. 2 | cmake_minimum_required(VERSION 3.10) 3 | 4 | set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") 5 | 6 | # Configuration provided via flutter tool. 7 | include(${EPHEMERAL_DIR}/generated_config.cmake) 8 | 9 | # TODO: Move the rest of this into files in ephemeral. See 10 | # https://github.com/flutter/flutter/issues/57146. 11 | 12 | # Serves the same purpose as list(TRANSFORM ... PREPEND ...), 13 | # which isn't available in 3.10. 14 | function(list_prepend LIST_NAME PREFIX) 15 | set(NEW_LIST "") 16 | foreach(element ${${LIST_NAME}}) 17 | list(APPEND NEW_LIST "${PREFIX}${element}") 18 | endforeach(element) 19 | set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE) 20 | endfunction() 21 | 22 | # === Flutter Library === 23 | # System-level dependencies. 24 | find_package(PkgConfig REQUIRED) 25 | pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) 26 | pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0) 27 | pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0) 28 | 29 | set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so") 30 | 31 | # Published to parent scope for install step. 32 | set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) 33 | set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) 34 | set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) 35 | set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE) 36 | 37 | list(APPEND FLUTTER_LIBRARY_HEADERS 38 | "fl_basic_message_channel.h" 39 | "fl_binary_codec.h" 40 | "fl_binary_messenger.h" 41 | "fl_dart_project.h" 42 | "fl_engine.h" 43 | "fl_json_message_codec.h" 44 | "fl_json_method_codec.h" 45 | "fl_message_codec.h" 46 | "fl_method_call.h" 47 | "fl_method_channel.h" 48 | "fl_method_codec.h" 49 | "fl_method_response.h" 50 | "fl_plugin_registrar.h" 51 | "fl_plugin_registry.h" 52 | "fl_standard_message_codec.h" 53 | "fl_standard_method_codec.h" 54 | "fl_string_codec.h" 55 | "fl_value.h" 56 | "fl_view.h" 57 | "flutter_linux.h" 58 | ) 59 | list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/") 60 | add_library(flutter INTERFACE) 61 | target_include_directories(flutter INTERFACE 62 | "${EPHEMERAL_DIR}" 63 | ) 64 | target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}") 65 | target_link_libraries(flutter INTERFACE 66 | PkgConfig::GTK 67 | PkgConfig::GLIB 68 | PkgConfig::GIO 69 | ) 70 | add_dependencies(flutter flutter_assemble) 71 | 72 | # === Flutter tool backend === 73 | # _phony_ is a non-existent file to force this command to run every time, 74 | # since currently there's no way to get a full input/output list from the 75 | # flutter tool. 76 | add_custom_command( 77 | OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} 78 | ${CMAKE_CURRENT_BINARY_DIR}/_phony_ 79 | COMMAND ${CMAKE_COMMAND} -E env 80 | ${FLUTTER_TOOL_ENVIRONMENT} 81 | "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh" 82 | ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE} 83 | VERBATIM 84 | ) 85 | add_custom_target(flutter_assemble DEPENDS 86 | "${FLUTTER_LIBRARY}" 87 | ${FLUTTER_LIBRARY_HEADERS} 88 | ) 89 | -------------------------------------------------------------------------------- /lib/notification/awesome_notification/notification_channel_service.dart: -------------------------------------------------------------------------------- 1 | import 'package:awesome_notifications/awesome_notifications.dart'; 2 | import 'package:flutter/foundation.dart'; 3 | import 'package:flutter/material.dart'; 4 | 5 | /// A service class to manage the initialization of notification channels 6 | /// using the Awesome Notifications package. 7 | class AwesomeChannelService { 8 | // Notification sound source path 9 | final String? sound; 10 | 11 | // Default icon for the notifications 12 | final String? notificationIcon; 13 | 14 | /// Constructor for initializing [AwesomeChannelService]. 15 | /// 16 | /// [sound] represents the sound source for notifications. 17 | /// [notificationIcon] represents the icon path used for the notifications. 18 | AwesomeChannelService({ 19 | this.sound, 20 | this.notificationIcon, 21 | }); 22 | 23 | /// Initializes notification channels. 24 | /// 25 | /// This method allows users to configure multiple notification channels. 26 | Future initializeChannels({ 27 | required List channels, 28 | String? languageCode, 29 | List? channelGroups, 30 | }) async { 31 | await AwesomeNotifications().initialize( 32 | notificationIcon, // App icon (null will use the default icon) 33 | channels, 34 | languageCode: languageCode, 35 | debug: kDebugMode, 36 | channelGroups: channelGroups, 37 | ); 38 | } 39 | 40 | /// Creates and returns a generic notification channel configuration. 41 | /// 42 | /// This helper method is used to create a channel with standard settings. 43 | NotificationChannel createChannel({ 44 | required String channelKey, 45 | required String channelName, 46 | required String channelDescription, 47 | NotificationImportance importance = NotificationImportance.Max, 48 | String? soundSource, 49 | String? groupKey, 50 | Color? ledColor, 51 | Color? defaultColor, 52 | DefaultRingtoneType? defaultRingtoneType, 53 | bool criticalAlerts = false, 54 | bool channelShowBadge = true, 55 | bool locked = false, 56 | bool onlyAlertOnce = true, 57 | }) { 58 | return NotificationChannel( 59 | channelKey: channelKey, 60 | channelName: channelName, 61 | channelDescription: channelDescription, 62 | importance: importance, 63 | soundSource: soundSource, 64 | ledColor: ledColor ?? Colors.brown, 65 | defaultColor: defaultColor ?? Colors.brown, 66 | criticalAlerts: criticalAlerts, 67 | channelShowBadge: channelShowBadge, 68 | icon: notificationIcon, 69 | locked: locked, 70 | onlyAlertOnce: onlyAlertOnce, 71 | groupKey: groupKey, 72 | defaultRingtoneType: defaultRingtoneType, 73 | ); 74 | } 75 | 76 | /// Creates and returns a generic notification channel group configuration. 77 | /// 78 | /// This helper method is used to create a channel with standard settings. 79 | NotificationChannelGroup notificationChannelGroup({ 80 | required String channelGroupKey, 81 | required String channelGroupName, 82 | }) { 83 | return NotificationChannelGroup( 84 | channelGroupKey: channelGroupKey, 85 | channelGroupName: channelGroupName, 86 | ); 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /lib/notification/payLoadModel/data.dart: -------------------------------------------------------------------------------- 1 | import 'arg.dart'; 2 | import 'dart:convert'; 3 | 4 | NavigationDetailsModel navigationDetailsModelFromJson(String str) => NavigationDetailsModel.fromJson(json.decode(str)); 5 | String navigationDetailsModelToJson(NavigationDetailsModel navigationDetailsModel) => json.encode(navigationDetailsModel.toJson()); 6 | 7 | class NavigationDetailsModel { 8 | NavigationDetailsModel({ 9 | this.androidChannelId, 10 | this.title, 11 | this.screen, 12 | this.body, 13 | this.page, 14 | this.bigImage, 15 | this.image, 16 | this.time, 17 | this.description, 18 | this.date, 19 | this.arg, 20 | this.orderStatus, 21 | this.orderId, 22 | this.id, 23 | }); 24 | 25 | NavigationDetailsModel.fromJson(dynamic json) { 26 | androidChannelId = json['android_channel_id']; 27 | title = json['title']; 28 | body = json['body']; 29 | page = json['page']; 30 | bigImage = json['bigImage']; 31 | image = json['image']; 32 | orderStatus = json['order_status']; 33 | orderId = json['order_id']; 34 | date = json['date']; 35 | description = json['description']; 36 | time = json['time']; 37 | id = json['id']; 38 | screen = json['screen']; 39 | // arg = json['arg'] != null ? Arg.fromJson(json['arg']) : null; 40 | } 41 | 42 | String? androidChannelId; 43 | String? title; 44 | String? body; 45 | String? page; 46 | String? bigImage; 47 | String? image; 48 | String? orderStatus; 49 | String? orderId; 50 | String? date; 51 | String? screen; 52 | String? time; 53 | dynamic id; 54 | String? description; 55 | Arg? arg; 56 | 57 | Map toJson() { 58 | final map = {}; 59 | map['android_channel_id'] = androidChannelId; 60 | map['title'] = title; 61 | map['body'] = body; 62 | map['page'] = page; 63 | map['bigImage'] = bigImage; 64 | map['image'] = image; 65 | map['order_status'] = orderStatus; 66 | map['order_id'] = orderId; 67 | map['date'] = date; 68 | map['description'] = description; 69 | map['time'] = time; 70 | map['id'] = id; 71 | map['screen'] = screen; 72 | if (arg != null) { 73 | map['arg'] = arg?.toJson(); 74 | } 75 | return map; 76 | } 77 | 78 | NavigationDetailsModel copyWith({ 79 | 80 | 81 | String? androidChannelId, 82 | String? title, 83 | String? body, 84 | String? page, 85 | String? bigImage, 86 | String? image, 87 | String? screen, 88 | String? time, 89 | String? description, 90 | String? date, 91 | Arg? arg, 92 | dynamic id, 93 | String? orderStatus, 94 | String? orderId, 95 | }) { 96 | return NavigationDetailsModel( 97 | androidChannelId: androidChannelId ?? this.androidChannelId, 98 | title: title ?? this.title, 99 | body: body ?? this.body, 100 | page: page ?? this.page, 101 | bigImage: bigImage ?? this.bigImage, 102 | image: image ?? this.image, 103 | time: time ?? this.time, 104 | description: description ?? this.description, 105 | date: date ?? this.date, 106 | screen: screen ?? this.screen, 107 | arg: arg ?? this.arg, 108 | id: id ?? this.id, 109 | orderStatus: orderStatus ?? this.orderStatus, 110 | orderId: orderId ?? this.orderId, 111 | ); 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 14 | 23 | 27 | 31 | 32 | 33 | 34 | 35 | 36 | 38 | 41 | 42 | 45 | 46 | 47 | 48 | 49 | 50 | 53 | 54 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /windows/runner/Runner.rc: -------------------------------------------------------------------------------- 1 | // Microsoft Visual C++ generated resource script. 2 | // 3 | #pragma code_page(65001) 4 | #include "resource.h" 5 | 6 | #define APSTUDIO_READONLY_SYMBOLS 7 | ///////////////////////////////////////////////////////////////////////////// 8 | // 9 | // Generated from the TEXTINCLUDE 2 resource. 10 | // 11 | #include "winres.h" 12 | 13 | ///////////////////////////////////////////////////////////////////////////// 14 | #undef APSTUDIO_READONLY_SYMBOLS 15 | 16 | ///////////////////////////////////////////////////////////////////////////// 17 | // English (United States) resources 18 | 19 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) 20 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 21 | 22 | #ifdef APSTUDIO_INVOKED 23 | ///////////////////////////////////////////////////////////////////////////// 24 | // 25 | // TEXTINCLUDE 26 | // 27 | 28 | 1 TEXTINCLUDE 29 | BEGIN 30 | "resource.h\0" 31 | END 32 | 33 | 2 TEXTINCLUDE 34 | BEGIN 35 | "#include ""winres.h""\r\n" 36 | "\0" 37 | END 38 | 39 | 3 TEXTINCLUDE 40 | BEGIN 41 | "\r\n" 42 | "\0" 43 | END 44 | 45 | #endif // APSTUDIO_INVOKED 46 | 47 | 48 | ///////////////////////////////////////////////////////////////////////////// 49 | // 50 | // Icon 51 | // 52 | 53 | // Icon with lowest ID value placed first to ensure application icon 54 | // remains consistent on all systems. 55 | IDI_APP_ICON ICON "resources\\app_icon.ico" 56 | 57 | 58 | ///////////////////////////////////////////////////////////////////////////// 59 | // 60 | // Version 61 | // 62 | 63 | #if defined(FLUTTER_VERSION_MAJOR) && defined(FLUTTER_VERSION_MINOR) && defined(FLUTTER_VERSION_PATCH) && defined(FLUTTER_VERSION_BUILD) 64 | #define VERSION_AS_NUMBER FLUTTER_VERSION_MAJOR,FLUTTER_VERSION_MINOR,FLUTTER_VERSION_PATCH,FLUTTER_VERSION_BUILD 65 | #else 66 | #define VERSION_AS_NUMBER 1,0,0,0 67 | #endif 68 | 69 | #if defined(FLUTTER_VERSION) 70 | #define VERSION_AS_STRING FLUTTER_VERSION 71 | #else 72 | #define VERSION_AS_STRING "1.0.0" 73 | #endif 74 | 75 | VS_VERSION_INFO VERSIONINFO 76 | FILEVERSION VERSION_AS_NUMBER 77 | PRODUCTVERSION VERSION_AS_NUMBER 78 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 79 | #ifdef _DEBUG 80 | FILEFLAGS VS_FF_DEBUG 81 | #else 82 | FILEFLAGS 0x0L 83 | #endif 84 | FILEOS VOS__WINDOWS32 85 | FILETYPE VFT_APP 86 | FILESUBTYPE 0x0L 87 | BEGIN 88 | BLOCK "StringFileInfo" 89 | BEGIN 90 | BLOCK "040904e4" 91 | BEGIN 92 | VALUE "CompanyName", "com.fire" "\0" 93 | VALUE "FileDescription", "noti" "\0" 94 | VALUE "FileVersion", VERSION_AS_STRING "\0" 95 | VALUE "InternalName", "noti" "\0" 96 | VALUE "LegalCopyright", "Copyright (C) 2024 com.fire. All rights reserved." "\0" 97 | VALUE "OriginalFilename", "noti.exe" "\0" 98 | VALUE "ProductName", "noti" "\0" 99 | VALUE "ProductVersion", VERSION_AS_STRING "\0" 100 | END 101 | END 102 | BLOCK "VarFileInfo" 103 | BEGIN 104 | VALUE "Translation", 0x409, 1252 105 | END 106 | END 107 | 108 | #endif // English (United States) resources 109 | ///////////////////////////////////////////////////////////////////////////// 110 | 111 | 112 | 113 | #ifndef APSTUDIO_INVOKED 114 | ///////////////////////////////////////////////////////////////////////////// 115 | // 116 | // Generated from the TEXTINCLUDE 3 resource. 117 | // 118 | 119 | 120 | ///////////////////////////////////////////////////////////////////////////// 121 | #endif // not APSTUDIO_INVOKED 122 | -------------------------------------------------------------------------------- /windows/runner/win32_window.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_WIN32_WINDOW_H_ 2 | #define RUNNER_WIN32_WINDOW_H_ 3 | 4 | #include 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | // A class abstraction for a high DPI-aware Win32 Window. Intended to be 11 | // inherited from by classes that wish to specialize with custom 12 | // rendering and input handling 13 | class Win32Window { 14 | public: 15 | struct Point { 16 | unsigned int x; 17 | unsigned int y; 18 | Point(unsigned int x, unsigned int y) : x(x), y(y) {} 19 | }; 20 | 21 | struct Size { 22 | unsigned int width; 23 | unsigned int height; 24 | Size(unsigned int width, unsigned int height) 25 | : width(width), height(height) {} 26 | }; 27 | 28 | Win32Window(); 29 | virtual ~Win32Window(); 30 | 31 | // Creates a win32 window with |title| that is positioned and sized using 32 | // |origin| and |size|. New windows are created on the default monitor. Window 33 | // sizes are specified to the OS in physical pixels, hence to ensure a 34 | // consistent size this function will scale the inputted width and height as 35 | // as appropriate for the default monitor. The window is invisible until 36 | // |Show| is called. Returns true if the window was created successfully. 37 | bool Create(const std::wstring& title, const Point& origin, const Size& size); 38 | 39 | // Show the current window. Returns true if the window was successfully shown. 40 | bool Show(); 41 | 42 | // Release OS resources associated with window. 43 | void Destroy(); 44 | 45 | // Inserts |content| into the window tree. 46 | void SetChildContent(HWND content); 47 | 48 | // Returns the backing Window handle to enable clients to set icon and other 49 | // window properties. Returns nullptr if the window has been destroyed. 50 | HWND GetHandle(); 51 | 52 | // If true, closing this window will quit the application. 53 | void SetQuitOnClose(bool quit_on_close); 54 | 55 | // Return a RECT representing the bounds of the current client area. 56 | RECT GetClientArea(); 57 | 58 | protected: 59 | // Processes and route salient window messages for mouse handling, 60 | // size change and DPI. Delegates handling of these to member overloads that 61 | // inheriting classes can handle. 62 | virtual LRESULT MessageHandler(HWND window, 63 | UINT const message, 64 | WPARAM const wparam, 65 | LPARAM const lparam) noexcept; 66 | 67 | // Called when CreateAndShow is called, allowing subclass window-related 68 | // setup. Subclasses should return false if setup fails. 69 | virtual bool OnCreate(); 70 | 71 | // Called when Destroy is called. 72 | virtual void OnDestroy(); 73 | 74 | private: 75 | friend class WindowClassRegistrar; 76 | 77 | // OS callback called by message pump. Handles the WM_NCCREATE message which 78 | // is passed when the non-client area is being created and enables automatic 79 | // non-client DPI scaling so that the non-client area automatically 80 | // responds to changes in DPI. All other messages are handled by 81 | // MessageHandler. 82 | static LRESULT CALLBACK WndProc(HWND const window, 83 | UINT const message, 84 | WPARAM const wparam, 85 | LPARAM const lparam) noexcept; 86 | 87 | // Retrieves a class instance pointer for |window| 88 | static Win32Window* GetThisFromHandle(HWND const window) noexcept; 89 | 90 | // Update the window frame's theme to match the system theme. 91 | static void UpdateTheme(HWND const window); 92 | 93 | bool quit_on_close_ = false; 94 | 95 | // window handle for top level window. 96 | HWND window_handle_ = nullptr; 97 | 98 | // window handle for hosted content. 99 | HWND child_content_ = nullptr; 100 | }; 101 | 102 | #endif // RUNNER_WIN32_WINDOW_H_ 103 | -------------------------------------------------------------------------------- /macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 43 | 49 | 50 | 51 | 52 | 53 | 63 | 65 | 71 | 72 | 73 | 74 | 80 | 82 | 88 | 89 | 90 | 91 | 93 | 94 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 43 | 49 | 50 | 51 | 52 | 53 | 63 | 65 | 71 | 72 | 73 | 74 | 80 | 82 | 88 | 89 | 90 | 91 | 93 | 94 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /windows/flutter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file controls Flutter-level build steps. It should not be edited. 2 | cmake_minimum_required(VERSION 3.14) 3 | 4 | set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") 5 | 6 | # Configuration provided via flutter tool. 7 | include(${EPHEMERAL_DIR}/generated_config.cmake) 8 | 9 | # TODO: Move the rest of this into files in ephemeral. See 10 | # https://github.com/flutter/flutter/issues/57146. 11 | set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper") 12 | 13 | # Set fallback configurations for older versions of the flutter tool. 14 | if (NOT DEFINED FLUTTER_TARGET_PLATFORM) 15 | set(FLUTTER_TARGET_PLATFORM "windows-x64") 16 | endif() 17 | 18 | # === Flutter Library === 19 | set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll") 20 | 21 | # Published to parent scope for install step. 22 | set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) 23 | set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) 24 | set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) 25 | set(AOT_LIBRARY "${PROJECT_DIR}/build/windows/app.so" PARENT_SCOPE) 26 | 27 | list(APPEND FLUTTER_LIBRARY_HEADERS 28 | "flutter_export.h" 29 | "flutter_windows.h" 30 | "flutter_messenger.h" 31 | "flutter_plugin_registrar.h" 32 | "flutter_texture_registrar.h" 33 | ) 34 | list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/") 35 | add_library(flutter INTERFACE) 36 | target_include_directories(flutter INTERFACE 37 | "${EPHEMERAL_DIR}" 38 | ) 39 | target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib") 40 | add_dependencies(flutter flutter_assemble) 41 | 42 | # === Wrapper === 43 | list(APPEND CPP_WRAPPER_SOURCES_CORE 44 | "core_implementations.cc" 45 | "standard_codec.cc" 46 | ) 47 | list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/") 48 | list(APPEND CPP_WRAPPER_SOURCES_PLUGIN 49 | "plugin_registrar.cc" 50 | ) 51 | list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/") 52 | list(APPEND CPP_WRAPPER_SOURCES_APP 53 | "flutter_engine.cc" 54 | "flutter_view_controller.cc" 55 | ) 56 | list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/") 57 | 58 | # Wrapper sources needed for a plugin. 59 | add_library(flutter_wrapper_plugin STATIC 60 | ${CPP_WRAPPER_SOURCES_CORE} 61 | ${CPP_WRAPPER_SOURCES_PLUGIN} 62 | ) 63 | apply_standard_settings(flutter_wrapper_plugin) 64 | set_target_properties(flutter_wrapper_plugin PROPERTIES 65 | POSITION_INDEPENDENT_CODE ON) 66 | set_target_properties(flutter_wrapper_plugin PROPERTIES 67 | CXX_VISIBILITY_PRESET hidden) 68 | target_link_libraries(flutter_wrapper_plugin PUBLIC flutter) 69 | target_include_directories(flutter_wrapper_plugin PUBLIC 70 | "${WRAPPER_ROOT}/include" 71 | ) 72 | add_dependencies(flutter_wrapper_plugin flutter_assemble) 73 | 74 | # Wrapper sources needed for the runner. 75 | add_library(flutter_wrapper_app STATIC 76 | ${CPP_WRAPPER_SOURCES_CORE} 77 | ${CPP_WRAPPER_SOURCES_APP} 78 | ) 79 | apply_standard_settings(flutter_wrapper_app) 80 | target_link_libraries(flutter_wrapper_app PUBLIC flutter) 81 | target_include_directories(flutter_wrapper_app PUBLIC 82 | "${WRAPPER_ROOT}/include" 83 | ) 84 | add_dependencies(flutter_wrapper_app flutter_assemble) 85 | 86 | # === Flutter tool backend === 87 | # _phony_ is a non-existent file to force this command to run every time, 88 | # since currently there's no way to get a full input/output list from the 89 | # flutter tool. 90 | set(PHONY_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_phony_") 91 | set_source_files_properties("${PHONY_OUTPUT}" PROPERTIES SYMBOLIC TRUE) 92 | add_custom_command( 93 | OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} 94 | ${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN} 95 | ${CPP_WRAPPER_SOURCES_APP} 96 | ${PHONY_OUTPUT} 97 | COMMAND ${CMAKE_COMMAND} -E env 98 | ${FLUTTER_TOOL_ENVIRONMENT} 99 | "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat" 100 | ${FLUTTER_TARGET_PLATFORM} $ 101 | VERBATIM 102 | ) 103 | add_custom_target(flutter_assemble DEPENDS 104 | "${FLUTTER_LIBRARY}" 105 | ${FLUTTER_LIBRARY_HEADERS} 106 | ${CPP_WRAPPER_SOURCES_CORE} 107 | ${CPP_WRAPPER_SOURCES_PLUGIN} 108 | ${CPP_WRAPPER_SOURCES_APP} 109 | ) 110 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | {"images":[{"size":"60x60","expected-size":"180","filename":"180.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"40x40","expected-size":"80","filename":"80.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"40x40","expected-size":"120","filename":"120.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"60x60","expected-size":"120","filename":"120.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"57x57","expected-size":"57","filename":"57.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"1x"},{"size":"29x29","expected-size":"58","filename":"58.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"29x29","expected-size":"29","filename":"29.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"1x"},{"size":"29x29","expected-size":"87","filename":"87.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"57x57","expected-size":"114","filename":"114.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"20x20","expected-size":"40","filename":"40.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"20x20","expected-size":"60","filename":"60.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"1024x1024","filename":"1024.png","expected-size":"1024","idiom":"ios-marketing","folder":"Assets.xcassets/AppIcon.appiconset/","scale":"1x"},{"size":"40x40","expected-size":"80","filename":"80.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"72x72","expected-size":"72","filename":"72.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"76x76","expected-size":"152","filename":"152.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"50x50","expected-size":"100","filename":"100.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"29x29","expected-size":"58","filename":"58.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"76x76","expected-size":"76","filename":"76.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"29x29","expected-size":"29","filename":"29.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"50x50","expected-size":"50","filename":"50.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"72x72","expected-size":"144","filename":"144.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"40x40","expected-size":"40","filename":"40.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"83.5x83.5","expected-size":"167","filename":"167.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"20x20","expected-size":"20","filename":"20.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"20x20","expected-size":"40","filename":"40.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"128x128","expected-size":"128","filename":"128.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"1x"},{"size":"256x256","expected-size":"256","filename":"256.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"1x"},{"size":"128x128","expected-size":"256","filename":"256.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"2x"},{"size":"256x256","expected-size":"512","filename":"512.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"2x"},{"size":"32x32","expected-size":"32","filename":"32.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"1x"},{"size":"512x512","expected-size":"512","filename":"512.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"1x"},{"size":"16x16","expected-size":"16","filename":"16.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"1x"},{"size":"16x16","expected-size":"32","filename":"32.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"2x"},{"size":"32x32","expected-size":"64","filename":"64.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"2x"},{"size":"512x512","expected-size":"1024","filename":"1024.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"2x"}]} -------------------------------------------------------------------------------- /windows/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Project-level configuration. 2 | cmake_minimum_required(VERSION 3.14) 3 | project(noti LANGUAGES CXX) 4 | 5 | # The name of the executable created for the application. Change this to change 6 | # the on-disk name of your application. 7 | set(BINARY_NAME "noti") 8 | 9 | # Explicitly opt in to modern CMake behaviors to avoid warnings with recent 10 | # versions of CMake. 11 | cmake_policy(VERSION 3.14...3.25) 12 | 13 | # Define build configuration option. 14 | get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) 15 | if(IS_MULTICONFIG) 16 | set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release" 17 | CACHE STRING "" FORCE) 18 | else() 19 | if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) 20 | set(CMAKE_BUILD_TYPE "Debug" CACHE 21 | STRING "Flutter build mode" FORCE) 22 | set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS 23 | "Debug" "Profile" "Release") 24 | endif() 25 | endif() 26 | # Define settings for the Profile build mode. 27 | set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}") 28 | set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}") 29 | set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}") 30 | set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}") 31 | 32 | # Use Unicode for all projects. 33 | add_definitions(-DUNICODE -D_UNICODE) 34 | 35 | # Compilation settings that should be applied to most targets. 36 | # 37 | # Be cautious about adding new options here, as plugins use this function by 38 | # default. In most cases, you should add new options to specific targets instead 39 | # of modifying this function. 40 | function(APPLY_STANDARD_SETTINGS TARGET) 41 | target_compile_features(${TARGET} PUBLIC cxx_std_17) 42 | target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100") 43 | target_compile_options(${TARGET} PRIVATE /EHsc) 44 | target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0") 45 | target_compile_definitions(${TARGET} PRIVATE "$<$:_DEBUG>") 46 | endfunction() 47 | 48 | # Flutter library and tool build rules. 49 | set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") 50 | add_subdirectory(${FLUTTER_MANAGED_DIR}) 51 | 52 | # Application build; see runner/CMakeLists.txt. 53 | add_subdirectory("runner") 54 | 55 | 56 | # Generated plugin build rules, which manage building the plugins and adding 57 | # them to the application. 58 | include(flutter/generated_plugins.cmake) 59 | 60 | 61 | # === Installation === 62 | # Support files are copied into place next to the executable, so that it can 63 | # run in place. This is done instead of making a separate bundle (as on Linux) 64 | # so that building and running from within Visual Studio will work. 65 | set(BUILD_BUNDLE_DIR "$") 66 | # Make the "install" step default, as it's required to run. 67 | set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1) 68 | if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) 69 | set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) 70 | endif() 71 | 72 | set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") 73 | set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}") 74 | 75 | install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" 76 | COMPONENT Runtime) 77 | 78 | install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" 79 | COMPONENT Runtime) 80 | 81 | install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 82 | COMPONENT Runtime) 83 | 84 | if(PLUGIN_BUNDLED_LIBRARIES) 85 | install(FILES "${PLUGIN_BUNDLED_LIBRARIES}" 86 | DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 87 | COMPONENT Runtime) 88 | endif() 89 | 90 | # Copy the native assets provided by the build.dart from all packages. 91 | set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/windows/") 92 | install(DIRECTORY "${NATIVE_ASSETS_DIR}" 93 | DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 94 | COMPONENT Runtime) 95 | 96 | # Fully re-copy the assets directory on each build to avoid having stale files 97 | # from a previous install. 98 | set(FLUTTER_ASSET_DIR_NAME "flutter_assets") 99 | install(CODE " 100 | file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") 101 | " COMPONENT Runtime) 102 | install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" 103 | DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) 104 | 105 | # Install the AOT library on non-Debug builds only. 106 | install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" 107 | CONFIGURATIONS Profile;Release 108 | COMPONENT Runtime) 109 | -------------------------------------------------------------------------------- /lib/notification/notification_implementation.dart: -------------------------------------------------------------------------------- 1 | import 'package:awesome_notifications/awesome_notifications.dart'; 2 | import 'package:firebase_messaging/firebase_messaging.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:noti/notification/uuid.dart'; 5 | import '../core/router/app_router.dart'; 6 | import 'awesome_notification/awesome_notification_service.dart'; 7 | import 'firebase_messaging/firebase_initialization.dart'; 8 | import 'firebase_messaging/foreground_message.dart'; 9 | import 'firebase_messaging/setup_interact_message.dart'; 10 | import 'awesome_notification/notification_channel_service.dart'; 11 | import 'firebase_messaging/background_notification.dart'; 12 | import 'firebase_messaging/notification_device_token.dart'; 13 | import 'firebase_messaging/notification_permissions.dart'; 14 | 15 | /// A class to implement notification functionalities. 16 | class NotificationImplementation { 17 | final AwesomeChannelService awesomeChannelService; 18 | 19 | // Define channel keys 20 | final String _warningKey = 'warning'; 21 | final String _channelKey1 = 'normal'; 22 | 23 | /// Constructor to initialize [NotificationImplementation]. 24 | NotificationImplementation({ 25 | required this.awesomeChannelService, 26 | }); 27 | 28 | /// Initializes Awesome Notifications and creates notification channels. 29 | Future initialize() async { 30 | // Initialize Awesome Notifications 31 | await awesomeChannelService.initializeChannels( 32 | channels: _createNotificationChannels(), 33 | channelGroups: _createNotificationGroups()); 34 | } 35 | 36 | /// Creates notification channels for the application. 37 | List _createNotificationChannels() { 38 | return [ 39 | awesomeChannelService.createChannel( 40 | soundSource: awesomeChannelService.sound, 41 | criticalAlerts: true, 42 | channelKey: _warningKey, 43 | channelName: "Warning Notifications", 44 | channelDescription: "Notification for new orders.", 45 | ledColor: Colors.green, 46 | defaultColor: Colors.red, 47 | importance: NotificationImportance.Max, 48 | channelShowBadge: true, 49 | locked: true, 50 | defaultRingtoneType: DefaultRingtoneType.Notification, 51 | onlyAlertOnce: true, 52 | groupKey: 'warning_group', 53 | ), 54 | awesomeChannelService.createChannel( 55 | criticalAlerts: true, 56 | channelKey: _channelKey1, 57 | channelName: "Normal Notifications", 58 | channelDescription: "Notifications for normal alerts.", 59 | ledColor: Colors.green, 60 | defaultColor: Colors.green, 61 | importance: NotificationImportance.Max, 62 | channelShowBadge: true, 63 | groupKey: 'normal_group', 64 | ), 65 | ]; 66 | } 67 | 68 | /// Creates notification channel groups for the application. 69 | List _createNotificationGroups() { 70 | return [ 71 | awesomeChannelService.notificationChannelGroup( 72 | channelGroupName: _warningKey, 73 | channelGroupKey: _warningKey, 74 | ), 75 | ]; 76 | } 77 | 78 | Future fcmInitialize(BuildContext context) async { 79 | BackGroundNotification().backgroundInitializer(); 80 | FirebaseMessaging firebaseMessaging = FirebaseMessaging.instance; 81 | ForegroundMessage(firebaseMessaging).setForegroundNotificationOptions(); 82 | NotificationPermissions(firebaseMessaging).requestNotificationPermission(); 83 | NotificationDeviceToken(firebaseMessaging); 84 | FirebaseInitialization( 85 | showNotification: showNotification, context: context); 86 | SetupInteractMessage(firebaseMessaging: firebaseMessaging, context: context) 87 | .setupInteractMessage(); 88 | } 89 | } 90 | 91 | showNotification(Map data, BuildContext? context) { 92 | if (data['page'] == 'newRequestScreen' && 93 | data['android_channel_id'] == 'warning') { 94 | String channelKey = 'warning'; 95 | AwesomeNotificationService().createNotification( 96 | title: data['title'], 97 | body: data['body'], 98 | channelKey: channelKey, 99 | id: data['id'] ?? '', 100 | uid: int.parse(data['id'] ?? '2')); 101 | if (context != null) { 102 | Navigator.pushNamed(context, AppRouter.newScreen, 103 | arguments: {'first': 5, 'second': 10}); 104 | } 105 | } 106 | if (data['android_channel_id'] == 'normal') { 107 | String channelKey = 'normal'; 108 | AwesomeNotificationService().createNotification( 109 | title: data['title'], 110 | body: data['body'], 111 | channelKey: channelKey, 112 | uid: generateSSID()); 113 | } 114 | } 115 | -------------------------------------------------------------------------------- /linux/my_application.cc: -------------------------------------------------------------------------------- 1 | #include "my_application.h" 2 | 3 | #include 4 | #ifdef GDK_WINDOWING_X11 5 | #include 6 | #endif 7 | 8 | #include "flutter/generated_plugin_registrant.h" 9 | 10 | struct _MyApplication { 11 | GtkApplication parent_instance; 12 | char** dart_entrypoint_arguments; 13 | }; 14 | 15 | G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION) 16 | 17 | // Implements GApplication::activate. 18 | static void my_application_activate(GApplication* application) { 19 | MyApplication* self = MY_APPLICATION(application); 20 | GtkWindow* window = 21 | GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application))); 22 | 23 | // Use a header bar when running in GNOME as this is the common style used 24 | // by applications and is the setup most users will be using (e.g. Ubuntu 25 | // desktop). 26 | // If running on X and not using GNOME then just use a traditional title bar 27 | // in case the window manager does more exotic layout, e.g. tiling. 28 | // If running on Wayland assume the header bar will work (may need changing 29 | // if future cases occur). 30 | gboolean use_header_bar = TRUE; 31 | #ifdef GDK_WINDOWING_X11 32 | GdkScreen* screen = gtk_window_get_screen(window); 33 | if (GDK_IS_X11_SCREEN(screen)) { 34 | const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen); 35 | if (g_strcmp0(wm_name, "GNOME Shell") != 0) { 36 | use_header_bar = FALSE; 37 | } 38 | } 39 | #endif 40 | if (use_header_bar) { 41 | GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new()); 42 | gtk_widget_show(GTK_WIDGET(header_bar)); 43 | gtk_header_bar_set_title(header_bar, "noti"); 44 | gtk_header_bar_set_show_close_button(header_bar, TRUE); 45 | gtk_window_set_titlebar(window, GTK_WIDGET(header_bar)); 46 | } else { 47 | gtk_window_set_title(window, "noti"); 48 | } 49 | 50 | gtk_window_set_default_size(window, 1280, 720); 51 | gtk_widget_show(GTK_WIDGET(window)); 52 | 53 | g_autoptr(FlDartProject) project = fl_dart_project_new(); 54 | fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments); 55 | 56 | FlView* view = fl_view_new(project); 57 | gtk_widget_show(GTK_WIDGET(view)); 58 | gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view)); 59 | 60 | fl_register_plugins(FL_PLUGIN_REGISTRY(view)); 61 | 62 | gtk_widget_grab_focus(GTK_WIDGET(view)); 63 | } 64 | 65 | // Implements GApplication::local_command_line. 66 | static gboolean my_application_local_command_line(GApplication* application, gchar*** arguments, int* exit_status) { 67 | MyApplication* self = MY_APPLICATION(application); 68 | // Strip out the first argument as it is the binary name. 69 | self->dart_entrypoint_arguments = g_strdupv(*arguments + 1); 70 | 71 | g_autoptr(GError) error = nullptr; 72 | if (!g_application_register(application, nullptr, &error)) { 73 | g_warning("Failed to register: %s", error->message); 74 | *exit_status = 1; 75 | return TRUE; 76 | } 77 | 78 | g_application_activate(application); 79 | *exit_status = 0; 80 | 81 | return TRUE; 82 | } 83 | 84 | // Implements GApplication::startup. 85 | static void my_application_startup(GApplication* application) { 86 | //MyApplication* self = MY_APPLICATION(object); 87 | 88 | // Perform any actions required at application startup. 89 | 90 | G_APPLICATION_CLASS(my_application_parent_class)->startup(application); 91 | } 92 | 93 | // Implements GApplication::shutdown. 94 | static void my_application_shutdown(GApplication* application) { 95 | //MyApplication* self = MY_APPLICATION(object); 96 | 97 | // Perform any actions required at application shutdown. 98 | 99 | G_APPLICATION_CLASS(my_application_parent_class)->shutdown(application); 100 | } 101 | 102 | // Implements GObject::dispose. 103 | static void my_application_dispose(GObject* object) { 104 | MyApplication* self = MY_APPLICATION(object); 105 | g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev); 106 | G_OBJECT_CLASS(my_application_parent_class)->dispose(object); 107 | } 108 | 109 | static void my_application_class_init(MyApplicationClass* klass) { 110 | G_APPLICATION_CLASS(klass)->activate = my_application_activate; 111 | G_APPLICATION_CLASS(klass)->local_command_line = my_application_local_command_line; 112 | G_APPLICATION_CLASS(klass)->startup = my_application_startup; 113 | G_APPLICATION_CLASS(klass)->shutdown = my_application_shutdown; 114 | G_OBJECT_CLASS(klass)->dispose = my_application_dispose; 115 | } 116 | 117 | static void my_application_init(MyApplication* self) {} 118 | 119 | MyApplication* my_application_new() { 120 | return MY_APPLICATION(g_object_new(my_application_get_type(), 121 | "application-id", APPLICATION_ID, 122 | "flags", G_APPLICATION_NON_UNIQUE, 123 | nullptr)); 124 | } 125 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # FireNoti 2 | 3 | FireNoti is a Flutter-based mobile application that leverages Firebase Cloud Messaging (FCM) for sending and managing push notifications. This project aims to provide a seamless notification experience by integrating Firebase FCM, enabling real-time alerts and updates for users. 4 | 5 | ## Features 6 | 7 | - **Firebase FCM Integration**: Uses Firebase Cloud Messaging for sending push notifications. 8 | - **Real-Time Notifications**: Receive instant alerts and updates directly on your mobile device. 9 | - **Customizable Alerts**: Allows easy customization of notification content and appearance. 10 | - **Efficient Message Delivery**: Ensures reliable and timely notification delivery. 11 | - **User Engagement**: Boosts user engagement with interactive notifications. 12 | 13 | # Fire-Noti Project Contribution Acknowledgement 14 | 15 |

16 | Imran's Avatar 17 |

18 | 19 | We would like to acknowledge the valuable contributions made by **Imran** to the Fire-Noti project. 20 | 21 | ## Updates by Imran 22 | 23 | - **iOS Project Configuration and Assets** 24 | - Added CocoaPods support by creating a `Podfile` and including necessary configurations in `Debug.xcconfig` and `Release.xcconfig`. 25 | - Updated `Runner.xcodeproj` to include Pods frameworks and configurations. 26 | - Added new app icon images to `Assets.xcassets` and updated `Contents.json` for proper asset management. 27 | - Modified `Info.plist` to include user tracking usage description and background modes for notifications. 28 | - Refactored `NotificationCalendar` class to allow mutable properties: year, month, day, hour, minute, second, and millisecond. 29 | 30 | Thank you, Imran, for your dedication and excellent work on improving the Fire-Noti project! 31 | 32 | 33 | ## Getting Started 34 | 35 | ### Prerequisites 36 | 37 | Before you begin, ensure you have met the following requirements: 38 | - [firebase_core](https://pub.dev/packages/firebase_core): For integrating Firebase with the Flutter app. 39 | - [firebase_messaging](https://pub.dev/packages/firebase_messaging): For Firebase Cloud Messaging (FCM) support. 40 | - [awesome_notifications](https://pub.dev/packages/awesome_notifications): For displaying customizable local and push notifications. 41 | 42 | Add these dependencies to your `pubspec.yaml` file: 43 | 44 | ```yaml 45 | dependencies: 46 | flutter: 47 | sdk: flutter 48 | firebase_core: ^3.6.0 49 | firebase_messaging: ^15.1.3 50 | awesome_notifications: ^0.10.0 51 | ``` 52 | ### Installation 53 | 54 | 1. **Clone the repository:** 55 | ```bash 56 | git clone https://github.com/Puneetsharma5525/Fire-Noti.git 57 | cd FireNoti 58 | ### Android Output 59 | Main Screen 60 |

This is the main screen of the Flutter application, showcasing the primary user interface.

61 | 62 | Simple Notification 63 |

Example of a simple notification that alerts the user to a new message or event.

64 | 65 | Sound Notification 66 |

Demonstration of a notification with sound, enhancing user engagement through audio cues.

67 | 68 | Big Image Notification 69 |

An example of a big image notification.

70 | 71 | Button Notification 72 |

Illustration of a notification featuring action buttons, allowing users to respond directly from the notification.

73 | 74 | Reply Notification 75 |

This shows a reply notification, enabling users to quickly respond to messages without opening the app.

76 | 77 | Chat Message Notification 78 |

Example of a chat message notification, indicating new messages from contacts.

79 | 80 | Music Notification 81 |

Music notification showing playback controls and information about the currently playing track.

82 | 83 | Big Text Notification 84 |

A big text notification that provides detailed information and context to the user.

85 | 86 | ### Simulator Output 87 | 88 | ### 1. Home Screen with App Icon and Badge 89 | Home Screen with App Icon and Badge 90 | The main home screen of the app displays the **FireNoti** app icon, app name, and notification badge on iOS. 91 | 92 | --- 93 | 94 | ### 2. Notification with Image 95 | Notification with Image 96 | This shows a Flutter alert notification featuring an image alongside the notification message on iOS. 97 | 98 | --- 99 | 100 | ### 3. Notification with Logo and Image 101 | Notification with Logo and Image 102 | Here, the notification displays both a logo and a large image, providing a rich notification experience on iOS. 103 | 104 | --- 105 | 106 | ### 4. Home Screen with Various Notification Types 107 | Various Notifications Demo 108 | The app's home screen demonstrates different notification types available on iOS, including: 109 | - Simple Notification 110 | - Sound Notification 111 | - Big Image Notification 112 | - Button Notification 113 | - Reply Message Notification 114 | - Scheduled Notification 115 | - Music Notification 116 | - Big Text Notification 117 | 118 | -------------------------------------------------------------------------------- /linux/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Project-level configuration. 2 | cmake_minimum_required(VERSION 3.10) 3 | project(runner LANGUAGES CXX) 4 | 5 | # The name of the executable created for the application. Change this to change 6 | # the on-disk name of your application. 7 | set(BINARY_NAME "noti") 8 | # The unique GTK application identifier for this application. See: 9 | # https://wiki.gnome.org/HowDoI/ChooseApplicationID 10 | set(APPLICATION_ID "com.fire.noti") 11 | 12 | # Explicitly opt in to modern CMake behaviors to avoid warnings with recent 13 | # versions of CMake. 14 | cmake_policy(SET CMP0063 NEW) 15 | 16 | # Load bundled libraries from the lib/ directory relative to the binary. 17 | set(CMAKE_INSTALL_RPATH "$ORIGIN/lib") 18 | 19 | # Root filesystem for cross-building. 20 | if(FLUTTER_TARGET_PLATFORM_SYSROOT) 21 | set(CMAKE_SYSROOT ${FLUTTER_TARGET_PLATFORM_SYSROOT}) 22 | set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT}) 23 | set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 24 | set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) 25 | set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 26 | set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 27 | endif() 28 | 29 | # Define build configuration options. 30 | if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) 31 | set(CMAKE_BUILD_TYPE "Debug" CACHE 32 | STRING "Flutter build mode" FORCE) 33 | set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS 34 | "Debug" "Profile" "Release") 35 | endif() 36 | 37 | # Compilation settings that should be applied to most targets. 38 | # 39 | # Be cautious about adding new options here, as plugins use this function by 40 | # default. In most cases, you should add new options to specific targets instead 41 | # of modifying this function. 42 | function(APPLY_STANDARD_SETTINGS TARGET) 43 | target_compile_features(${TARGET} PUBLIC cxx_std_14) 44 | target_compile_options(${TARGET} PRIVATE -Wall -Werror) 45 | target_compile_options(${TARGET} PRIVATE "$<$>:-O3>") 46 | target_compile_definitions(${TARGET} PRIVATE "$<$>:NDEBUG>") 47 | endfunction() 48 | 49 | # Flutter library and tool build rules. 50 | set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") 51 | add_subdirectory(${FLUTTER_MANAGED_DIR}) 52 | 53 | # System-level dependencies. 54 | find_package(PkgConfig REQUIRED) 55 | pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) 56 | 57 | add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}") 58 | 59 | # Define the application target. To change its name, change BINARY_NAME above, 60 | # not the value here, or `flutter run` will no longer work. 61 | # 62 | # Any new source files that you add to the application should be added here. 63 | add_executable(${BINARY_NAME} 64 | "main.cc" 65 | "my_application.cc" 66 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" 67 | ) 68 | 69 | # Apply the standard set of build settings. This can be removed for applications 70 | # that need different build settings. 71 | apply_standard_settings(${BINARY_NAME}) 72 | 73 | # Add dependency libraries. Add any application-specific dependencies here. 74 | target_link_libraries(${BINARY_NAME} PRIVATE flutter) 75 | target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK) 76 | 77 | # Run the Flutter tool portions of the build. This must not be removed. 78 | add_dependencies(${BINARY_NAME} flutter_assemble) 79 | 80 | # Only the install-generated bundle's copy of the executable will launch 81 | # correctly, since the resources must in the right relative locations. To avoid 82 | # people trying to run the unbundled copy, put it in a subdirectory instead of 83 | # the default top-level location. 84 | set_target_properties(${BINARY_NAME} 85 | PROPERTIES 86 | RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/intermediates_do_not_run" 87 | ) 88 | 89 | 90 | # Generated plugin build rules, which manage building the plugins and adding 91 | # them to the application. 92 | include(flutter/generated_plugins.cmake) 93 | 94 | 95 | # === Installation === 96 | # By default, "installing" just makes a relocatable bundle in the build 97 | # directory. 98 | set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle") 99 | if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) 100 | set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) 101 | endif() 102 | 103 | # Start with a clean build bundle directory every time. 104 | install(CODE " 105 | file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\") 106 | " COMPONENT Runtime) 107 | 108 | set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") 109 | set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib") 110 | 111 | install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" 112 | COMPONENT Runtime) 113 | 114 | install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" 115 | COMPONENT Runtime) 116 | 117 | install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 118 | COMPONENT Runtime) 119 | 120 | foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES}) 121 | install(FILES "${bundled_library}" 122 | DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 123 | COMPONENT Runtime) 124 | endforeach(bundled_library) 125 | 126 | # Copy the native assets provided by the build.dart from all packages. 127 | set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/linux/") 128 | install(DIRECTORY "${NATIVE_ASSETS_DIR}" 129 | DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 130 | COMPONENT Runtime) 131 | 132 | # Fully re-copy the assets directory on each build to avoid having stale files 133 | # from a previous install. 134 | set(FLUTTER_ASSET_DIR_NAME "flutter_assets") 135 | install(CODE " 136 | file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") 137 | " COMPONENT Runtime) 138 | install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" 139 | DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) 140 | 141 | # Install the AOT library on non-Debug builds only. 142 | if(NOT CMAKE_BUILD_TYPE MATCHES "Debug") 143 | install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 144 | COMPONENT Runtime) 145 | endif() 146 | -------------------------------------------------------------------------------- /windows/runner/win32_window.cpp: -------------------------------------------------------------------------------- 1 | #include "win32_window.h" 2 | 3 | #include 4 | #include 5 | 6 | #include "resource.h" 7 | 8 | namespace { 9 | 10 | /// Window attribute that enables dark mode window decorations. 11 | /// 12 | /// Redefined in case the developer's machine has a Windows SDK older than 13 | /// version 10.0.22000.0. 14 | /// See: https://docs.microsoft.com/windows/win32/api/dwmapi/ne-dwmapi-dwmwindowattribute 15 | #ifndef DWMWA_USE_IMMERSIVE_DARK_MODE 16 | #define DWMWA_USE_IMMERSIVE_DARK_MODE 20 17 | #endif 18 | 19 | constexpr const wchar_t kWindowClassName[] = L"FLUTTER_RUNNER_WIN32_WINDOW"; 20 | 21 | /// Registry key for app theme preference. 22 | /// 23 | /// A value of 0 indicates apps should use dark mode. A non-zero or missing 24 | /// value indicates apps should use light mode. 25 | constexpr const wchar_t kGetPreferredBrightnessRegKey[] = 26 | L"Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize"; 27 | constexpr const wchar_t kGetPreferredBrightnessRegValue[] = L"AppsUseLightTheme"; 28 | 29 | // The number of Win32Window objects that currently exist. 30 | static int g_active_window_count = 0; 31 | 32 | using EnableNonClientDpiScaling = BOOL __stdcall(HWND hwnd); 33 | 34 | // Scale helper to convert logical scaler values to physical using passed in 35 | // scale factor 36 | int Scale(int source, double scale_factor) { 37 | return static_cast(source * scale_factor); 38 | } 39 | 40 | // Dynamically loads the |EnableNonClientDpiScaling| from the User32 module. 41 | // This API is only needed for PerMonitor V1 awareness mode. 42 | void EnableFullDpiSupportIfAvailable(HWND hwnd) { 43 | HMODULE user32_module = LoadLibraryA("User32.dll"); 44 | if (!user32_module) { 45 | return; 46 | } 47 | auto enable_non_client_dpi_scaling = 48 | reinterpret_cast( 49 | GetProcAddress(user32_module, "EnableNonClientDpiScaling")); 50 | if (enable_non_client_dpi_scaling != nullptr) { 51 | enable_non_client_dpi_scaling(hwnd); 52 | } 53 | FreeLibrary(user32_module); 54 | } 55 | 56 | } // namespace 57 | 58 | // Manages the Win32Window's window class registration. 59 | class WindowClassRegistrar { 60 | public: 61 | ~WindowClassRegistrar() = default; 62 | 63 | // Returns the singleton registrar instance. 64 | static WindowClassRegistrar* GetInstance() { 65 | if (!instance_) { 66 | instance_ = new WindowClassRegistrar(); 67 | } 68 | return instance_; 69 | } 70 | 71 | // Returns the name of the window class, registering the class if it hasn't 72 | // previously been registered. 73 | const wchar_t* GetWindowClass(); 74 | 75 | // Unregisters the window class. Should only be called if there are no 76 | // instances of the window. 77 | void UnregisterWindowClass(); 78 | 79 | private: 80 | WindowClassRegistrar() = default; 81 | 82 | static WindowClassRegistrar* instance_; 83 | 84 | bool class_registered_ = false; 85 | }; 86 | 87 | WindowClassRegistrar* WindowClassRegistrar::instance_ = nullptr; 88 | 89 | const wchar_t* WindowClassRegistrar::GetWindowClass() { 90 | if (!class_registered_) { 91 | WNDCLASS window_class{}; 92 | window_class.hCursor = LoadCursor(nullptr, IDC_ARROW); 93 | window_class.lpszClassName = kWindowClassName; 94 | window_class.style = CS_HREDRAW | CS_VREDRAW; 95 | window_class.cbClsExtra = 0; 96 | window_class.cbWndExtra = 0; 97 | window_class.hInstance = GetModuleHandle(nullptr); 98 | window_class.hIcon = 99 | LoadIcon(window_class.hInstance, MAKEINTRESOURCE(IDI_APP_ICON)); 100 | window_class.hbrBackground = 0; 101 | window_class.lpszMenuName = nullptr; 102 | window_class.lpfnWndProc = Win32Window::WndProc; 103 | RegisterClass(&window_class); 104 | class_registered_ = true; 105 | } 106 | return kWindowClassName; 107 | } 108 | 109 | void WindowClassRegistrar::UnregisterWindowClass() { 110 | UnregisterClass(kWindowClassName, nullptr); 111 | class_registered_ = false; 112 | } 113 | 114 | Win32Window::Win32Window() { 115 | ++g_active_window_count; 116 | } 117 | 118 | Win32Window::~Win32Window() { 119 | --g_active_window_count; 120 | Destroy(); 121 | } 122 | 123 | bool Win32Window::Create(const std::wstring& title, 124 | const Point& origin, 125 | const Size& size) { 126 | Destroy(); 127 | 128 | const wchar_t* window_class = 129 | WindowClassRegistrar::GetInstance()->GetWindowClass(); 130 | 131 | const POINT target_point = {static_cast(origin.x), 132 | static_cast(origin.y)}; 133 | HMONITOR monitor = MonitorFromPoint(target_point, MONITOR_DEFAULTTONEAREST); 134 | UINT dpi = FlutterDesktopGetDpiForMonitor(monitor); 135 | double scale_factor = dpi / 96.0; 136 | 137 | HWND window = CreateWindow( 138 | window_class, title.c_str(), WS_OVERLAPPEDWINDOW, 139 | Scale(origin.x, scale_factor), Scale(origin.y, scale_factor), 140 | Scale(size.width, scale_factor), Scale(size.height, scale_factor), 141 | nullptr, nullptr, GetModuleHandle(nullptr), this); 142 | 143 | if (!window) { 144 | return false; 145 | } 146 | 147 | UpdateTheme(window); 148 | 149 | return OnCreate(); 150 | } 151 | 152 | bool Win32Window::Show() { 153 | return ShowWindow(window_handle_, SW_SHOWNORMAL); 154 | } 155 | 156 | // static 157 | LRESULT CALLBACK Win32Window::WndProc(HWND const window, 158 | UINT const message, 159 | WPARAM const wparam, 160 | LPARAM const lparam) noexcept { 161 | if (message == WM_NCCREATE) { 162 | auto window_struct = reinterpret_cast(lparam); 163 | SetWindowLongPtr(window, GWLP_USERDATA, 164 | reinterpret_cast(window_struct->lpCreateParams)); 165 | 166 | auto that = static_cast(window_struct->lpCreateParams); 167 | EnableFullDpiSupportIfAvailable(window); 168 | that->window_handle_ = window; 169 | } else if (Win32Window* that = GetThisFromHandle(window)) { 170 | return that->MessageHandler(window, message, wparam, lparam); 171 | } 172 | 173 | return DefWindowProc(window, message, wparam, lparam); 174 | } 175 | 176 | LRESULT 177 | Win32Window::MessageHandler(HWND hwnd, 178 | UINT const message, 179 | WPARAM const wparam, 180 | LPARAM const lparam) noexcept { 181 | switch (message) { 182 | case WM_DESTROY: 183 | window_handle_ = nullptr; 184 | Destroy(); 185 | if (quit_on_close_) { 186 | PostQuitMessage(0); 187 | } 188 | return 0; 189 | 190 | case WM_DPICHANGED: { 191 | auto newRectSize = reinterpret_cast(lparam); 192 | LONG newWidth = newRectSize->right - newRectSize->left; 193 | LONG newHeight = newRectSize->bottom - newRectSize->top; 194 | 195 | SetWindowPos(hwnd, nullptr, newRectSize->left, newRectSize->top, newWidth, 196 | newHeight, SWP_NOZORDER | SWP_NOACTIVATE); 197 | 198 | return 0; 199 | } 200 | case WM_SIZE: { 201 | RECT rect = GetClientArea(); 202 | if (child_content_ != nullptr) { 203 | // Size and position the child window. 204 | MoveWindow(child_content_, rect.left, rect.top, rect.right - rect.left, 205 | rect.bottom - rect.top, TRUE); 206 | } 207 | return 0; 208 | } 209 | 210 | case WM_ACTIVATE: 211 | if (child_content_ != nullptr) { 212 | SetFocus(child_content_); 213 | } 214 | return 0; 215 | 216 | case WM_DWMCOLORIZATIONCOLORCHANGED: 217 | UpdateTheme(hwnd); 218 | return 0; 219 | } 220 | 221 | return DefWindowProc(window_handle_, message, wparam, lparam); 222 | } 223 | 224 | void Win32Window::Destroy() { 225 | OnDestroy(); 226 | 227 | if (window_handle_) { 228 | DestroyWindow(window_handle_); 229 | window_handle_ = nullptr; 230 | } 231 | if (g_active_window_count == 0) { 232 | WindowClassRegistrar::GetInstance()->UnregisterWindowClass(); 233 | } 234 | } 235 | 236 | Win32Window* Win32Window::GetThisFromHandle(HWND const window) noexcept { 237 | return reinterpret_cast( 238 | GetWindowLongPtr(window, GWLP_USERDATA)); 239 | } 240 | 241 | void Win32Window::SetChildContent(HWND content) { 242 | child_content_ = content; 243 | SetParent(content, window_handle_); 244 | RECT frame = GetClientArea(); 245 | 246 | MoveWindow(content, frame.left, frame.top, frame.right - frame.left, 247 | frame.bottom - frame.top, true); 248 | 249 | SetFocus(child_content_); 250 | } 251 | 252 | RECT Win32Window::GetClientArea() { 253 | RECT frame; 254 | GetClientRect(window_handle_, &frame); 255 | return frame; 256 | } 257 | 258 | HWND Win32Window::GetHandle() { 259 | return window_handle_; 260 | } 261 | 262 | void Win32Window::SetQuitOnClose(bool quit_on_close) { 263 | quit_on_close_ = quit_on_close; 264 | } 265 | 266 | bool Win32Window::OnCreate() { 267 | // No-op; provided for subclasses. 268 | return true; 269 | } 270 | 271 | void Win32Window::OnDestroy() { 272 | // No-op; provided for subclasses. 273 | } 274 | 275 | void Win32Window::UpdateTheme(HWND const window) { 276 | DWORD light_mode; 277 | DWORD light_mode_size = sizeof(light_mode); 278 | LSTATUS result = RegGetValue(HKEY_CURRENT_USER, kGetPreferredBrightnessRegKey, 279 | kGetPreferredBrightnessRegValue, 280 | RRF_RT_REG_DWORD, nullptr, &light_mode, 281 | &light_mode_size); 282 | 283 | if (result == ERROR_SUCCESS) { 284 | BOOL enable_dark_mode = light_mode == 0; 285 | DwmSetWindowAttribute(window, DWMWA_USE_IMMERSIVE_DARK_MODE, 286 | &enable_dark_mode, sizeof(enable_dark_mode)); 287 | } 288 | } 289 | -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | _flutterfire_internals: 5 | dependency: transitive 6 | description: 7 | name: _flutterfire_internals 8 | sha256: "5534e701a2c505fed1f0799e652dd6ae23bd4d2c4cf797220e5ced5764a7c1c2" 9 | url: "https://pub.dev" 10 | source: hosted 11 | version: "1.3.44" 12 | async: 13 | dependency: transitive 14 | description: 15 | name: async 16 | sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" 17 | url: "https://pub.dev" 18 | source: hosted 19 | version: "2.11.0" 20 | awesome_notifications: 21 | dependency: "direct main" 22 | description: 23 | name: awesome_notifications 24 | sha256: d051ffb694a53da216ff13d02c8ec645d75320048262f7e6b3c1d95a4f54c902 25 | url: "https://pub.dev" 26 | source: hosted 27 | version: "0.10.0" 28 | boolean_selector: 29 | dependency: transitive 30 | description: 31 | name: boolean_selector 32 | sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" 33 | url: "https://pub.dev" 34 | source: hosted 35 | version: "2.1.1" 36 | characters: 37 | dependency: transitive 38 | description: 39 | name: characters 40 | sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" 41 | url: "https://pub.dev" 42 | source: hosted 43 | version: "1.3.0" 44 | clock: 45 | dependency: transitive 46 | description: 47 | name: clock 48 | sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf 49 | url: "https://pub.dev" 50 | source: hosted 51 | version: "1.1.1" 52 | collection: 53 | dependency: transitive 54 | description: 55 | name: collection 56 | sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a 57 | url: "https://pub.dev" 58 | source: hosted 59 | version: "1.18.0" 60 | fake_async: 61 | dependency: transitive 62 | description: 63 | name: fake_async 64 | sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" 65 | url: "https://pub.dev" 66 | source: hosted 67 | version: "1.3.1" 68 | firebase_core: 69 | dependency: "direct main" 70 | description: 71 | name: firebase_core 72 | sha256: "51dfe2fbf3a984787a2e7b8592f2f05c986bfedd6fdacea3f9e0a7beb334de96" 73 | url: "https://pub.dev" 74 | source: hosted 75 | version: "3.6.0" 76 | firebase_core_platform_interface: 77 | dependency: transitive 78 | description: 79 | name: firebase_core_platform_interface 80 | sha256: e30da58198a6d4b49d5bce4e852f985c32cb10db329ebef9473db2b9f09ce810 81 | url: "https://pub.dev" 82 | source: hosted 83 | version: "5.3.0" 84 | firebase_core_web: 85 | dependency: transitive 86 | description: 87 | name: firebase_core_web 88 | sha256: f967a7138f5d2ffb1ce15950e2a382924239eaa521150a8f144af34e68b3b3e5 89 | url: "https://pub.dev" 90 | source: hosted 91 | version: "2.18.1" 92 | firebase_messaging: 93 | dependency: "direct main" 94 | description: 95 | name: firebase_messaging 96 | sha256: eb6e28a3a35deda61fe8634967c84215efc19133ba58d8e0fc6c9a2af2cba05e 97 | url: "https://pub.dev" 98 | source: hosted 99 | version: "15.1.3" 100 | firebase_messaging_platform_interface: 101 | dependency: transitive 102 | description: 103 | name: firebase_messaging_platform_interface 104 | sha256: b316c4ee10d93d32c033644207afc282d9b2b4372f3cf9c6022f3558b3873d2d 105 | url: "https://pub.dev" 106 | source: hosted 107 | version: "4.5.46" 108 | firebase_messaging_web: 109 | dependency: transitive 110 | description: 111 | name: firebase_messaging_web 112 | sha256: d7f0147a1a9fe4313168e20154a01fd5cf332898de1527d3930ff77b8c7f5387 113 | url: "https://pub.dev" 114 | source: hosted 115 | version: "3.9.2" 116 | flutter: 117 | dependency: "direct main" 118 | description: flutter 119 | source: sdk 120 | version: "0.0.0" 121 | flutter_lints: 122 | dependency: "direct dev" 123 | description: 124 | name: flutter_lints 125 | sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c" 126 | url: "https://pub.dev" 127 | source: hosted 128 | version: "4.0.0" 129 | flutter_test: 130 | dependency: "direct dev" 131 | description: flutter 132 | source: sdk 133 | version: "0.0.0" 134 | flutter_web_plugins: 135 | dependency: transitive 136 | description: flutter 137 | source: sdk 138 | version: "0.0.0" 139 | intl: 140 | dependency: transitive 141 | description: 142 | name: intl 143 | sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf 144 | url: "https://pub.dev" 145 | source: hosted 146 | version: "0.19.0" 147 | leak_tracker: 148 | dependency: transitive 149 | description: 150 | name: leak_tracker 151 | sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" 152 | url: "https://pub.dev" 153 | source: hosted 154 | version: "10.0.5" 155 | leak_tracker_flutter_testing: 156 | dependency: transitive 157 | description: 158 | name: leak_tracker_flutter_testing 159 | sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" 160 | url: "https://pub.dev" 161 | source: hosted 162 | version: "3.0.5" 163 | leak_tracker_testing: 164 | dependency: transitive 165 | description: 166 | name: leak_tracker_testing 167 | sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" 168 | url: "https://pub.dev" 169 | source: hosted 170 | version: "3.0.1" 171 | lints: 172 | dependency: transitive 173 | description: 174 | name: lints 175 | sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235" 176 | url: "https://pub.dev" 177 | source: hosted 178 | version: "4.0.0" 179 | matcher: 180 | dependency: transitive 181 | description: 182 | name: matcher 183 | sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb 184 | url: "https://pub.dev" 185 | source: hosted 186 | version: "0.12.16+1" 187 | material_color_utilities: 188 | dependency: transitive 189 | description: 190 | name: material_color_utilities 191 | sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec 192 | url: "https://pub.dev" 193 | source: hosted 194 | version: "0.11.1" 195 | meta: 196 | dependency: transitive 197 | description: 198 | name: meta 199 | sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 200 | url: "https://pub.dev" 201 | source: hosted 202 | version: "1.15.0" 203 | path: 204 | dependency: transitive 205 | description: 206 | name: path 207 | sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" 208 | url: "https://pub.dev" 209 | source: hosted 210 | version: "1.9.0" 211 | plugin_platform_interface: 212 | dependency: transitive 213 | description: 214 | name: plugin_platform_interface 215 | sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" 216 | url: "https://pub.dev" 217 | source: hosted 218 | version: "2.1.8" 219 | sky_engine: 220 | dependency: transitive 221 | description: flutter 222 | source: sdk 223 | version: "0.0.99" 224 | source_span: 225 | dependency: transitive 226 | description: 227 | name: source_span 228 | sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" 229 | url: "https://pub.dev" 230 | source: hosted 231 | version: "1.10.0" 232 | stack_trace: 233 | dependency: transitive 234 | description: 235 | name: stack_trace 236 | sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" 237 | url: "https://pub.dev" 238 | source: hosted 239 | version: "1.11.1" 240 | stream_channel: 241 | dependency: transitive 242 | description: 243 | name: stream_channel 244 | sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 245 | url: "https://pub.dev" 246 | source: hosted 247 | version: "2.1.2" 248 | string_scanner: 249 | dependency: transitive 250 | description: 251 | name: string_scanner 252 | sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" 253 | url: "https://pub.dev" 254 | source: hosted 255 | version: "1.2.0" 256 | term_glyph: 257 | dependency: transitive 258 | description: 259 | name: term_glyph 260 | sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 261 | url: "https://pub.dev" 262 | source: hosted 263 | version: "1.2.1" 264 | test_api: 265 | dependency: transitive 266 | description: 267 | name: test_api 268 | sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" 269 | url: "https://pub.dev" 270 | source: hosted 271 | version: "0.7.2" 272 | vector_math: 273 | dependency: transitive 274 | description: 275 | name: vector_math 276 | sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" 277 | url: "https://pub.dev" 278 | source: hosted 279 | version: "2.1.4" 280 | vm_service: 281 | dependency: transitive 282 | description: 283 | name: vm_service 284 | sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" 285 | url: "https://pub.dev" 286 | source: hosted 287 | version: "14.2.5" 288 | web: 289 | dependency: transitive 290 | description: 291 | name: web 292 | sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb 293 | url: "https://pub.dev" 294 | source: hosted 295 | version: "1.1.0" 296 | sdks: 297 | dart: ">=3.5.3 <4.0.0" 298 | flutter: ">=3.22.0" 299 | -------------------------------------------------------------------------------- /lib/notification/awesome_notification/awesome_notification_service.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'package:awesome_notifications/awesome_notifications.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:noti/presentation/main_screen.dart'; 5 | import '../../../main.dart'; 6 | import '../../core/router/app_router.dart'; 7 | import '../model/button_model.dart'; 8 | 9 | // Private constants and fields 10 | const String _buttonKey1 = 'newPage'; 11 | const String _buttonKey2 = 'reply'; 12 | const String _buttonKey3 = 'toast'; 13 | 14 | /// Handles actions when a notification button is pressed. 15 | @pragma('vm:entry-point') 16 | Future _onActionReceivedMethod(ReceivedAction event) async { 17 | BuildContext? context = MyApp.navigatorObserver.navigator?.context; 18 | if (event.buttonKeyPressed == _buttonKey1) { 19 | _navigateToNewRequestScreen(); 20 | } else if (event.buttonKeyPressed == _buttonKey2 && context != null) { 21 | showMessage( 22 | msg: '''Your Reply is :- ${event.buttonKeyInput} ''', context: context); 23 | } else if (context != null && event.buttonKeyPressed == _buttonKey3) { 24 | showMessage( 25 | msg: 26 | '''Why do programmers prefer dark mode?\nBecause light attracts bugs! 🐛💻 ''', 27 | context: context); 28 | } 29 | } 30 | 31 | /// Service for handling notifications using Awesome Notifications package. 32 | class AwesomeNotificationService { 33 | final List? buttonList; 34 | AwesomeNotificationService({this.buttonList}); 35 | 36 | /// Creates a notification with optional action buttons and a big picture. 37 | /// 38 | /// [id] - The ID for the notification (default is an empty string). 39 | /// [uid] - The unique ID of the notification. 40 | /// [title] - The title of the notification. 41 | /// [body] - The body content of the notification. 42 | /// [bigPicture] - The URL or asset path of the big picture (optional). 43 | /// [timeoutAfter] - Duration after which the notification should be dismissed (optional). 44 | /// [payload] - Custom payload data (optional). 45 | /// [buttonList] - List of action buttons for the notification (optional). 46 | /// [wakeUpScreen] - If true, wakes up the screen when the notification is received. 47 | /// [notificationLayout] - The layout of the notification. 48 | /// [channelKey] - The channel key for categorizing the notification. 49 | Future createNotification({ 50 | String? id, 51 | int? uid, 52 | String? title, 53 | bool locked = false, 54 | String? body, 55 | String? bigPicture, 56 | String? customSound, 57 | String? largeIcon, 58 | bool repeats = false, 59 | DateTime? scheduledTime, 60 | bool preciseAlarm = false, 61 | Duration? timeoutAfter, 62 | Map? payload, 63 | bool wakeUpScreen = false, 64 | bool allowWhileIdle = false, 65 | NotificationLayout notificationLayout = NotificationLayout.Default, 66 | required String channelKey, 67 | }) async { 68 | NotificationSchedule? schedule; 69 | if (scheduledTime != null) { 70 | String localTimeZone = 71 | await AwesomeNotifications().getLocalTimeZoneIdentifier(); 72 | 73 | // Create the notification calendar instance 74 | schedule = NotificationCalendar( 75 | timeZone: localTimeZone, 76 | year: scheduledTime.year, 77 | month: scheduledTime.month, 78 | day: scheduledTime.day, 79 | hour: scheduledTime.hour, 80 | minute: scheduledTime.minute, 81 | second: scheduledTime.second, 82 | millisecond: scheduledTime.millisecond, 83 | allowWhileIdle: allowWhileIdle, 84 | repeats: repeats, 85 | preciseAlarm: preciseAlarm, 86 | ); 87 | } 88 | // Start listening for notification events 89 | _startListeningNotificationEvents(); 90 | 91 | // Build action buttons from the buttonList 92 | List? actionButtons = 93 | _buildActionButtons(buttonList: buttonList); 94 | 95 | // Create the notification 96 | await AwesomeNotifications().createNotification( 97 | content: NotificationContent( 98 | id: uid ?? 0, 99 | channelKey: channelKey, 100 | title: title, 101 | body: body, 102 | wakeUpScreen: wakeUpScreen, 103 | bigPicture: bigPicture, 104 | largeIcon: largeIcon, 105 | payload: payload, 106 | locked: locked, 107 | timeoutAfter: timeoutAfter, 108 | customSound: customSound, 109 | notificationLayout: bigPicture != null 110 | ? NotificationLayout.BigPicture 111 | : notificationLayout, 112 | ), 113 | schedule: schedule, 114 | actionButtons: actionButtons, 115 | ); 116 | } 117 | 118 | /// Creates a basic notification without action buttons. 119 | /// 120 | /// [uid] - The unique ID of the notification. 121 | /// [title] - The title of the notification. 122 | /// [body] - The body content of the notification. 123 | /// [channelKey] - The channel key for categorizing the notification. 124 | Future createNormalNotification({ 125 | int? uid, 126 | String? title, 127 | String? body, 128 | required String channelKey, 129 | }) async { 130 | _startListeningNotificationEvents(); 131 | await AwesomeNotifications().createNotification( 132 | content: NotificationContent( 133 | id: uid ?? 0, 134 | channelKey: channelKey, 135 | title: title, 136 | body: body, 137 | ), 138 | ); 139 | } 140 | 141 | /// Schedules a notification to be triggered at a specified time. 142 | /// 143 | /// [uid] - The unique ID of the notification. 144 | /// [title] - The title of the notification. 145 | /// [body] - The body content of the notification. 146 | /// [channelKey] - The channel key for categorizing the notification. 147 | /// [scheduleTime] - The time when the notification should be shown. 148 | Future createScheduledNotification({ 149 | int? uid, 150 | String? title, 151 | String? body, 152 | required String channelKey, 153 | required DateTime scheduleTime, 154 | }) async { 155 | _startListeningNotificationEvents(); 156 | await AwesomeNotifications().createNotification( 157 | content: NotificationContent( 158 | id: uid ?? 0, 159 | channelKey: channelKey, 160 | title: title, 161 | body: body, 162 | ), 163 | schedule: NotificationCalendar.fromDate(date: scheduleTime), 164 | ); 165 | } 166 | 167 | /// Updates the content of an existing notification. 168 | /// 169 | /// [notificationId] - The ID of the notification to be updated. 170 | /// [title] - The new title of the notification. 171 | /// [body] - The new body content of the notification. 172 | /// [bigPicture] - The new big picture URL or asset path (optional). 173 | /// [channelKey] - The channel key for categorizing the notification. 174 | Future updateNotification({ 175 | required int notificationId, 176 | String? title, 177 | String? body, 178 | String? bigPicture, 179 | required String channelKey, 180 | }) async { 181 | await AwesomeNotifications().createNotification( 182 | content: NotificationContent( 183 | id: notificationId, 184 | channelKey: channelKey, 185 | title: title, 186 | body: body, 187 | bigPicture: bigPicture, 188 | notificationLayout: bigPicture != null 189 | ? NotificationLayout.BigPicture 190 | : NotificationLayout.Default, 191 | ), 192 | ); 193 | } 194 | 195 | /// Cancels a notification by its ID. 196 | /// 197 | /// [notificationId] - The ID of the notification to cancel. 198 | Future cancelNotification(int notificationId) async { 199 | await AwesomeNotifications().cancel(notificationId); 200 | } 201 | 202 | /// Cancels all notifications. 203 | Future cancelAllNotifications() async { 204 | return await AwesomeNotifications().cancelAll(); 205 | } 206 | 207 | /// Resets the global notification badge count. 208 | Future resetBadge() async { 209 | await AwesomeNotifications().resetGlobalBadge(); 210 | } 211 | 212 | /// Checks if notifications are allowed and requests permission if not. 213 | Future checkNotificationPermission() async { 214 | bool isAllowed = await AwesomeNotifications().isNotificationAllowed(); 215 | if (!isAllowed) { 216 | await requestNotificationPermission(); 217 | } 218 | } 219 | 220 | /// Requests notification permission from the user. 221 | Future requestNotificationPermission() async { 222 | await AwesomeNotifications().requestPermissionToSendNotifications(); 223 | } 224 | 225 | /// Starts listening for notification action events. 226 | Future _startListeningNotificationEvents() { 227 | return AwesomeNotifications().setListeners( 228 | onActionReceivedMethod: _onActionReceivedMethod, 229 | ); 230 | } 231 | 232 | /// Builds action buttons for notifications if required. 233 | /// 234 | /// [buttonModel] - A list of ButtonModel instances to create the action buttons. 235 | List? _buildActionButtons( 236 | {List? buttonList}) { 237 | if (buttonList?.isNotEmpty == true) { 238 | return buttonList?.map((element) { 239 | return NotificationActionButton( 240 | key: element.key, 241 | label: element.label, 242 | color: element.color, 243 | icon: element.icon, 244 | actionType: element.actionType, 245 | autoDismissible: element.autoDismissible, 246 | enabled: element.enabled, 247 | requireInputText: element.requireInputText, 248 | showInCompactView: element.showInCompactView, 249 | isDangerousOption: element.isDangerousOption, 250 | ); 251 | }).toList(); 252 | } 253 | 254 | return null; 255 | } 256 | 257 | NotificationActionButton createButton({ 258 | required ButtonType buttonType, 259 | required String buttonKey, 260 | required String label, 261 | Color? color, 262 | String? icon, 263 | bool autoDismissible = true, 264 | bool enabled = true, 265 | }) { 266 | return NotificationActionButton( 267 | key: buttonKey, 268 | label: label, 269 | color: color, 270 | icon: icon, 271 | actionType: buttonType == ButtonType.custom 272 | ? ActionType.KeepOnTop 273 | : ActionType.Default, 274 | autoDismissible: autoDismissible, 275 | enabled: enabled, 276 | requireInputText: buttonType == ButtonType.message, 277 | showInCompactView: buttonType != ButtonType.custom, 278 | isDangerousOption: buttonType == ButtonType.custom, 279 | ); 280 | } 281 | } 282 | 283 | void _navigateToNewRequestScreen() { 284 | BuildContext? context = MyApp.navigatorObserver.navigator?.context; 285 | if (context != null) { 286 | Navigator.pushNamed(context, AppRouter.newScreen, arguments: { 287 | 'first': 'Welcome! 🎉', 288 | 'second': 289 | 'We\'re so glad you\'re here! 🌟 Enjoy exploring and feel free to reach out if you need any assistance. 😊 Happy to have you with us!' 290 | }); 291 | } 292 | } 293 | --------------------------------------------------------------------------------