pushe_flutter 2.1.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 79

Pushe flutter #

A plugin to use Pushe sdk in Flutter framework.

Installation #

Add the plugin to pubspec.yaml:

  pushe_flutter: 2.1.0
  • If you want to use the latest version, not necessarily released, you can use the github source code.
    url: https://github.com/pusheco/pushe-flutter.git

Then run flutter packages get to sync the libraries.

Set up credentials #

Go to https://console.pushe.co , create an application with the same package name and get the manifest tag. Add the manifest tag in the Application tag. It should be something like this:

<meta-data android:name="pushe_token"
           android:value="PUSHE_TOKEN" />

Run the project after and you should be able to see your device in console after a short time.

Add the code snippets #

In your main.dart:

import 'package:pushe_flutter/pushe.dart';

More Info #

2.1.0 #

  • Added Support for Android Embedded V2
  • Migrate native language to Kotlin
  • Added APIs:
    • createNotificationChannel
    • removeNotificationChannel
    • enableCustomSound
    • DisableCustomSound
  • Improvements on analytics methods sendEvent and sendEcommerceData
  • Added support for background execution to get the callbacks event when the app is fully killed
  • Fix bug when clearing customId, userEmail and userPhoneNumber. You can now set null to clear them.

2.0.3 #

  • Fix bug in notification listeners
  • Improve sendNotificationToUser to support multiple IDs
  • Function callbacks will have no boolean status anymore, since there was no false status
  • Code style improvements
  • Example project improvements

2.0.2 #

  • Fix issue with AndroidX

2.0.1 #

  • Fix formatting of plugin
  • Minor improvements

2.0.0 #

  • Migrate to the new Plus sdk of Pushe
  • Get used of new Plus features in the SDK
  • No initialization is needed for the library

Notice the setNotificationListener is not fully reliable yet, since it does not handle background

1.1.0-alpha1 #

  • Fixed Battery usage issue
  • Added method isNotificationOn

1.0.1 #

  • Fix problem with AndroidX projects.

  • Changed example package name.

1.0.0 #

  • Release ready version.

  • New listener API for notification callbacks.

  • Removed extra files and APIs.

  • Remove extra Fcm service. Firebase and other services can now be added and supported natively.

  • Minor improvements and bug fixes.

0.9.1 #

  • Recreating notification callbacks. Callbacks will return actual notification objects now.

  • From now on, Plugin can be used along with Firebase messaging plugin.

  • Minor improvements and bug fixes.

0.2.1 #

  • Added better styled callbacks.

  • Minor improvements.

0.0.2 #

  • Bug fixed on notification listeners not getting called.

  • Fixed a little bug in example app.

  • Listeners of notification callbacks are working.

  • Added Release offline AAR package.

  • More comments in plugin.

0.0.1 #

  • Pushe basic commands.

  • Support for Android OS.

  • Notification content callback.

Note: Callbacks will be passed when flutter is running. So when the app is closed, notifications will not call the callback methods (They actually will, but the flutter doesn't get it).


import 'pushe_sample.dart';
import 'package:flutter/material.dart';

void main() => runApp(PusheSampleApp());

class PusheSampleApp extends StatelessWidget {
  // This widget is the root of your application.
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Pushe Flutter',
      theme: ThemeData(
        primarySwatch: Colors.indigo,
      home: PusheSampleWidget()

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  pushe_flutter: ^2.1.0

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:pushe_flutter/pushe.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Mar 31, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.6
  • Flutter: 1.12.13+hotfix.8

Health suggestions

Format lib/pushe.dart.

Run flutter format to format lib/pushe.dart.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.28.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies