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
  • Adding Container widget
  • Customizing Container Widget
  • Width
  • Height
  • Box Shape
  • Child Alignment
  • Margin
  • Padding
  • Color
  • Border Properties
  • Decoration Image
  • Default Properties
  1. BUILDING UI
  2. Widgets
  3. Layout Widgets

Container

PreviousRowNextExpandable

Last updated 1 month ago

A Container is a versatile widget that's like a multi-purpose box. You can think of it as a way to decorate and position a child widget (a smaller component within your app's interface). It is helpful in dividing the screen into smaller logical parts and arranging and styling them.

For example, you can use a Container to give a background color, shape, or size to text or a button. It's like putting something in a box and then deciding how that box looks and where it sits on the screen.

Adding Container widget

Here's how you add & modify the Container widget:

  1. Select the Container widget from the Add Widget Button or add it directly from the widget tree.

  2. Inside the Container, you can add various widgets, and display them.

Customizing Container Widget

Width

You can set the Width of the Container on the screen, and also the Minimum as well as Maximum Width on the screen for responsiveness. You have two options,

  • For a specific size, choose PX and type in the size you want.

  • For a size based on the screen, choose % and type in the percentage.

Height

You can set the Height of the Container on the screen, and also the Minimum as well as Maximum Height on the screen for responsiveness. You have two options,

  • For a specific size, choose PX and type in the size you want.

  • For a size based on the screen, choose % and type in the percentage.

Box Shape

You can choose from Rectangle or Circle, and determine the shape of the Container widget.

Child Alignment

You can choose how you want the child widgets to be aligned. You can choose from 9 options: Top Left, Top Center, Top Right, Center Left, Center, Center Right, Bottom Left, Bottom Center and Bottom Right.

Margin

Padding

Color

You can customize the color of the Container, all the child widgets will be displayed on top of this.

Border Properties

If you want a Border for the Container, Border Radius, Border Width and Border Color can be customized as needed.

Decoration Image

If you want to have a Background Image for a Screen, this is the way to go.

To add a Background Image:

  1. Set an Image Source, you can choose from Image Types such as Network, Blurhash and Assets.

  2. Set the Image Opacity for clear visibility of child widgets.

  3. Choose from various Box Fit options.

  4. Align the image using Image Alignment property.

Default Properties

are the instructions for setting Margin.

are the instructions for setting Padding.

You can customize the appearance and behavior of this widget using the various properties available under the .

Here
Here
Widget Default Properties