惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

G
Google Developers Blog
宝玉的分享
宝玉的分享
月光博客
月光博客
B
Blog
云风的 BLOG
云风的 BLOG
Google DeepMind News
Google DeepMind News
Engineering at Meta
Engineering at Meta
aimingoo的专栏
aimingoo的专栏
N
Netflix TechBlog - Medium
博客园_首页
GbyAI
GbyAI
人人都是产品经理
人人都是产品经理
A
About on SuperTechFans
Y
Y Combinator Blog
L
LangChain Blog
有赞技术团队
有赞技术团队
D
Docker
爱范儿
爱范儿
博客园 - 司徒正美
H
Hackread – Cybersecurity News, Data Breaches, AI and More
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
酷 壳 – CoolShell
酷 壳 – CoolShell
Microsoft Security Blog
Microsoft Security Blog
D
DataBreaches.Net

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Flutter Interview Questions Every Developer Gets Asked (2...
Nikunj Sharma · 2026-06-14 · via DEV Community

Nikunj Sharma

I've interviewed at 6+ Flutter companies over the past year and noticed the same questions keep coming up — regardless of the company size or role level.

Here are the ones that actually matter for beginner to mid-level roles, with the key points interviewers are really listening for.


1. What's the difference between StatelessWidget and StatefulWidget?

The short answer: StatelessWidget is immutable — it renders once and never changes. StatefulWidget owns a State object that can call setState() to trigger a rebuild.

What interviewers want to hear: "I reach for StatelessWidget by default and only introduce State when I actually need the widget to react to changes." Overusing StatefulWidget is a red flag.

👉 Full answer with examples


2. What is BuildContext?

This trips up a lot of candidates. BuildContext is a handle to the widget's location in the widget tree — it's how Flutter resolves Theme.of(context), Navigator.of(context), and similar lookups.

The gotcha: using a BuildContext after the widget has been disposed causes a crash. Interviewers love asking this.

👉 Full answer with examples


3. var, final, and const — what's the difference?

  • var — type inferred, can be reassigned
  • final — set once at runtime, cannot be reassigned
  • const — compile-time constant, deeply immutable

The key distinction candidates miss: const is evaluated at compile time, final is evaluated at runtime. A DateTime.now() can be final but never const.

👉 Full answer with examples


4. What are Keys and when should you use them?

Keys help Flutter identify widgets when the widget tree changes structure — especially in lists with reorderable or removable items.

Without keys, Flutter matches widgets by type and position. If you remove item 0 from a list, Flutter might incorrectly reuse the state of item 1. A Key prevents this.

Most candidates know they exist but struggle to explain when they're needed. That's the interview question.

👉 Full answer with examples


5. async/await vs Future — what's the difference?

Future is the object that represents a value that will be available later. async/await is syntax sugar for working with Futures — it makes async code read like synchronous code.

They're not alternatives — async/await is built on top of Future. You still need to understand Future chaining (.then(), .catchError()) for interviews.

👉 Full answer with examples


6. What's the Flutter widget lifecycle?

For StatefulWidget:

  1. createState()
  2. initState() — runs once, good for subscriptions and controllers
  3. didChangeDependencies() — runs when an InheritedWidget changes
  4. build() — runs every rebuild
  5. didUpdateWidget() — runs when parent rebuilds with new config
  6. dispose() — cleanup: cancel subscriptions, dispose controllers

Interviewers specifically ask about initState vs didChangeDependencies and what should go in each.

👉 Full answer with examples


7. Hot reload vs hot restart

  • Hot reload — injects updated code, preserves state. Works for UI changes.
  • Hot restart — restarts the app from scratch, resets state. Needed for changes to main(), global variables, or initState().

Simple question, but surprisingly many candidates mix these up under pressure.

👉 Full answer with examples


8. Provider vs Riverpod vs BLoC — which should you use?

The honest answer: it depends on team size and complexity.

  • Provider — simple, built on InheritedWidget, good for small apps
  • Riverpod — Provider's spiritual successor, compile-safe, testable, better DX
  • BLoC — explicit events/states, great for large teams needing strict separation

The interview trap: many candidates pick one and dismiss the others. The right answer is knowing the trade-offs and defending your choice with context.

👉 Full answer with comparison


Want to prep all 39 beginner questions?

These 8 are just the ones I see most often. There are 31 more in the beginner track alone — covering Dart fundamentals, rendering, navigation, and layout.

I built PrepFlutter specifically for this — structured tracks from beginner to advanced, plus a live coding section with real interview problems. Free to use.

The full beginner track: prepflutter.com/tracks/beginner


If you're preparing for Flutter interviews, drop a comment with the question that stumped you most — happy to help.