PushizoDocs
Getting started

Flutter quickstart

Add the pushizo_flutter plugin, complete the native Android and iOS steps, initialize it and send a test push.

pushizo_flutter wraps the native Android and iOS SDKs via MethodChannel/EventChannel; HTTP, queueing, sessions and delivery feedback run on the native side, and in-app messages are rendered with Flutter widgets. Flutter web is supported through the Web SDK bridge. For the full API see the Flutter SDK.

Dependency

# pubspec.yaml
dependencies:
  pushizo_flutter: ^0.1.0
  # From the monorepo: pushizo_flutter: { path: <repo>/sdk/flutter/pushizo_flutter }

Android

  1. google-services.json → android/app/; in android/settings.gradle.kts add id("com.google.gms.google-services") version "4.4.2" apply false, and in android/app/build.gradle.kts add id("com.google.gms.google-services").
  2. Dashboard → Channels → Android Push → service account JSON → Verify.

iOS

  1. ios/Podfile: platform :ios, '15.0'; cd ios && pod install.
  2. Xcode → Runner → Signing & Capabilities → Push Notifications, Background Modes → Remote notifications.
  3. Dashboard → Channels → iOS Push → .p8, Key ID, Team ID, Bundle ID → Verify. The plugin picks up the APNs token automatically from UIApplicationDelegate events.
  4. Notification Service Extension for rich media and received tracking: iOS SDK → NSE.

Initialize and request permission

import 'package:pushizo_flutter/pushizo_flutter.dart';

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await Pushizo.initialize('app_…', logLevel: PushizoLogLevel.warn); // self-hosted: apiUrl: 'https://api.pushizo.com'
  runApp(const MyApp());
}

// In a button:
final granted = await Pushizo.Notifications.requestPermission();
await Pushizo.login('user_42');
await Pushizo.User.addTags({'plan': 'pro'});

Test push

Open the app on a real device; an android_push / ios_push record (depending on the platform) appears under Dashboard → Subscriptions. Mark the record as a Test device and click Send test push.

On this page