notification_flutter 1.0.0-alpha03 copy "notification_flutter: ^1.0.0-alpha03" to clipboard
notification_flutter: ^1.0.0-alpha03 copied to clipboard

A flutter plug-in for the native Teko Notification library (Android and iOS).

notification_flutter #

A flutter plug-in for the native Teko Notification library (Android and iOS).

Getting Started #

Table of content

Running example #

Android #

  • Open example/android project with Android studio
  • Add TekoGoogleRegistryToken to local.properties of this project
// example/android/local.properties

TekoGoogleRegistry.password=<your-token>
  • Run project

iOS #

  • Setup github access token for accessing Teko iOS frameworks.

  • Run commands below in the terminal

cd example
flutter build ios --no-codesign
  • Launch Xcode and open example/ios/Runner.xcworkspace file

Pigeon model #

This project use Pigeon to generate code for communication between Flutter and the native side.

The Pigeon file is located in the pigeon folder.

To generate code with Pigeon, please run ./scrips/pigeon_gen.sh file.

Library usage #

Initialize Terra Notification #

First initialize TerraApp with APP_NAME and terraClientId

Initialize TerraNotification by APP_NAME

await TerraApp.initTerraApp(
  appName: "APP_NAME",
  terraConfig: InitAppConfig(
    terraClientId: "your terraClientId",
    terraEnvironment: TerraEnv.Develop,
  ),
);
final terraNotification = await TerraNotification.getInstance("APP_NAME");

All function of NotificationFlutter #

abstract class NotificationFlutter {
  Future<Result<void>> registerToken(String deviceToken);

  Future<Result<void>> unregisterToken(String deviceToken);

  Future<Result<NotificationList>> getNotificationList(GetNotificationListQuery query);

  Future<Result<int>> countUnreadNotifications(String? deviceToken);

  Future<Result<void>> markReadNotification(int notificationId);

  Future<Result<void>> markReadAllNotification(String deviceToken);
}
0
likes
140
points
43
downloads

Publisher

unverified uploader

Weekly Downloads

A flutter plug-in for the native Teko Notification library (Android and iOS).

Repository

Documentation

API reference

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on notification_flutter