cover-img

Introduction to Flutter Widgets

29 March, 2023

1

1

0

Uhm! So what are widgets in flutter?

Short answers

  • Every UI display element is a widget
  • If you’re from a React, Vue or Angular background, think of Widget as a Component
  • You can also think of Widget as re-usable code displayed to the user

Long Answer

A widget in the Flutter programming language is a segment of code that simulates a visual element or a structural element in an app's user interface (UI). A Flutter app is made out of reusable sections (Widgets), which may be combined to make intricate and aesthetically pleasing layouts..

There are two types of widgets in Flutter: stateless and stateful.

Stateless widget

Stateless widgets are immutable, which means that once they are formed, their properties cannot be altered. These widgets are effective and lightweight, making them appropriate for UI elements that are static and never need to change. Text, pictures, and icon widgets are a few examples of stateless widgets.

Stateful widget

On the other hand, stateful widgets have the ability to alter their state over time and can be redrawn on the screen when this occurs. These widgets are often used for user interface (UI) interactive features that require user input or data changes from the program. Button, text-field, and slider widgets are a few examples of stateful widgets.

Visual Explanation

We would explain these two concepts in details in the subsequent shows.

Here are some references that you may find useful for learning more about widgets in Flutter:

1

1

0

ShowwcaseHQ

San Francisco, CA, USA

Showwcase is where developers hang out and find new opportunities together as a community

More Articles

Showwcase is a professional tech network with over 0 users from over 150 countries. We assist tech professionals in showcasing their unique skills through dedicated profiles and connect them with top global companies for career opportunities.

© Copyright 2024. Showcase Creators Inc. All rights reserved.