Rowena  Waters

Rowena Waters


How to Add Beam To Your Flutter App

In this Flutter tutorial we will learn about How to create cross-platform notifications in your Flutter app with Pusher Beams. Flutter is an open-source framework created by Google for building beautiful, natively compiled, multi-platform applications from a single codebase.

You can use Beams to add transactional cross-platform push notifications to your Flutter app. Aside from bypassing the complex integration and maintenance associated with notification gateways, Beams is extremely flexible, scalable and reliable, and includes valuable insights into your notification performance.

Set up

To complete this tutorial you’ll need the following:

  • A Pusher account and a Beams project set up in the dashboard. If you don’t already have one you can sign up for the sandbox plan which is completely free and will be more than ample to complete this sample project so you can start experimenting with notifications for Flutter.
  • The latest version of Flutter installed on your system. If you’re just starting with Flutter, you can follow the tutorial here to install.
  • An IDE of your choice.

Platform support

  • Android support for API level greater than 19
  • iOS > 10.0
  • Note that the Beams Flutter SDK is currently operating for Android and iOS only. If you’re planning to integrate the SDK for full cross-platform functionality, keep an eye on our announcements to see when the Web SDK is out of testing.

All events/connections can be viewed on the debug console on the Pusher dashboard.

Adding Beams to your Flutter app

1. Create a Flutter app

If you already have a Flutter project you can jump to creating a Beams instance.

If you’re just starting with Flutter, you’ll first need to install it. Then, you can create a new Flutter project:

$ flutter create beams_example

Before running the project, make sure you boot up the emulator you want to run the application. To configure it, you can read the relevant part of the official documentation according to your operating system.

To list all devices available for your application, you can run:

$ flutter devices
2 connected devices:

Android SDK 30 • emulator-5554 • android-x86    • Android 11 (API 30) (emulator)

Choose the device you want to run the app on and Flutter will start building the application and then launch it on the chosen device by running the following command:

$ flutter run -d emulator-5554

In this example, the application will be running on an Android emulator.

2. Create a Beams instance

Create one Beams instance to be used in your app. After creating an instance, you will find options for setting up different platforms: Android, iOS, and Web.

This SDK currently supports Android and iOS.

3. Platform specific settings


To set up Pusher Beams for Android, you must configure FCM and Google Services by following these steps:

  1. Create a Firebase project
  2. Set up the FCM Server Key in the instance settings in Pusher Beams.
  3. Create a new Android app in Firebase with the package name of your choice
  4. Download the google-services.json file from the Firebase console.
  5. Copy this google-services.json to android/app/google-services.json.
  6. Add the following line inside the project-level build.gradle in /android/build.gradle:
