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. Building Courses page
  • 2. Navigating to Articles Page
  1. DIGIA STUDIO INTRODUCTION
  2. Build Your First App
  3. Bytes App

Courses

PreviousDefining API CallsNextArticles

Last updated 1 year ago

1. Building Courses page

This page shows the second screen your users will see.

Tip: In the template, we have already created this page so that you can directly start customizing widgets.

To build the Courses page:

  1. After defining the API Calls in the previous step, now we can proceed to building the Courses page. To start fetching data from the Courses API, select the Courses Page.

  2. On the Properties Panel, DataSource, click on the {{x}} Variable icon, and select Courses API from the dropdown menu.

  1. Now, for displaying different courses, we can wrap all the items in a GridView. For fetching data from the API, we need to define the DataSource here. Click on the variable icon ahead of DataSource, and enter the values dataSource.data For spacing, give its margin a top value of 10px.

  1. To dislay Courses side by side, create a Column widget. For making it prettier, provide it with a Padding of 16px on all sides, Margin of 10px on all sides, and Border Radius of 10px on all corners. For different background colors on all Courses, we can fetch the backgroundColor from the API itself. Click on the variable icon besides Background Color, and enter the value currentItem.attributes.courseColor

  1. Now, add an Image Widget inside the Column Widget. For fetching the image from the API itself, click on the variable icon besides the Image Source, and enter the value currentItem.attributes.courseImage

  1. To make the Image smaller, under Widget Properties, change the Box Fit to Scale Down, with an Aspect Ratio of 1 . Also, navigate to the Default Properties, and align the Widget to Top Left and give it a height of 50px.

  1. Add a Text Widget inside the Column Widget. To fetch the Course's name from the API, click on the variable icon besides the Text, and enter the value currentItem.attributes.courseName For size, under Text Span Style Properties, give it a Font Token of Headline Small

  1. For spacing and alignment, go to Default Properties and align it as Top Left Under Styling Properties, give it a margin of value 10px

  1. Insert a new Text Widget inside the Column Widget. Again, for fetching data from the API, click on the variable icon besides Text, and give it a value of currentItem.attributes.Type For spacing and alignment, go to Default Properties and align it as Top Left Under Styling Properties, give it a margin of value 10px

2. Navigating to Articles Page

For Navigation, first we need to create a new page, "Articles" (Note: You are free to name it whatever you wish). Navigate to the Column widget, under Default Properties, click on the Event Handlers button, and add an event with the Action: Go to Page and select the Articles page from the dropdown. Now, you can navigate from the Courses page to the Articles page.

To add an , select the Courses page, and then turn on the Show App Bar toggle ON. Under App Bar Title, enter the text as Courses and under Text Span Style Properties, select the Font Token as Title Large, text Color as #FFFFFF. For z-coordinates (to make sure that the App Bar appears on top of everything), set the Elevation as 2. We have selected the Background Color as #04A24C and Back Icon Color as #FFFFFF.

AppBar
Event Handler added