PushizoDocs
Başlarken

Flutter hızlı başlangıç

pushizo_flutter eklentisini ekleyin, Android ve iOS yerel adımlarını tamamlayın, başlatın ve test push gönderin.

pushizo_flutter, yerel Android ve iOS SDK'larını MethodChannel/EventChannel ile sarar; HTTP, kuyruk, oturum ve teslimat geri bildirimi yerel tarafta çalışır, in-app mesajlar Flutter widget'larıyla çizilir. Flutter web, Web SDK köprüsüyle desteklenir. Tüm API için Flutter SDK.

Bağımlılık

# pubspec.yaml
dependencies:
  pushizo_flutter: ^0.1.0
  # Monorepo içinden: pushizo_flutter: { path: <repo>/sdk/flutter/pushizo_flutter }

Android

  1. google-services.json → android/app/; android/settings.gradle.kts içinde id("com.google.gms.google-services") version "4.4.2" apply false, android/app/build.gradle.kts içinde id("com.google.gms.google-services").
  2. Dashboard → Kanallar → Android Push → servis hesabı JSON'u → Doğrula.

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 → Kanallar → iOS Push → .p8, Key ID, Team ID, Bundle ID → Doğrula. Eklenti APNs token'ını UIApplicationDelegate olaylarından otomatik alır.
  4. Zengin medya ve received kaydı için Notification Service Extension: iOS SDK → NSE.

Başlatın ve izin isteyin

import 'package:pushizo_flutter/pushizo_flutter.dart';

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

// Bir düğmede:
final granted = await Pushizo.Notifications.requestPermission();
await Pushizo.login('user_42');
await Pushizo.User.addTags({'plan': 'pro'});

Test push

Gerçek cihazda uygulamayı açın; Dashboard → Abonelikler'de platforma göre android_push / ios_push kaydı görünür. Kaydı Test cihazı yapıp Test push gönder.

Bu sayfada