Quickstart guide

Requirements

  • Flutter 3.3.0 or later.
  • Dart SDK 3.7.0 or later.
  • Android: minimum API level 24.
  • iOS: minimum deployment target 15.0.
  • Recommended: An SSH key configured locally and registered with GitHub.

Installation

To install the DevRev SDK, run the following command:

1flutter pub add devrev_sdk_flutter

It automatically fetches the latest version of our package and adds it to your project’s pubspec.yaml file:

1dependencies:
2 devrev_sdk_flutter: <VERSION>

Alternatively, you can add the dependency manually by adding the package to your pubspec.yaml file under the dependencies section and run flutter pub get to install the package.

To get the latest version of the SDK, you can check the pub.dev page.

Set up the DevRev SDK

  1. Open the DevRev web app at https://app.devrev.ai and go to the Settings page.
  2. Under PLuG settings copy the value under Your unique App ID.
  3. Configure the DevRev SDK in your app using the obtained credentials.

The DevRev SDK must be configured before you can use any of its features.

The SDK becomes ready for use once the following configuration method is executed.

1DevRev.configure(appID);

For example:

1DevRev.configure("abcdefg12345");

Sample app

A sample app with use cases for the DevRev SDK for Flutter has been provided as a part of our public repository. To set up and run the sample app:

  1. Go to the sample directory:

    1cd sample
    2flutter clean
    3rm -rf ios android web linux macos windows
    4flutter create --platforms=android,ios .
  2. Install dependencies:

    1flutter pub get
  3. iOS app: Open the ios/Runner.xcworkspace in Xcode for running the iOS app or run the following command.

    1flutter run -d ios

    Additional Steps for iOS before running the app:

    1. Change the minimum iOS deployment target version to 15.0.
    2. Go to the ios directory and perform pod install.
    3. Open ios/Runner.xcodeproj in Xcode and select Package dependencies -> FlutterGeneratedPluginSwiftPackage -> Package.swift set iOS version from 12 to 15.
      1platforms: [
      2 .iOS("15.0")
      3]
    4. Perform File -> Packages -> Resolve package versions.
    5. Build and run the app.
  4. Android app: Open the android directory in Android Studio or run the following command.

    1flutter run -d android