backendless_sdk 7.0.0 copy "backendless_sdk: ^7.0.0" to clipboard
backendless_sdk: ^7.0.0 copied to clipboard

outdated

Flutter plugin for Backendless SDK. It provides access to the Backendless services that enable the server-side functionality for developing and running mobile and desktop apps.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:backendless_sdk/backendless_sdk.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  static const String APP_ID = "5CFD97D9-2176-4DAC-FF4C-7EDF91451900";
  static const String ANDROID_KEY = "9263B099-593C-4768-9501-AED10E1F72B5";
  static const String IOS_KEY = "F7CA2E1A-A40B-425B-8850-B1D0543B66E5";
  static const String JS_KEY = "2E99B7C4-75CC-45C3-825B-4DCCC7FD353C";
  static const String CUSTOM_DOMAIN = "https://mytest123cuz.backendless.app";

  @override
  void initState() {
    super.initState();
  }

  void initPressed() {
    Backendless.initApp(
        applicationId: APP_ID,
        androidApiKey: ANDROID_KEY,
        iosApiKey: IOS_KEY,
        // jsApiKey: JS_KEY,
        customDomain: CUSTOM_DOMAIN);
  }

  void buttonPressed() {
    // create a Map object. This will become a record in a database table
    Map testObject = new Map();

    // add a property to the object.
    // The property name ("foo") will become a column in the database table
    // The property value ("bar") will be stored as a value for the stored record
    testObject["foo"] = "bar";

    // Save the object in the database. The name of the database table is "TestTable".
    Backendless.data.of("TestTable").save(testObject).then((response) =>
        print("Object is saved in Backendless. Please check in the console."));
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
            child: Column(
          crossAxisAlignment: CrossAxisAlignment.center,
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            ElevatedButton(child: Text("Init"), onPressed: initPressed),
            ElevatedButton(child: Text("Action"), onPressed: buttonPressed),
          ],
        )),
      ),
    );
  }
}
46
likes
0
pub points
80%
popularity

Publisher

unverified uploader

Flutter plugin for Backendless SDK. It provides access to the Backendless services that enable the server-side functionality for developing and running mobile and desktop apps.

Homepage

License

unknown (LICENSE)

Dependencies

collection, flutter, flutter_web_plugins, http, js, reflectable

More

Packages that depend on backendless_sdk