What is Flutter?

Flutter is an open-source UI software development kit introduced by Google. With Flutter you can use one programming language and a single codebase to create multiple applications for different platforms (e.g iOS and Android).

Flutter consists of two important parts:

  1. SDK (Software development kit): A collection of tools that helps you develop applications. It contains elements that turn the code into native machine code (which is also suitable for Android and iOS).
  2. Framework (based on UI library modules): A collection of reusable interface elements (buttons, text input, sliders, and more) that can be customized to suit your own needs.

What are the features of the Flutter app and why to use it?

First of all, Flutter is a modern system which is using Dart language (object-oriented programming language), and it can run on almost any device. Furthermore, Flutter is allowing "hot reload" – which means you change your code and see the results in real-time.

Here are additional benefits of using Flutter:

Getting started

Ensure you do the steps below to follow along with this tutorial:

  1. Create a 46elks account.
  2. Download the project's source code.
  3. Set up Flutter.
    Install Flutter and choose if you want to use the Android setup or the iOS setup (you only need one).

Configure the app

Before sending an SMS, we need to do some small configurations to our app.

  1. Open up the source code you downloaded, in your editor of choice.

  2. Open the file /lib/main.dart and change the variables username and password to your own API credentials for the 46elks API (this is crucial to be able to send SMS).


Run the app

Now when the configuration is done we are going to run our Flutter app in a virtual device to try it out.

Depending on what setup you use, the process of running the app differs. Choose one of the alternatives below and follow the corresponding steps.

iOS (Mac terminal)
  1. Open the terminal and navigate to the project you downloaded: cd /path/to/flutter-project
  2. Open an iOS simulator: open -a Simulator
  3. Run your flutter application: flutter run
Android (Android studio)
  1. Open the Android Emulator.

  2. Run the sample.

Your app should now have opened up in a virtual device on your screen. Let's continue to the next step on sending an SMS.

Send an SMS

With the app open on your screen, you will see two fields and a submit button.

  1. In the first field, enter the phone number to which you would like to send the SMS. Remember to write the phone number in the E.164 format.
  2. In the second field enter the message you would like to send.
  3. Once you filled in the information you can click on the submit button.

After submitting, you will receive the status of your message from the 46elks API. It will be show at the bottom of the virtual device. The owner of the phone number you entered, will receive the actual SMS to their physical device.

Now what?

Now that you have successfully sent your first SMS via your Flutter app, let's have a look at additional benefits of using Flutter with 46elks:

In our documentation you will find more information on what you can do with SMS. Have fun with exploring the many possibilities with Flutter and 46elks.