Irbisa · Cheatsheet
Flutter System Design
The design round: feeds, chat, offline-first sync and conflicts, live updates, media, background uploads, server-driven UI
You get 45 minutes in a mobile system design round: what do you spend them on, and what is the interviewer actually scoring?
Which mobile constraints do you raise in a design round (flaky network, process death, battery, old app versions), and how does each one change the design?
A Flutter home screen awaits five endpoints with
Future.waitand shows nothing until all answer. What do you change in the app, and what do you ask the backend for?Polling, long polling, server-sent events, WebSockets or push: how do you choose the transport for live updates in a Flutter app?
How would you design an offline-first Flutter app: what the screens read, where a write goes with no network, and what the UI shows until the server confirms?
// The row and its pending operation commit together or not at all.Future<void> renameNote(Database db, String id, String title) { final payload = jsonEncode({'title': title}); return db.transaction((txn) async { await txn.rawUpdate( "UPDATE notes SET title = ?, sync_state = 'pending' WHERE id = ?",…Two devices edit the same note offline and both sync later. How do you resolve the conflict (last write wins, field merge, CRDT), and what does each choice cost?
typedef Fields = Map<String, Object?>; /// Three-way merge of one record with scalar fields: a field changed on one/// side only takes that side's value; changed differently on both, a conflict.(Fields merged, Set<String> conflicts) mergeRecord({ required Fields base, // the version both edits started from…A field-sales app must search a 50,000-product catalogue offline. How do you design the first download, the delta updates and the local search index?
Design the feed of an Instagram-like app in Flutter: API and pagination, local cache, image loading, and a smooth scroll that keeps its position after a restart.
Design a TikTok-style vertical video feed in Flutter: preloading the next clips, a pool of players, memory limits, and what happens on a slow network.
Design a messenger like Telegram in Flutter: the transport, message states (sending, sent, read), an offline send queue and paging through years of history.
Design push notifications for a messenger: what the server sends, muting the push for the chat already open, grouping per chat, and clearing them once read elsewhere.
Design live courier tracking on a map: how location updates reach the customer's app, how the marker moves smoothly, and what the screen shows when updates stop.
Design a photo backup feature that uploads thousands of photos in the background, survives the app being killed, and respects battery and mobile data.
Design daily reminders for a habit tracker: local notifications at the user's local time that survive time-zone changes, reboots and weeks without opening the app.
// Runs after tz.initializeTimeZones(). Store the returned zone: on launch and// resume, reschedule every reminder if the device zone has changed.Future<String> scheduleDaily( FlutterLocalNotificationsPlugin plugin, { required int id, required int hour,…A trading screen gets thousands of price updates a second for 500 instruments. How do you design the pipeline from socket to widgets so the UI stays at 60 fps?
typedef Quote = ({String symbol, double price}); /// Thousands of ticks a second in, at most ten updates a second per row out.class QuoteBoard { QuoteBoard(Stream<List<Quote>> batches) { // a newer tick replaces one that nobody has seen yet…How would you build analytics and logging into a large Flutter app so events survive offline, respect consent, and the vendor can change without touching feature code?
Product wants to rearrange the home screen without a store release. When does server-driven UI pay off in Flutter, how do you build it, and where does it backfire?