تطبيق بسيط جدا 03 - تعلم برمجة تطبيقات الموابايل باستخدام فلاتر : Scaffold Widget - Flutter

تطبيق بسيط جدا 03 - تعلم برمجة تطبيقات الموابايل باستخدام فلاتر : Scaffold Widget - Flutter

How to Create a Scaffold Widget in Flutter

Introduction to Scaffold Widget

  • The video begins with the presenter, Ammar, introducing the topic of creating a scaffold widget within an app. He mentions that this is part of a series on mobile application programming using Flutter.

Understanding Scaffold Widget Features

  • The presenter explains that once the app widget is created, various components like text widgets, image widgets, and action buttons can be utilized. Today’s focus is on learning about the scaffold widget.
  • Ammar advises viewers to read the official Flutter documentation for more insights into the scaffold widget.

Modifying the Scaffold Widget

  • The presenter demonstrates how to remove existing elements from the center of the scaffold and replace them with new content.
  • He introduces adding a "home" property within the scaffold widget.

Adding AppBar Property

  • Ammar discusses how to use the scaffold widget effectively by adding properties such as AppBar.
  • He explains that AppBar is a pre-designed component from Google that adds a top bar or menu at the screen's top.

Customizing AppBar Elements

  • Viewers are encouraged to explore different customization options for AppBar through Flutter documentation, including titles and icons.
  • Ammar shows how to set up an AppBar title using text widgets and emphasizes writing in Arabic if desired.

Implementing Background Color Changes

Refreshing Application UI

  • After implementing changes, Ammar refreshes the application interface showing an app bar with a title and body content.

Changing Background Color of AppBar

  • The presenter highlights how to change background colors using specific properties in Flutter's documentation.
  • He notes that property names should start with lowercase letters and end with colons when defining them.

Working on Body Content

Setting Up Body Properties

  • Ammar transitions into modifying body properties within the scaffold widget.
  • He explains how to add background color properties for complete application styling.

Adding Image Widgets

  • The presenter introduces image widgets as essential components for displaying images in applications.
  • He elaborates on different methods for incorporating images (e.g., asset images or network images), emphasizing their importance in enhancing visual appeal.

Working with Images in Flutter Applications

Opening and Displaying Images

  • The discussion begins with selecting an image and opening it in a new tab using the right-click context menu. This allows for copying the image link to use within the application.
  • It is emphasized that the application must display images correctly, which requires an internet connection or troubleshooting any issues preventing image visibility.

Centering Widgets and Image Placement

  • Previous lessons on centering text are referenced, indicating that similar methods will be applied to center images using a Center Widget.
  • A simpler method for adding widgets is introduced, where users can create a new widget by clicking or using keyboard shortcuts to access options quickly.

Structuring Widgets

  • The structure of placing images within rows or columns is discussed, highlighting how images can be nested inside other widgets like Center Widget automatically.
  • The creation of a simple application layout using Scaffold is mentioned, including elements like an app bar and background color adjustments.

Finalizing Application Components

  • The use of TextWidget for naming components is noted as part of finalizing the user interface.
  • An important addition includes implementing BodyProperty, which displays an image from the internet through ImageWidget.

Understanding Widget Hierarchy

  • The central body of the application utilizes CenterWidget to position elements effectively.
  • A breakdown of component materials reveals that they reside within a Scaffold containing various elements such as lists and background colors.

Component Relationships and Future Learning

  • Three main components directly exist within Scaffold: AppBar, Body, and Background Color.
  • Each widget contains children elements; for instance, Center Widget houses an Image Widget, which serves as a frame for displaying images.
  • The hierarchy illustrates how components are nested within one another while defining properties for each widget.
  • Future videos will cover additional methods for displaying images stored locally in project files. Viewers are encouraged to subscribe for updates on upcoming content.
Video description

في هذا الفيديو سنتعلم إنشاء شريط أو قائمة علوية للتطبيق ومن ثم البدء بجسم التطبيق ووضع صورة في منتصفه، وذلك باستخدام مكون من فلاتر اسمه Scaffold أنا اسمي عمار, مبرمج تطبيقات واعمل حاليا في النمسا ولدي شركة برمجة بالإضافة لعملي في شركة خاصة. على قناتي ستجد كل دروس وفيديوهات عن البرمجة وتصميم مواقع الوب وتطبيقات الموبايل. لا تضغطوا على هاد الرابط مشان ما تشتركوا بالقناة :-) https://www.youtube.com/channel/UCUj5SNo-SZap_igV36F7XRg?sub_confirmation=1 Scaffold Widget - https://api.flutter.dev/flutter/material/Scaffold-class.html AppBar Class - https://api.flutter.dev/flutter/material/AppBar-class.html Image Class - https://api.flutter.dev/flutter/widgets/Image-class.html https://flutter.dev https://develooper.io ammar@develooper.io