alertoon_flutter 1.0.0
alertoon_flutter: ^1.0.0 copied to clipboard
A comprehensive Flutter plugin for Alertoon notification services, supporting both Android and iOS platforms with advanced features like push notifications, device management, and user segmentation.
example/lib/main.dart
import 'package:flutter/material.dart';
import 'package:alertoon_flutter/alertoon_flutter.dart';
void main() => runApp(const MyApp());
class MyApp extends StatefulWidget {
const MyApp({super.key});
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
String log = '';
@override
void initState() {
super.initState();
_init();
}
Future<void> _init() async {
final sdk = NotificationProjectFlutter();
await sdk.initialize(apiKey: 'YOUR_API_KEY');
final token = await sdk.getToken();
setState(() => log = 'Token: ' + (token ?? 'null'));
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(title: const Text('Alertoon Example')),
body: Center(child: Text(log)),
),
);
}
}