Book Image

Mastering Dart

By : Sergey Akopkokhyants
Book Image

Mastering Dart

By: Sergey Akopkokhyants

Overview of this book

Table of Contents (19 chapters)
Mastering Dart
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

The notification APIs


Processes that occur in web applications are asynchronous, and as time passes, they generate event messages to alert end users about the start, end, or progress of the process execution. The web notification API allows you to display notifications outside the context of web pages. The user agent determines the optimum presentation of the notification. This aspect depends on the device on which it is running. Usually, it can present notifications in the following areas:

  • At a corner of the display

  • In an area within the user agent

  • On the home screen of a mobile device

The web notification API, available as part of the dart:html package, allows you to send information to a user even if the application is idle. Notifications can be useful in the following use cases:

  • To notify users about new incoming messages

  • To notify users about special events in game applications

  • To notify users about the connection status of an application, the battery status of a device, and so on

When to notify...