Skip to main content

flet-notifications

pypi python license

Cross-platform local notifications for Flet apps.

A 1:1 wrapping of the official flutter_local_notifications Flutter plugin, in the same architecture as flet-ads. One uv add flet-notifications covers Android, iOS, macOS, Windows, Linux and Web — no Python dependencies beyond flet (verified on Flet 0.85.0 through 1.0.x in CI).

Test it without an account

Every release builds the example app for every platform. Sideload any of them and every button is live:

Variant Download Notes
📱 ARM64 (most phones/TVs) app-arm64-v8a-release.apk Modern 64-bit Android devices — grab this one unless you know otherwise
📱 ARMv7 (older phones/TV boxes) app-armeabi-v7a-release.apk Legacy 32-bit Android devices
💻 x86_64 (emulators/ChromeOS) app-x86_64-release.apk Android emulators & Chromebooks
🖥️ Windows flet-notifications-example-windows.zip Portable zip
🍎 macOS flet-notifications-example-macos.dmg Disk image
🐧 Linux tar.gz · deb · rpm Bundle or packages
🌐 Web flet-notifications-example-web.tar.gz Static bundle

Plain flet run launches the prebuilt client without the extension's Dart half — notifications need a built app (an artifact above, or flet build <platform>).

Platform Support

Platform Show Schedule Actions & callbacks Channels Progress Notes
iOS ✅ ✅ ✅ — — 13+; attachments, interruption levels
Android ✅ ✅ ✅ ✅ ✅ 7.0+ (API 24); Android TV works
macOS ✅ ✅ ✅ — — 10.15+
Windows ✅ one-shot ✅ — ✅ 10+; cancel/queries need MSIX identity
Linux ✅ — ✅ — — D-Bus server; capabilities vary
Web ✅ — Chrome/Edge only — — Notifications API; gesture-gated permissions

Usage

uv add flet-notifications
import flet as ft
from flet_notifications import LocalNotifications

def main(page: ft.Page):
    notifications = LocalNotifications()

    async def on_tap(e):
        print("tapped:", e.payload)

    notifications.on_tap = on_tap

    if await notifications.request_permissions():
        await notifications.show(id=1, title="Hello", body="Hello!")

ft.run(main)

Controls

Control Base Purpose
LocalNotifications ft.Service Show/schedule/cancel, permissions, probes, channels; construct once, it registers itself

Event handlers

notifications.on_tap = on_tap          # typed: NotificationEvent
notifications.on_action = on_action    # typed: e.action_id, e.input, e.data
notifications.on_dismissed = handler   # typed

Typed handlers must use ft.EventHandler[NotificationEvent], not ft.ControlEventHandler[NotificationEvent] — ControlEventHandler[X] double-wraps X in Event[...], so e.payload raises AttributeError. NotificationEvent carries id, action_id, payload, input, data and response_type.

Taps that arrive while the app wasn't running are replayed on the next start (Android background taps, iOS/macOS cold-start launches).

Configuration

Scheduling on Android needs permissions in the app's pyproject.toml:

[tool.flet.android.permission]
RECEIVE_BOOT_COMPLETED = true   # restore alarms after reboot
SCHEDULE_EXACT_ALARM = true     # exact schedule modes

The scheduled-notification receivers are <application> children, which [tool.flet.android.*] cannot declare — the flet-notifications-patch console script injects them (plus the core-library-desugaring Gradle flags the plugin needs), idempotently:

uv run flet build apk --yes --project myapp --org com.example -v
uv run flet-notifications-patch --project-root build/flutter
cd build/flutter/android && ./gradlew assembleRelease -Psplit-per-abi=true

Configuration reference

Types: NotificationAction/NotificationActionInput (buttons, inline reply) · BigTextStyle/BigPictureStyle/InboxStyle/MessagingStyle (+ Person, Message, AndroidIcon) · NotificationChannel (importance, sound, vibration, badge, DND, lights) · NotificationOptions with AndroidOptions/DarwinOptions/LinuxOptions/WindowsOptions/WebOptions (the full per-platform detail surface) · enums RepeatInterval, DateTimeComponents, AndroidScheduleMode, Importance, GroupAlertBehavior, InterruptionLevel.

Calls: show · schedule · periodically_show · cancel/cancel_all/cancel_pending · request_permissions · are_notifications_enabled · can_schedule_exact_notifications/request_exact_alarm_permission · request_full_screen_intent_permission · has/request_notification_policy_access · open_app_notification_settings · get_pending_notifications/get_active_notifications/get_notification_app_launch_details · create/delete/get_notification_channels (+ groups) · start/stop_foreground_service.

Errors: NotificationError with a stable code — unsupported_platform, init_failed, show_failed, schedule_failed, invalid_action, invalid_schedule, invalid_style, invalid_channel, invalid_option, invalid_service_id, channel_failed, foreground_service_failed, query_failed, permission_failed, unknown_method.

Limitations

  • Linux/Web have no OS scheduler; Windows schedules one-shot only.
  • Android channel sound/vibration are immutable after creation; aggressive OEM skins may drop alarms after force-stop; Samsung caps ~500 alarms.
  • Interruptions beyond passive on Apple need Xcode capabilities.
  • Not wrapped (upstream niche): HTML-format style flags, MediaStyle, action semanticAction/invisible/contextual, CarPlay, message data MIME/URI, Linux custom hints.
  • iOS IPAs need Apple signing and are built owner-side; CI builds every other platform.

Example

examples/flet_notifications_example — every API on one screen with a timestamped event log, built for Windows, macOS, Linux, Android and Web on every release.

License

MIT

Metadata

Release files for flet-notifications 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flet-notifications 0.1.3
File Size Uploaded Provenance Actions
flet_notifications-0.1.3.tar.gz 52.3 kB With provenance Details for flet_notifications-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for flet-notifications 0.1.3
File Interpreter ABI Platform Actions
flet_notifications-0.1.3-py3-none-any.whl Python 3 none any Details for flet_notifications-0.1.3-py3-none-any.whl

Total release size: 96.2 kB

Release files / flet_notifications-0.1.3.tar.gz

Download URL flet_notifications-0.1.3.tar.gz
Size 52.3 kB
Tags Source
SHA-256 checksum
How to use checksums
3d71a130db9c2ab665dcb9df7e33b7a4d04dc3d3668f6bab9e683c9913ed0703
BLAKE2b-256 checksum
How to use checksums
2561ae3361bb7827bef22e1f18d43fc6ee4e8077d0bdb572066c7d1dcb6c3c86
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.

Transparency log

Release files / flet_notifications-0.1.3-py3-none-any.whl

Download URL flet_notifications-0.1.3-py3-none-any.whl
Size 43.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2af590c86bf9504f7a8919388cb91df614031fb5caa4e6e85c949a38442ea6f7
BLAKE2b-256 checksum
How to use checksums
bc94f2c2acd7200834dc1a19fcb5c40519a1202d8c91abbba7e30ab02b5bcfe4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.

Transparency log

Security for flet-notifications 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for flet_notifications-0.1.3.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page