buildscript { 
   // Your config... 
   repositories { 
      // Your repositories... 

   dependencies { 
      // Your dependencies... 
      // Add this line 
      classpath '' 
  1. In the app-level build.gradle at my-app/android/app/build.gradle, add the following line at the end:
apply plugin: ''
  1. Change the minSdkVersion to at least 19 inside the app-level build.gradle


To set up Pusher Beams for iOS, you must configure APNS. You can read more about it in our official documentation.

The following steps are needed to set up the iOS project:

  1. Open the iOS project in XCode (my_app/ios/Runner.xcworkspace)
  2. Go to Build Settings and change the “iOS Deployment Target” to iOS 10.0 or above.
  3. Go to “Signing and Capabilities” and set the “Bundle Identifier” to the App ID you created in your Apple Account.
  4. While inside “Signing and Capabilities”, add the following capabilities. You can read more in our docs about enabling capabilities within your iOS app:
    • “Push Notifications”
    • “Background Modes” => “Remote Notifications”
  5. Make sure to close Xcode afterwards.

It is worth noting that server side event-driven push notifications do not work on iOS simulators. You’ll need to use a real device to test this functionality.

4. Getting started with the library

First, you need to install Pusher Beams dependencies by running the following command:

$ flutter pub add pusher_beams

Now it’s time to use Pusher Beams in your code. The following snippet includes the imports and the lines you need to add to your main() function in lib/main.dart file.

Remember to add async beside main():

import 'package:pusher_beams/pusher_beams.dart';

void main() async {

  const instanceID = '00000000-0000-0000-0000-000000000000';
  await PusherBeams.instance.start(instanceID);
  await PusherBeams.instance.setDeviceInterests(['debug-new', ‘hello’]);

  runApp(const MyApp());

Replace the instanceID with the id of the Beams instance you just created.

Notice that in this code, the device subscribes to two interests (“debug-new” and “hello”), and they will be used to publish notifications.

The SDK also provides more ways to add and remove interests by calling:

await PusherBeams.instance.addDeviceInterest('bananas');
await PusherBeams.instance.removeDeviceInterest('bananas');
await PusherBeams.instance.clearDeviceInterests();

5. Handling notification events in your code

Although push notifications are delivered to the notification center of the device, Pusher Beams SDK provides event listeners that empower you to customize some behaviors in your application. Customization is supported on Android and iOS platforms.

The following two listeners are supported:

  1. When interests are added or removed
PusherBeams.instance.onInterestChanges((interests) => print(interests));
  1. When a push notification is received while the app is in the foreground
PusherBeams.instance.onMessageReceivedInTheForeground((notification) => print(notification));

When the app is in the foreground, adding this listener lets you control the notification in your app, and it does not go to the notification center. However, when your app is in the background, this listener will not be executed, and the notification will go to the notification center of the device.

6. Authenticating users

Authenticated Users allows you to securely associate devices with an arbitrary user ID which you set from your server and publish personalized notifications directly to users.

For more information about it, you can read our Authenticated Users documentation.

With Beams Flutter SDK, you can register a new user using this snippet:

final BeamsAuthProvider provider = BeamsAuthProvider()
     ..authUrl = ''
     ..headers = {'Content-Type': 'application/json'}
     ..queryParams = {'page': '1'}
     ..credentials = 'omit';

await PusherBeams.instance.setUserId(
    (error) => {
        if (error != null) { print(error) }
        // Success! Do something...

If the user wants to log out of your application, you should use .clearAllState() to leave the SDK in an empty state.

If the device was paired with a user and the app is uninstalled without calling this method, Pusher Beams will remove the device.


If you want to stop receiving push notifications by deleting all SDK state both remotely and locally, you should use stop() method. Calling this will mean the device will cease to receive push notifications .start must be called if you want to use the SDK again.


Full example

For a more detailed example of all those features, we’ve created an application so you can play with the library.

Original article sourced at:


What is GEEK

Buddha Community

How to Add Beam To Your Flutter App

Google's Flutter 1.20 stable announced with new features - Navoki

Flutter Google cross-platform UI framework has released a new version 1.20 stable.

Flutter is Google’s UI framework to make apps for Android, iOS, Web, Windows, Mac, Linux, and Fuchsia OS. Since the last 2 years, the flutter Framework has already achieved popularity among mobile developers to develop Android and iOS apps. In the last few releases, Flutter also added the support of making web applications and desktop applications.

Last month they introduced the support of the Linux desktop app that can be distributed through Canonical Snap Store(Snapcraft), this enables the developers to publish there Linux desktop app for their users and publish on Snap Store.  If you want to learn how to Publish Flutter Desktop app in Snap Store that here is the tutorial.

Flutter 1.20 Framework is built on Google’s made Dart programming language that is a cross-platform language providing native performance, new UI widgets, and other more features for the developer usage.

Here are the few key points of this release:

Performance improvements for Flutter and Dart

In this release, they have got multiple performance improvements in the Dart language itself. A new improvement is to reduce the app size in the release versions of the app. Another performance improvement is to reduce junk in the display of app animation by using the warm-up phase.


If your app is junk information during the first run then the Skia Shading Language shader provides for pre-compilation as part of your app’s build. This can speed it up by more than 2x.

Added a better support of mouse cursors for web and desktop flutter app,. Now many widgets will show cursor on top of them or you can specify the type of supported cursor you want.

Autofill for mobile text fields

Autofill was already supported in native applications now its been added to the Flutter SDK. Now prefilled information stored by your OS can be used for autofill in the application. This feature will be available soon on the flutter web.


A new widget for interaction

InteractiveViewer is a new widget design for common interactions in your app like pan, zoom drag and drop for resizing the widget. Informations on this you can check more on this API documentation where you can try this widget on the DartPad. In this release, drag-drop has more features added like you can know precisely where the drop happened and get the position.

Updated Material Slider, RangeSlider, TimePicker, and DatePicker

In this new release, there are many pre-existing widgets that were updated to match the latest material guidelines, these updates include better interaction with Slider and RangeSliderDatePicker with support for date range and time picker with the new style.


New pubspec.yaml format

Other than these widget updates there is some update within the project also like in pubspec.yaml file format. If you are a flutter plugin publisher then your old pubspec.yaml  is no longer supported to publish a plugin as the older format does not specify for which platform plugin you are making. All existing plugin will continue to work with flutter apps but you should make a plugin update as soon as possible.

Preview of embedded Dart DevTools in Visual Studio Code

Visual Studio code flutter extension got an update in this release. You get a preview of new features where you can analyze that Dev tools in your coding workspace. Enable this feature in your vs code by _dart.previewEmbeddedDevTools_setting. Dart DevTools menu you can choose your favorite page embed on your code workspace.

Network tracking

The updated the Dev tools comes with the network page that enables network profiling. You can track the timings and other information like status and content type of your** network calls** within your app. You can also monitor gRPC traffic.

Generate type-safe platform channels for platform interop

Pigeon is a command-line tool that will generate types of safe platform channels without adding additional dependencies. With this instead of manually matching method strings on platform channel and serializing arguments, you can invoke native class and pass nonprimitive data objects by directly calling the Dartmethod.

There is still a long list of updates in the new version of Flutter 1.2 that we cannot cover in this blog. You can get more details you can visit the official site to know more. Also, you can subscribe to the Navoki newsletter to get updates on these features and upcoming new updates and lessons. In upcoming new versions, we might see more new features and improvements.

You can get more free Flutter tutorials you can follow these courses:

#dart #developers #flutter #app developed #dart devtools in visual studio code #firebase local emulator suite in flutter #flutter autofill #flutter date picker #flutter desktop linux app build and publish on snapcraft store #flutter pigeon #flutter range slider #flutter slider #flutter time picker #flutter tutorial #flutter widget #google flutter #linux #navoki #pubspec format #setup flutter desktop on windows

Idrish Dhankot

Idrish Dhankot


Hire Dedicated Flutter App Developer USA| Flutter App Developers

Hire Flutter App Developers: WebClues Infotech is a Flutter App Development company. Our Flutter mobile app development team can create cross-platform apps for different industry verticals. Our Flutter developers will help you extend your business’s scope by developing enhanced functionality and a feature-rich app. To provide a rich user experience to your users, hire dedicated Flutter app developers from WebClues Infotech today!

#hire flutter app developers #hire dedicated flutter app developer usa #hire flutter app developer usa #hire dedicated flutter app developer #hire flutter developer #flutter app development company

Best Flutter App Development Company

Are you looking for the best flutter app development company? Then AppClues Infotech is the leading flutter app development company in USA offering the best service worldwide. We focused on developing hybrid mobile apps on Android & iOS and assures our end-user about exceptional and functionally-rich mobile apps.

For more info:
Call: +1-978-309-9910

#top flutter app development company in usa #best flutter app development service #best flutter app development company #hire flutter app developers #flutter app development company #expert flutter app development company

Best Flutter App Development Company in USA & India

AppClues Infotech is one of the best flutter app development company in USA & India. Our diverse and experienced team of developers can help you sketch the smartest and quickest solution for your mobile app development projects with the most superior technology.

For more info:
Call: +1-978-309-9910

#top flutter app development company in usa #best flutter app development service #best flutter app development company #hire flutter app developers #flutter app development company in usa & india #custom flutter app development service

Punith Raaj


The Ultimate Guide To Tik Tok Clone App With Firebase - Ep 2

The Ultimate Guide To Tik Tok Clone App With Firebase - Ep 2
In this video, I'm going to show you how to make a Cool Tik Tok App a new Instagram using Flutter,firebase and visual studio code.

In this tutorial, you will learn how to Upload a Profile Pic to Firestore Data Storage.

🚀 Nice, clean and modern TikTok Clone #App #UI made in #Flutter⚠️

Starter Project :

► Timestamps 
0:00 Intro 0:20 
Upload Profile Screen 
16:35 Image Picker
20:06 Image Cropper 
24:25 Firestore Data Storage Configuration.

⚠️ IMPORTANT: If you want to learn, I strongly advise you to watch the video at a slow speed and try to follow the code and understand what is done, without having to copy the code, and then download it from GitHub.

► Social Media 

► Previous Episode :
► Playlist:

I hope you liked it, and don't forget to like,comment, subscribe, share this video with your friends, and star the repository on GitHub!
⭐️ Thanks for watching the video and for more updates don't forget to click on the notification. 
⭐️Please comment your suggestion for my improvement. 
⭐️Remember to like, subscribe, share this video, and star the repo on Github :)

Hope you enjoyed this video!
If you loved it, you can Buy me a coffee :

LIKE & SHARE & ACTIVATE THE BELL Thanks For Watching :-)

#flutter tutorial - tiktok clone with firebase #flutter challenge @tiktokclone #fluttertutorial firebase #flutter firebase #flutter pageview #morioh #flutter