Digia Academy
Digia StudioDiscordLinkedIn
  • Introduction
    • FAQs
  • What's New
    • 2024
      • March
  • DIGIA STUDIO INTRODUCTION
    • Dashboard
    • Builder Tool
      • Navigation Menu
      • Tool Bar
      • Pages and Widgets Panel
      • Canvas Area
      • Properties Panel
    • Creating a New Project
    • Creating new Pages
    • Working with Widget Tree
    • Build Your First App
      • Hello World
      • Bytes App
        • Onboarding
        • Defining API Calls
        • Courses
        • Articles
        • Viewing your App
    • SDK Integration
      • Insert Single Pages from Digia Studio
  • Actions
    • Call API Rest Action
    • Call Rest API
    • Pop Current
    • Pop to Route
    • openUrl
    • Go To Page
    • Post Message
    • Set Page State
    • Wait (delay)
    • Drawer
    • Toast
    • Open Dialog
    • Share
    • Copy to Clipboard
  • Operations
    • API Call
    • Operators
      • Json Operators
      • Logical Operators
      • Date Time Operators
      • Math Operators
      • String Operations
  • BUILDING UI
    • Widgets
      • Form Widgets
        • PinField
        • Calendar
        • Text Form Field
      • Base Widgets
        • Animated Button
        • Check Box
        • Video Player
        • Spacer
        • Stack
        • Wrap
        • Text
        • Avatar
        • Rich Text
        • Image
        • Button
        • Icon
        • Switch
        • Sized Box
        • HtmlView
        • Lottie Animation
        • Linear Progress Bar
        • YouTube Player
        • Circular Progress Bar
      • Layout Widgets
        • ListView
        • Web View
        • Future Builder
        • Conditional Builder
        • Stream Builder
        • GridView
        • Column
        • Row
        • Container
        • Expandable
        • Divider (Horizontal)
        • Divider (Vertical)
        • Carousel
      • Persistent Footers Widgets
        • NavigationBar Widget
      • Page Widgets
        • Stepper Widget
        • Scaffold Widget
        • Paginated Listview Widget
        • TabView
        • AppBar
      • Widget Commonalities
    • Event Handlers
  • Theme
    • Colors
    • Typography
  • DATA AND BACKEND
    • API Calls
      • Setting up API Calls
      • Create API Calls
      • Import API From Curl
  • DEPLOYING YOUR APP
    • Deployment
    • Release History
  • Settings
    • App Settings
    • App Assets
    • Media Assets
  • JARGON
    • Data integration
Powered by GitBook
On this page
  1. DIGIA STUDIO INTRODUCTION

SDK Integration

Learn how to integrate our SDK in your existing app

PreviousViewing your AppNextInsert Single Pages from Digia Studio

Last updated 4 months ago

Currently we support the following platforms for integration

Platform
Support

Flutter

Android

Coming Soon

iOS

Coming Soon

Web

Coming Soon

Flutter

Run

$ flutter pub add digia_ui

or

Update your pubspec.yaml with

dependencies:
  digia_ui: ^0.1.6

If you want to build your entire app with Digia, you should use DUIApp (as below), but if you only want to insert a page from Digia in your app, refer .

In your main.dart call the DUIApp constructor like below.

  DUIApp(
      digiaAccessKey: "your_project_id",
      flavorInfo: Staging(),
      environment: 'development',
      baseUrl: 'https://app.digia.tech/api/v1',
      networkConfiguration: NetworkConfiguration(
        defaultHeaders: {},
        timeout: 30,
      ),
    );

This will initialize the SDK. Lets understand each of the params

digiaAccessKey

type : string

required : true

This is your Project ID that you can get from Digia Studio.

baseUrl

type : string

required : false

default : https://app.digia.tech/api/v1

The default api url which the SDK will hit to fetch UI data. If you are using a self hosted version of our dashboard use that url.

environment

type : String

'local', 'development', 'production'

required : true

Represents the backend environment the app connects to:

Local: For local development

Development: For development server

Production: For production server

flavorInfo

type : enum FlavorInfo

debug, staging, release, version

required : true

Controls how the app loads and manages configurations:

Debug: Debug will always pull the latest config changes that are made on the dashboard. Use this when you are developing or testing your flows.

Staging: Staging will pull the latest config from the staging environment.

Release: Release takes 3 parameters, InitPriority, appConfig path, and functionsPath.

InitPriority refers to the strategy when app launches:

  1. PrioritizeNetwork: It takes an integer, timeout which sets API timeout value in seconds. This strategy first tries to fetch the config and functions from network. If network fails, it builds appConfig from cache. If cache fails, it builds appConfig from burned assets. If no burned assets, then throws error.

  2. PrioritizeCache This strategy prioritizes appConfig from Cache, and upon failure tries to build appConfig from burned assets.

  3. PrioritizeLocal This strategy prioritizes appConfig from burned assets only.

Version: Version will take a numeric value for a specific version, and fetches the appConfig for that version number.

developerConfig

type : DeveloperConfig

required : false

default : null

Use this during development to enable proxy. Takes an object of DeveloperConfig class requiring two params

proxyUrl: string

networkConfiguration

type : NetworkConfiguration

required : true

This class holds all the network configuration required for your apis.

defaultHeaders: Map <String, dynamic>

Set the headers you want to send in all API calls that you've configured on the dashboard like Auth, x-device-id etc.

timeout: int

Set API timeout value in seconds.

To learn how to insert a single page from Digia Studio, refer here:

A string value in the format of ip:port if you want to use proxies like or .

Any that are set in the API call on the dashboard are appended to these default headers. If a header is present in both defaultHeaders and API headers, its value will be picked from defaultHeaders.

this
Proxyman
Charles
Insert Single Pages from Digia Studio
✅
headers