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
  • Call Rest Api
  • Go Back
  • Open Url
  • Go to Page
  • Set Local Storage
  • Rebuild Page
  1. BUILDING UI

Event Handlers

PreviousWidget CommonalitiesNextColors

Last updated 1 year ago

For every widget, custom Events can be defined. Various options are present, which are described in detail below:

Call Rest Api

To add an Event which calls some REST API on clicking it, use this option:

  1. Select a Widget to call REST API from.

  2. Select the Action as Call Rest Api

  3. Select the API ID to whatever API you want to be called.

  4. Confirm by pressing Done.

Go Back

If you want to configure custom navigation on your app, you can add this Event.

  1. Select a Widget to add navigation, and navigate to Default Properties -> Event Handlers.

  2. Select the Action as Go Back.

  3. Confirm by pressing Done.

  4. Now, users can press on the widget and navigate to the previous screen.

Open Url

If you want to open a URL from within your app:

  1. Select the Widget from which you want to open the URL.

  2. Select the Action as Open Url.

  3. Enter the URL, or fetch it from an API Call.

  4. Select the LaunchMode.

    1. Platform Default This option leaves the decision of how to launch the URL to the platform implementation.

    2. WebView This option loads the URL in an in-app web view (e.g., Android WebView).

    3. External Application This option passes the URL to the OS to be handled by another application.

    4. External (Non-Browser) This option passes the URL to the OS to be handled by another non-browser application.

Go to Page

If you want to configure custom navigation on your app, you can add this Event as follows:

  1. Select a Widget to add navigation, and navigate to Default Properties -> Event Handlers.

  2. Select the Action as Go to Page.

  3. Choose the page you want to navigate to from the Dropdown.

  4. Confirm by pressing Done.

  5. Now, users can press on the widget and navigate to the chosen screen.

Set Local Storage

If you want to save something on Local Storage, you can modify this Event:

  1. Select a Widget to Set Local Storage in.

  2. Select the Action as Set Local Storage.

  3. Choose the Method as Set or Clear.

  4. If you choose Set, you can enter the key and value you want to set.

  5. Confirm by pressing Done.

Rebuild Page

This Event can help in force rebuilding a Page:

  1. Select a Widget on clicking which the page will be rebuilt.

  2. Select the Action as Rebuild Page.

  3. Confirm by pressing Done.