The Flutter → iOS Mental Model

As a Senior Flutter Engineer, you already know how to build apps. You just speak a different dialect. This guide maps your existing knowledge to the Apple ecosystem.

1Core UI Concepts

Rendering & Widgets

Flutter
iOS (Swift/SwiftUI)
Widget
View (SwiftUI) / UIView (UIKit)
build() method
body property
StatelessWidget
View (struct)
StatefulWidget
View + @State
Context (BuildContext)
Environment / KeyPath

Critical Difference: The "State" Class

In Flutter, `StatefulWidget` creates a separate `State` class that persists. In SwiftUI, the `View` struct itself is destroyed and recreated, but the `@State` properties are managed by the runtime and persist outside the struct.

2State Management & Logic

Business Logic Components

Flutter
iOS (Swift/SwiftUI)
Cubit / BLoC
ViewModel (ObservableObject)
State Class (BlocState)
Published Properties
Stream<State>
Combine Publisher / AsyncSequence
BlocProvider
@StateObject / @EnvironmentObject
BlocListener
.onChange(of:) / .onReceive()

3Concurrency & Threading

Async Operations

Flutter
iOS (Swift/SwiftUI)
Isolate
Grand Central Dispatch (GCD) / Swift Task
Future<T>
Task<T, Error> / async function
compute() / Isolate.run()
Task.detached / DispatchQueue.global()

Project Structure

Files & Entry Points

Flutter
iOS (Swift/SwiftUI)
lib/main.dart
@main App.swift
pubspec.yaml
Project.xcodeproj / Package.swift
android/ & ios/ folders
Top level files
Assets (pubspec defined)
Assets.xcassets

Dependency Management

Flutter: Pub

  • pubspec.yaml: Central declarative file.
  • pub.dev: The central repository.
  • Lockfile: pubspec.lock.

iOS: The Mix

  • Swift Package Manager (SPM): The modern standard. Defined in `Package.swift` or via Xcode GUI.
  • CocoaPods: Old standard. Uses `Podfile` and ruby. Still used by many big libs (Firebase, RN).
  • Carthage: Manual binary Framework linking. Rare now.

Build Environments

Flavors vs Schemes

Flutter
iOS (Swift/SwiftUI)
--flavor dev
Build Configuration (Debug/Release)
main_dev.dart
Schemes (Product -> Scheme)
.env files
.xcconfig files

Pro Content Locked

Unlock the detailed implementation, source code, and senior interview questions.

One-time payment. Lifetime access.