📲 Download Our Apps

EMI Calculator

Download EMI Calculator

SOA Games

Download SOA Games

SOA Technology App

Download SOA Technology

BMI Checker

Download BMI Checker

Task Jira

Download Task Jira

Laughing Adda

Download Laughing Adda

📅 हिंदी कैलेंडर ऐप डाउनलोड करें

Download Shubhcalendar App

Understanding Flutter Project Structure

when you run flutter create project_name, Flutter creates a big folder structure that can feel overwhelming at first. Don’t worry , we’ll go from basics and I’ll explain which files are important, and we’ll build step by step in VS Code.


Step 1: Understanding Flutter Project Structure

When you create a project (flutter create hello_world), you’ll see folders like:

hello_world/
 ├── android/        # Native Android code (Java/Kotlin)
 ├── ios/            # Native iOS code (Swift/Obj-C)
 ├── web/            # For web apps
 ├── lib/            # Your main Flutter code (MOST IMPORTANT )
 ├── test/           # For writing tests
 ├── pubspec.yaml    # Project settings + dependencies
 └── README.md

As a beginner, you mostly work in lib/ and pubspec.yaml.
The rest is handled automatically by Flutter.


Step 2: The Important File – lib/main.dart

This is where your app starts.
Inside you’ll see something like:

import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}
  • main() → starting point of every Dart program.
  • runApp() → tells Flutter to draw your app on the screen.
  • MyApp → root widget of your app.

Step 3: Simplest Hello World App

Let’s make the minimum code (ignore all other files for now):

import 'package:flutter/material.dart';

void main() {
  runApp(
    const Center(
      child: Text(
        'Hello World ',
        textDirection: TextDirection.ltr,
      ),
    ),
  );
}

This is the most basic Flutter app:

  • Center → places text in the center.
  • Text → displays “Hello World “.
  • textDirection → required in raw Flutter apps.

If you run this, you’ll see only Hello World on screen.


Step 4: Using MaterialApp (For Modern Apps)

Usually, we wrap the app inside MaterialApp for Android-like look:

import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: Text("My First App")),
        body: Center(
          child: Text(
            "Hello Flutter ",
            style: TextStyle(fontSize: 28, fontWeight: FontWeight.bold),
          ),
        ),
      ),
    );
  }
}

Step 5: What You Should Focus On First

  1. lib/main.dart → write your UI here.
  2. Widgets (Text, Container, Row, Column, Image, Button).
  3. pubspec.yaml → to add dependencies (like http, firebase, etc).



Leave a Reply

AI Spiritual Tools & Interactive Experiences

Explore powerful AI-driven tools for daily guidance, spirituality, fun quizzes, and self-discovery.

Today’s Quote

Get inspiring daily quotes powered by AI to motivate and guide your day.

Explore Now

AI Tarot Card Reader

Reveal insights about your future, love, and career with AI tarot readings.

Read Tarot

Love Match Calculator

Check compatibility and love predictions using AI-based analysis.

Check Match

Fortune Cookie

Open an AI fortune cookie and receive wisdom, luck, and fun messages.

Open Cookie

Quiz Categories

Engage with knowledge-based and fun quizzes across multiple categories.

Start Quiz

Panchang Calendar

View daily Panchang, auspicious timings, tithi, nakshatra, and festivals.

View Panchang

Online Numerology

Discover your destiny number, life path, and numerology predictions.

Calculate Now

Spiritual Feeds

Stay connected with spiritual thoughts, mantras, and divine content.

View Feeds

Quiz Hub

Attempt trending quizzes on GK, spirituality, festivals, and more.

Explore Quizzes