Mobile Computing Lab4
Mobile Computing Lab4
u SwitchListTile
u RadioListTile
u Stack
u TextField
u Appbar
u Drawer
u Tabbar
u BottomNavigationBar
Statefulwidget & SetState
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 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 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 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 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.