Install Parse SDK
Introduction
ο»Ώ
In this guide, you will learn how to get started with Back4App for your Flutter project using the Flutter plugin for Parse Server.
Prerequisites
To complete this tutorial, you will need:
1. Install Parse SDK
Open your computer's cmd or terminal (depending on your operating system) and go into your Flutter projects directory. Run this command to create a new Flutter app.
Launch your Flutter app by running this command:
Add the Parse SDK to your project dependencies running:
This command will flutter get and add the Parse SDK to your pubspec.yaml file.
2. Set up Parse SDK
The next step is to import the Parse SDK inside your project's main.dart file.
Inside main.dart, you can use:
import 'package:parse_server_sdk_flutter/parse_server_sdk_flutter.dart';Initialize your Parse app
Go to main.dart, and initialize Parse in your Flutter app:
1 void main() async {
2 const keyApplicationId = 'YOUR_APP_ID_HERE';
3 const keyClientKey = 'YOUR_CLIENT_KEY_HERE';
4 const keyParseServerUrl = 'https://parseapi.back4app.com';
5
6 await Parse().initialize(keyApplicationId, keyParseServerUrl,
7 clientKey: keyClientKey, debug: true);
8 }Note: The debug parameter in function Parse().initialize is set to true, to allow displaying Parse API calls on the console. This configuration can assist in debugging the code. It is advisable to disable debug in the release version.
To successfully connect your app to the Back4App servers, you must provide Parse SDK with your backend application credentials.
Update the string values with your Application Id and Client key.
Locate your Application ID and Client Key credentials by navigating to your app Dashboard > App Settings > Security & Keys.

Copy these credentials and replace in main.dart.
- keyApplicationId = App Id
- keyClientKey = Client Key
3. Test your Parse connection
You should test the SDK to verify that Parse and your backend is working with your Flutter application. It will create an object on your project called First Class.
Letβs add the test code to main.dart as follows:
1 void main() async {
2 final keyApplicationId = 'YOUR_APP_ID_HERE';
3 final keyClientKey = 'YOUR_CLIENT_KEY_HERE';
4 final keyParseServerUrl = 'https://parseapi.back4app.com';
5
6 await Parse().initialize(keyApplicationId, keyParseServerUrl,
7 clientKey: keyClientKey, autoSendSessionId: true);
8
9 var firstObject = ParseObject('FirstClass')
10 ..set(
11 'message', 'Hey, Parse is now connected!π');
12 await firstObject.save();
13
14 print('done');
15 }Launch your app and go to the Back4App Website. Find your app and navigate to the Dashboard.
Now go to Database > Browser > First Class. You should see the First Class with an object, as shown in the image below.

You're done!
Now you know exactly how to get started using Back4app. You learned how to install the Parse SDK in your Flutter Application and connect to your Back4App backend.