Flutter AppBar Widget Hindi #9

Опубликовано: 17 Март 2026
на канале: Sourav Bapari
65
3

he AppBar widget in Flutter is a fundamental component used to create the app bar or top navigation bar in your application. It is typically placed at the top of the screen and serves as a title bar for the app. The AppBar provides a consistent and familiar user interface element that users can interact with to navigate or perform actions within the app.

Key features and properties of the AppBar widget include:

Title: The AppBar can have a title, which is usually displayed at the center of the app bar. It provides context to the user about which screen or page they are currently viewing.

Leading Widget: The leading widget is displayed on the left side of the app bar and is commonly used for navigation elements like a back button or a drawer icon.

Trailing Widgets: The trailing widgets are displayed on the right side of the app bar. They can be used to add action buttons, icons, or any other widgets relevant to the current screen.

Actions: Actions are a list of widgets that appear as a drop-down menu when the user taps the overflow menu icon (three vertical dots) on the app bar. It allows you to include additional actions or options that don't fit within the limited space of the app bar.

Background Color: You can customize the background color of the app bar using the backgroundColor property.

Elevation: The AppBar can have a shadow effect (elevation) to give it a visual prominence over the rest of the screen. You can control the elevation using the elevation property.

Preferred Height: By default, the AppBar automatically adjusts its height based on the platform guidelines. However, you can set a specific height using the toolbarHeight property.

Brightness: The brightness of the AppBar's content can be adjusted using the brightness property, which can be set to Brightness.light or Brightness.dark.