Lecture 8
Lecture 8
Lecture 8
2023 2024
11/21/2023
Flutter
المرجع
Flutter documentation
11/21/2023
TextField class
• A text field lets the user enter text, either with hardware keyboard or
with an onscreen keyboard.
• The text field calls the onChanged callback whenever the user
changes the text in the field.
• To control the text that is displayed in the text field, use the controller.
For example, to set the initial value of the text field, use
a controller that already contains some text
• By default, a text field has a decoration that draws a divider below the
text field. You can use the decoration property to control the
decoration, for example by adding a label or an ico
11/21/2023
TextField class
Properties
• minLines The minimum number of lines to occupy when the content spans
fewer lines
• autofocus Whether this text field should focus itself if nothing else is
already focused.
• controller Controls the text being edited.
• decoration The decoration to show around the text field.
• maxLength The maximum number of characters (Unicode grapheme
clusters) to allow in the text field.
• maxLines The maximum number of lines to show at one time, wrapping if
necessary.
• keyboardType The type of keyboard to use for editing the text.
11/21/2023
Drawer class
11/21/2023
BottomNavigationBar class
11/21/2023
BottomNavigationBar
Properties
• backgroundColor The color of the BottomNavigationBar itself.
• currentIndex The index into items for the current active
BottomNavigationBarItem.
• elevation The z-coordinate of this BottomNavigationBar.
• items Defines the appearance of the button items that are arrayed
within the bottom navigation bar.
• onTap Called when one of the items is tapped.
• selectedItemColor The color of the selected
BottomNavigationBarItem.icon and BottomNavigationBarItem.label.
• unselectedItemColor The color of the unselected
BottomNavigationBarItem.icon and BottomNavigationBarItem.labels.
11/21/2023