Skip to content

Latest commit

 

History

History
321 lines (252 loc) · 6.36 KB

QUICKSTART.md

File metadata and controls

321 lines (252 loc) · 6.36 KB

Quick Start Guide - Student Management System

Prerequisites

  • Flutter SDK 3.0+ (Download)
  • Dart SDK (comes with Flutter)
  • Android Studio / VS Code
  • Android device or emulator

Step 1: Setup Flutter Environment

Windows

# Extract Flutter SDK
# Add to PATH environment variable
# Run doctor to check setup
flutter doctor

macOS

# Install using Homebrew
brew install flutter

# Or download and add to PATH
export PATH="$PATH:~/flutter/bin"

flutter doctor

Linux

# Download Flutter
wget https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_*.tar.xz

# Extract and add to PATH
export PATH="$PATH:~/flutter/bin"

flutter doctor

Step 2: Create/Clone Project

Option A: Clone Repository

git clone <project-url>
cd student_management_system

Option B: Create New Project

flutter create student_management_system
cd student_management_system

Step 3: Setup Project Files

  1. Copy pubspec.yaml to your project root

  2. Create directory structure:

    lib/
    ├── main.dart
    ├── models/
    │   └── student.dart
    ├── services/
    │   └── database_service.dart
    └── screens/
        ├── home_screen.dart
        ├── students_list_screen.dart
        ├── add_student_screen.dart
        └── student_detail_screen.dart
    
  3. Copy all .dart files to respective directories

Step 4: Install Dependencies

cd student_management_system
flutter pub get

This will download and install:

  • sqflite (SQLite database)
  • provider (state management)
  • intl (date formatting)
  • And other dependencies

Step 5: Run the App

On Emulator

# List available emulators
flutter emulators

# Launch emulator
flutter emulators --launch <emulator-name>

# Run app
flutter run

On Physical Device

# Enable USB Debugging on your Android device
# Connect via USB
# Verify connection
flutter devices

# Run app
flutter run

Step 6: Build APK

Debug APK

flutter build apk --debug
# Output: build/app/outputs/flutter-apk/app-debug.apk

Release APK

flutter build apk --release
# Output: build/app/outputs/flutter-apk/app-release.apk

App Bundle (for Play Store)

flutter build appbundle --release
# Output: build/app/outputs/bundle/release/app-release.aab

Verification Checklist

  • Flutter SDK installed and PATH set
  • Android SDK configured
  • Emulator or device ready
  • All project files in correct directories
  • flutter pub get completed
  • No errors in flutter doctor
  • App runs without errors
  • Can add/view/edit students

Common Issues & Solutions

Issue: "flutter command not found"

Solution: Add Flutter to PATH

export PATH="$PATH:$(pwd)/flutter/bin"

Issue: "Android SDK not found"

Solution: Set ANDROID_HOME

export ANDROID_HOME=~/Android/Sdk
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools

Issue: "No devices found"

Solution:

  • Connect device and enable USB debugging
  • Or launch emulator first

Issue: "Database error on startup"

Solution: Clean and rebuild

flutter clean
flutter pub get
flutter run

Issue: "Gradle build failed"

Solution:

cd android
./gradlew clean
cd ..
flutter run

Project Structure Explanation

student_management_system/
├── lib/                          # All Dart code
│   ├── main.dart                 # App entry point
│   ├── models/                   # Data models
│   │   └── student.dart
│   ├── services/                 # Business logic
│   │   └── database_service.dart
│   └── screens/                  # UI screens
│       ├── home_screen.dart
│       ├── students_list_screen.dart
│       ├── add_student_screen.dart
│       └── student_detail_screen.dart
├── android/                      # Android native code
├── ios/                          # iOS native code (if needed)
├── pubspec.yaml                  # Dependencies
├── pubspec.lock                  # Lock file
└── README.md                     # Documentation

Development Workflow

1. Hot Reload

# Make code changes
# Press 'r' in terminal to hot reload
# Changes appear instantly

2. Hot Restart

# For state changes or dependencies
# Press 'R' in terminal

3. Debug Mode

# Run with verbose logging
flutter run -v

Testing the App

Basic Testing

  1. Add Student: Fill form and save
  2. View Students: Check dashboard and list
  3. Search: Test search functionality
  4. Filter: Test class filtering
  5. Edit: Update student info
  6. Delete: Remove a student
  7. Stats: Verify GPA and attendance calculations

Performance Testing

# Profile app performance
flutter run --profile

# Trace app performance
flutter run --trace-startup

Publishing to Play Store

  1. Create signing key:

    keytool -genkey -v -keystore ~/key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias key
  2. Configure signing in android/app/build.gradle

  3. Build release APK/Bundle:

    flutter build appbundle --release
  4. Upload to Play Store:

    • Sign up for Play Store Developer account
    • Create new app
    • Upload bundle
    • Fill in app details
    • Submit for review

Next Steps

  1. ✅ Complete Quick Start
  2. 📚 Read full README.md
  3. 🎨 Customize theme colors
  4. 📦 Add more features
  5. 🚀 Build and release

Useful Commands

# Check Flutter setup
flutter doctor

# Get dependencies
flutter pub get

# Update dependencies
flutter pub upgrade

# Run tests
flutter test

# Format code
flutter format .

# Analyze code
flutter analyze

# Build and run
flutter run -v

# Stop running app
# Press Ctrl+C

# Clear build cache
flutter clean

Resources

Getting Help

  1. Check flutter doctor output
  2. Read error messages carefully
  3. Search Flutter documentation
  4. Check StackOverflow for similar issues
  5. File bug report if needed

Happy coding! 🚀