0% found this document useful (0 votes)
28 views

Mobile Computing Lab4

The document discusses several Flutter widgets including StatefulWidget, SetState, SwitchListTile, RadioListTile, Stack, TextField, AppBar, Drawer, TabBar and BottomNavigationBar. It provides descriptions of their purpose and functionality.

Uploaded by

Mai gamal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views

Mobile Computing Lab4

The document discusses several Flutter widgets including StatefulWidget, SetState, SwitchListTile, RadioListTile, Stack, TextField, AppBar, Drawer, TabBar and BottomNavigationBar. It provides descriptions of their purpose and functionality.

Uploaded by

Mai gamal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

Mobile computing lab4

Eng : hamada mostafa Eng : fatma mohammed


Lab4 content
u Statefulwidget & SetState

u SwitchListTile

u RadioListTile

u Stack

u TextField

u Appbar

u Drawer

u Tabbar

u BottomNavigationBar
Statefulwidget & SetState

u StatefulWidget is a class in Flutter that represents a widget whose state can be


changed over time.

u setState is a method provided by StatefulWidget that allows you to update the state
of the widget and trigger a rebuild of the user interface.

u With StatefulWidget, you can create dynamic and interactive user interfaces by
managing the state of the widget.

u When you call setState, Flutter will rebuild the widget and its descendants, reflecting
the changes in the user interface.
SwitchListTile
u represents a ListTile with a switch that can be toggled on or off.
RadioListTile
u represents a ListTile with a radio button. It provides a convenient way to display a list of options
Stack
u used to overlay multiple widgets on top of each other

u allowing you to create complex layouts and designs

u It arranges its child widgets in a stack, where each child is positioned relative to the
stack's boundaries or other children.

u Positioning Widgets: Child widgets within the Stack can be positioned using the
Positioned widget.

u You can specify properties like top, bottom, left, right to determine the exact
position of each child widget within the stack.
TextField
u Text Input: The TextField widget allows users to enter and edit text. It provides a visual
interface for text input and displays the entered text.

u Input Validation: You can apply input validation to ensure that the entered text meets specific
criteria, such as length, format, or content. Flutter provides validators and input formatters that
can be used with the TextField widget to validate user input.

u Customization: Flutter allows you to customize the appearance of the TextField widget. You
can define the text style, decoration, hint text, input type (e.g., text, number, email), and more
to match the desired visual style and behavior of your app.

u Input Focus: The TextField widget can receive input focus, which means it can be selected for
text input. When a TextField has focus, it gains user interaction for text entry, and the keyboard
is displayed for input on mobile devices.
Appbar
u the AppBar is a user interface element used to display the top bar in your application.
The AppBar is part of the Scaffold widget, which is used to build the user interface in
Flutter.

u The AppBar displays the application title:

u You can use the AppBar to display the title of your application at the top of the screen.
You can set the text you want to display as the application title using the title property
of the AppBar.

u The AppBar is customizable:

u You can customize the AppBar according to your application's needs. You can change
the background color, text style, add icons or buttons, and more. The AppBar provides
properties like backgroundColor, actions, and leading for customization.
Drawer

u used to create a hidden side menu that can be revealed by swiping from
the left edge of the screen or by tapping on a menu icon.

u It's commonly used for navigation purposes, providing access to various


sections or features of an application.

u We define a Drawer widget as part of the Scaffold's drawer property.


Tabbar

u used to create a set of tabs that allow users to switch between different
sections or views within an application. Each tab typically represents a
distinct piece of content or functionality.

u widget in Flutter is a powerful tool for implementing tabbed navigation


interfaces, providing users awith an intuitive way to navigate between
different sections of an application. Its flexibility, customization options, and
accessibility features make it a valuable component for developers seeking
to build engaging and user-friendly applications.
Thanks !

You might also like