Flutter Simple Project

Tuturial Video

👉 Each element on a screen of the flutter app is a Widget

👉 Boilerplate code for flutter project :


import 'package:flutter/material.dart';
void main() {
  runApp(const MyApp());
}
 
class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);
 
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      theme: ThemeData.light(useMaterial3: true),
      home: testttttt(),
    );
  }
}
Scaffold widget & AppBar widget
Scaffold & AppBar
Widgetpropertiesالمصدر
Scaffold(the parent widget
  • appBar → AppBar()
  • body → widget
AppBar(at the top of the screen
  • leading → Widget
  • title → Widget
  • centerTitle → bool
  • actions → List<Widget>
  • elevation → double
Text widget & TextStyle widget
To add text
Widgetpropertiesالمصدر
Text(to add text
  • "data"
  • maxLines → int
  • overflow → TextOverflow
  • textAlign → TextAlign
  • textDirection → TextDirection
  • style → TextStyle(
TextStyle(to style the text
  • backgroundColor → Color
  • color → Color
  • decoration → TextDecoration
  • fontSize → double
  • fontStyle → FontStyle
  • fontWeight → FontWeight
  • height → double
  • letterSpacing → double
  • wordSpacing → double
  • fontFamily → String
Icon widget & IconButton widget
To add icon
Widgetpropertiesالمصدر
Icon(to show icon
  • Icons.favorite
  • color: Colors.pink
  • size: 24.9
IconButton(for clickable icon
  • icon: const Icon(Icons.add),
  • onPressed: (){}

👉 Final project :

simple flutter project
😡
انت مشغل الـ AdBlock !!

ياريت تقفله لوسمحت 😊 😊

تنبيه هام ✋

إذا كانت الإعلانات مزعجة بالنسبة لك، فيُمكنك التبرع ب50$ وسيتم إيقاف الإعلانات لمدة شهر لجميع زوار الموقع 🧡 ويُمكنك التواصل معنا عن طريق صفحة الفيس بوك