From 354a250771fcbdfbc1b683f2fc12f05e2b00bb6a Mon Sep 17 00:00:00 2001 From: Meena Alfons Date: Wed, 5 Jan 2022 15:48:28 +0100 Subject: [PATCH 1/2] Update Readme.md Add import statement --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 6a722b5..02baa80 100644 --- a/README.md +++ b/README.md @@ -107,6 +107,8 @@ flutter pub add pusher_beams In order to initialize Pusher Beams, you already have initialized Firebase ([FlutterFire](https://firebase.flutter.dev/)), now you can initialize Pusher Beams using the `start` method as soon as possible (Preferable inside the `main` function). ```dart +import 'package:pusher_beams/pusher_beams.dart'; + void main() async { // Some initial code // Maybe the firebase initialization... From 2fe76b561ac634ab279b8d6f97e94d48a438c483 Mon Sep 17 00:00:00 2001 From: Meena Alfons Date: Wed, 5 Jan 2022 17:22:36 +0100 Subject: [PATCH 2/2] Add firebase initialization to the example --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 02baa80..122bb92 100644 --- a/README.md +++ b/README.md @@ -111,8 +111,14 @@ import 'package:pusher_beams/pusher_beams.dart'; void main() async { // Some initial code - // Maybe the firebase initialization... + // Example Firebase initialization + WidgetsFlutterBinding.ensureInitialized(); + await Firebase.initializeApp( + options: DefaultFirebaseOptions.currentPlatform, + ); + + // PusherBeams initialization await PusherBeams.instance.start('YOUR INSTANCE ID'); } ```