🌍 Mobile App Development · subject

Mobile App Development Cross-Platform Development Syllabus

The Cross-Platform Development syllabus for Mobile App Development in full: 6 chapters and 20 topics, every one listed below, plus 64 Cross-Platform Development flashcards with answers.

6Chapters
20Topics
64Flashcards

Cross-Platform Development syllabus: all 6 chapters

Expand any chapter to see its topics and sub-topics.

  1. Flutter Fundamentals

    4 topics
    • Widgets and Widget Tree
    • Material and Cupertino Widgets
    • Navigation and Routing
    • Asset and Font Management
  2. Flutter State Management

    3 topics
    • setState and InheritedWidget
    • Provider and Riverpod
    • BLoC Pattern
  3. React Native Fundamentals

    4 topics
    • Core Components and JSX
    • Styling and Flexbox
    • Navigation (React Navigation)
    • Expo vs Bare Workflow
  4. React Native State and Data

    3 topics
    • Hooks and Component State
    • Context and Redux
    • Data Fetching and React Query
  5. Native Modules and Bridges

    3 topics
    • Platform Channels in Flutter
    • Native Modules in React Native
    • Accessing Device APIs
  6. Cross-Platform Trade-offs

    3 topics
    • Performance Considerations
    • Platform-Specific Code
    • Code Sharing and Kotlin Multiplatform

Mobile App Development Cross-Platform Development flashcards — 64 questions with answers

  1. In Flutter, what is a widget and what is the "widget tree"?

    A widget is an immutable description of part of the UI. The widget tree is the hierarchical composition of these widgets (parents nesting children) that Flutter uses to build the interface; the framework builds an element tree and render tree from it to actually paint pixels.

  2. In Flutter, what is the key difference between a StatelessWidget and a StatefulWidget?

    A StatelessWidget is immutable and has no mutable internal state (rebuilds only when inputs change). A StatefulWidget pairs with a separate State object that persists across rebuilds and can call setState() to trigger UI updates when its data changes.

  3. In Flutter's widget tree, what is the difference between the Widget tree, the Element tree, and the RenderObject tree?

    The Widget tree is the immutable configuration. The Element tree is the mutable instantiation that manages lifecycle and links widgets to render objects. The RenderObject tree handles layout, painting, and hit-testing. Elements provide the stable identity that lets Flutter efficiently reuse render objects across rebuilds.

  4. In Flutter, what is the purpose of a Key on a widget?

    A Key preserves widget/element identity across rebuilds so Flutter can correctly match old elements to new widgets, especially in lists of same-type widgets. ValueKey, ObjectKey, and UniqueKey are local keys; GlobalKey uniquely identifies a widget app-wide and gives access to its State or BuildContext.

  5. In Flutter, what are Material and Cupertino widgets, and when do you use each?

    Material widgets (MaterialApp, Scaffold, AppBar) implement Google's Material Design, typically for Android/cross-platform. Cupertino widgets (CupertinoApp, CupertinoNavigationBar) implement Apple's iOS design language. Use Material for a unified look or Cupertino to match native iOS appearance.

  6. In Flutter, what does the Scaffold widget provide?

    Scaffold implements the basic Material visual layout structure: it provides slots for an appBar, body, floatingActionButton, drawer, bottomNavigationBar, and snackbars/bottom sheets, managing their placement on the screen.

  7. In Flutter, contrast Container versus SizedBox and Row/Column as layout widgets.

    Container is a convenience widget combining padding, margins, decoration, and constraints. SizedBox forces a specific width/height (or adds fixed spacing). Row lays children horizontally and Column lays them vertically, both controlled by mainAxisAlignment and crossAxisAlignment.

  8. In Flutter, what is the difference between Expanded and Flexible inside a Row or Column?

    Both distribute free space along the main axis by a flex factor. Expanded forces the child to fill all allotted space (flex fit = tight). Flexible allows the child to be at most that size but can be smaller (flex fit = loose). Expanded is Flexible with fit: FlexFit.tight.

  9. In Flutter, how do Navigator.push and Navigator.pop manage screens?

    Flutter uses a stack of Route objects. Navigator.push(context, MaterialPageRoute(...)) pushes a new screen onto the stack; Navigator.pop(context) removes the top route and returns to the previous one, optionally passing a result value back.

  10. In Flutter, what is the difference between imperative (Navigator 1.0) and declarative (Navigator 2.0 / Router) navigation?

    Navigator 1.0 is imperative: you call push/pop directly to mutate the stack. Navigator 2.0 (the Router API with Pages) is declarative: the entire navigation stack is derived from app state, enabling better deep linking and web URL synchronization. Packages like go_router wrap this.

  11. In Flutter, how do you define and use named routes?

    You register a map in MaterialApp's routes: parameter (e.g. '/details': (context) => DetailsScreen()) or use onGenerateRoute. Then navigate with Navigator.pushNamed(context, '/details'), optionally passing arguments via the arguments parameter.

  12. In Flutter, how are assets like images declared and loaded?

    Assets are declared under the flutter: assets: section of pubspec.yaml with their paths. They are loaded at runtime via widgets like Image.asset('path') or the rootBundle/AssetBundle APIs (e.g. rootBundle.loadString for text).

  13. In Flutter, how do you add and use a custom font?

    Declare the font family and its .ttf/.otf files (with weight/style) under flutter: fonts: in pubspec.yaml. Then apply it with TextStyle(fontFamily: 'MyFont'), or set it globally in ThemeData's textTheme.

  14. In Flutter, how does resolution-aware asset selection work with directories like 2.0x and 3.0x?

    Flutter looks for variants in subdirectories named by device pixel ratio (e.g. 2.0x/, 3.0x/) next to the main asset. At runtime it picks the variant matching the device's devicePixelRatio, so a $2.0\times$ screen loads the 2.0x image automatically.

  15. In Flutter, what does setState() do and what are its limitations?

    setState() notifies the framework that a State object's internal data changed, scheduling a rebuild of that widget's subtree. Limitations: it only rebuilds locally, does not scale for sharing state across distant widgets, and calling it after dispose or during build causes errors.

  16. In Flutter, what is an InheritedWidget and what problem does it solve?

    InheritedWidget efficiently propagates data down the tree so descendants can access it via context.dependOnInheritedWidgetOfExactType() without passing it manually through constructors (avoiding "prop drilling"). Dependent widgets rebuild automatically when the InheritedWidget's data changes. Theme and MediaQuery use it internally.

  17. In Flutter, how does an InheritedWidget decide whether dependent widgets should rebuild?

    By overriding updateShouldNotify(oldWidget), which returns a bool. If it returns true when the new data differs from the old, all registered dependents are rebuilt; if false, they are not notified. This gives fine-grained control over rebuild propagation.

  18. What is the Provider package in Flutter, and how does it relate to InheritedWidget?

    Provider is a wrapper around InheritedWidget that simplifies dependency injection and state management. You expose values with providers (Provider, ChangeNotifierProvider) and consume them via context.watch/read or Consumer, avoiding boilerplate while getting scoped, rebuild-efficient access.

  19. In Flutter's Provider, what is the difference between context.watch, context.read, and context.select?

    context.watch<T>() subscribes and rebuilds the widget when T changes. context.read<T>() gets the value once without listening (use in callbacks). context.select<T,R>() listens to only a specific derived value R, rebuilding only when that slice changes for finer performance control.

  20. What is Riverpod, and what advantages does it claim over Provider?

    Riverpod is a rewrite of Provider that is compile-safe and does not depend on the widget tree/BuildContext. Advantages: providers are global and testable, no ProviderNotFoundException at runtime, supports multiple providers of the same type, and offers auto-dispose and family modifiers.

Show the other 44 Cross-Platform Development flashcards
  1. In Riverpod, what are the main provider types (Provider, StateProvider, FutureProvider, NotifierProvider)?

    Provider exposes a read-only/computed value. StateProvider holds simple mutable state. FutureProvider (and StreamProvider) expose async data as AsyncValue. NotifierProvider/AsyncNotifierProvider expose complex mutable state managed by a Notifier class with methods.

  2. What is the BLoC pattern in Flutter?

    BLoC (Business Logic Component) separates business logic from UI using streams. The UI sends Events into the BLoC, which processes them and emits States out through a stream; widgets rebuild in response to new states. It promotes testability and clear separation of concerns.

  3. In the flutter_bloc package, what is the difference between Bloc and Cubit?

    A Cubit is a simpler component that exposes methods which directly emit new states (no events). A Bloc is event-driven: you add Events and map them to States via event handlers. Cubit has less boilerplate; Bloc offers better traceability of what triggered each state change.

  4. In flutter_bloc, what do BlocProvider, BlocBuilder, and BlocListener do?

    BlocProvider injects a bloc/cubit into the widget tree. BlocBuilder rebuilds UI in response to state changes. BlocListener runs side-effects (navigation, snackbars) on state changes without rebuilding. BlocConsumer combines builder and listener.

  5. In React Native, what are the core components View, Text, and Image, and how do they map to native?

    View is the fundamental container (maps to UIView on iOS / android.view on Android), similar to a div. Text renders and nests text (must wrap all text). Image displays images from network, local assets, or base64. These compile to real native views, not web elements.

  6. In React Native / React, what is JSX?

    JSX is a syntax extension for JavaScript that lets you write HTML-like markup inside JS. It compiles (via Babel) to React.createElement calls returning React elements. In React Native, JSX tags are core components (View, Text) rather than DOM tags.

  7. In React Native, how does styling differ from web CSS?

    Styles are written as JavaScript objects (usually via StyleSheet.create), use camelCase property names (backgroundColor), and there is no cascade/inheritance except limited Text nesting. All dimensions are unitless density-independent pixels, and layout uses Flexbox by default.

  8. In React Native, why is StyleSheet.create preferred over inline style objects?

    StyleSheet.create validates styles at creation, can send them once over the bridge by reference (an id) instead of recreating objects each render, and improves readability. It reduces per-render allocation and provides a single place to manage styles.

  9. In React Native Flexbox, how does the default flexDirection differ from web CSS?

    In React Native the default flexDirection is column (vertical main axis), whereas in web CSS the default is row. Other Flexbox properties (justifyContent, alignItems, flex) behave similarly but with this different default orientation.

  10. In Flexbox, what is the difference between justifyContent and alignItems?

    justifyContent aligns children along the main axis (the flexDirection). alignItems aligns children along the cross axis (perpendicular to the main axis). For flexDirection: column, justifyContent is vertical and alignItems is horizontal.

  11. In React Native Flexbox, what does the flex property do on a single number like flex: 1?

    flex: 1 makes a component expand to fill available space along the main axis. When siblings all have flex values, space is distributed proportionally: a child's share is $\frac{\text{its flex}}{\sum \text{flex}}$ of the free space. flex: 0 sizes to content.

  12. What is React Navigation, and what are its main navigator types?

    React Navigation is the standard routing library for React Native. Main navigators: Stack Navigator (push/pop screens with transitions), Native Stack (uses native primitives), Bottom Tab Navigator (tabbed bottom bar), and Drawer Navigator (side menu).

  13. In React Navigation, how do you move between screens and pass parameters?

    Use navigation.navigate('ScreenName', { id: 42 }) to go to a screen with params, navigation.push to add a new instance, and navigation.goBack() to return. The target screen reads params via route.params (e.g. route.params.id).

  14. In React Navigation, what is the difference between navigation.navigate and navigation.push?

    navigate goes to an existing route if it's already in the stack (or adds it), avoiding duplicate screens. push always adds a new instance on top of the stack even if the same screen already exists, allowing repeated stacking of the same route.

  15. In React Native, what is the difference between the Expo managed workflow and the bare workflow?

    The Expo (managed) workflow abstracts away native iOS/Android projects; you write only JS/TS and Expo handles builds via EAS, with a curated set of native APIs. The bare workflow exposes the native android/ and ios/ folders, giving full control to add any native module at the cost of managing native code yourself.

  16. In Expo, what are development builds and config plugins, and how do they bridge managed and bare workflows?

    A development build is a custom Expo client containing your chosen native dependencies, letting you use libraries beyond Expo Go while staying in a managed-like flow. Config plugins programmatically modify native project config during prebuild, so you can add native functionality without manually leaving the managed workflow.

  17. In React, what are Hooks and what two rules govern them?

    Hooks are functions (useState, useEffect, etc.) that let function components use state and lifecycle features. Rules: (1) only call Hooks at the top level, never inside loops/conditions/nested functions; (2) only call Hooks from React function components or custom Hooks. This keeps Hook call order stable across renders.

  18. In React, how does the useState Hook manage component state?

    useState(initial) returns a [state, setState] pair. Calling setState with a new value (or an updater function prevState => next) schedules a re-render with the updated value. State updates are asynchronous/batched, and the updater form should be used when the new value depends on the previous one.

  19. In React, what does the useEffect Hook do and how does its dependency array control it?

    useEffect runs side effects after render. The dependency array controls when it re-runs: [] runs once after mount, [a, b] re-runs whenever a or b change, and omitting the array runs after every render. Returning a cleanup function runs it before the next effect and on unmount.

  20. In React, when should you use useReducer instead of useState?

    Use useReducer for complex state logic with multiple sub-values or when the next state depends on the previous in intricate ways. It centralizes update logic in a reducer(state, action) function and returns [state, dispatch], making transitions predictable and easier to test than scattered setState calls.

  21. In React, what problem does the Context API solve and how is it used?

    Context avoids prop drilling by sharing values (theme, user, locale) across the tree without passing props at every level. You create a context with createContext, wrap the tree in a <Context.Provider value={...}>, and read it in descendants with useContext(Context).

  22. In React, what is a key limitation of Context regarding re-renders?

    When a Context Provider's value changes, all consuming components re-render, even if they only use part of the value. Context is not optimized for high-frequency updates; for that, split contexts, memoize the value, or use a dedicated state library like Redux/Zustand.

  23. What is Redux, and what are its three core principles?

    Redux is a predictable state container. Principles: (1) single source of truth — one immutable store holds all state; (2) state is read-only — you change it only by dispatching actions; (3) changes are made with pure reducer functions (state, action) => newState. Redux Toolkit is the recommended modern implementation.

  24. In Redux, describe the unidirectional data flow of an action.

    A component dispatches an action (a plain object with a type). The store passes the current state and action to the reducer, which returns a new state. Subscribed components then re-render with the updated store state. Data flows one way: dispatch → reducer → store → view.

  25. What is React Query (TanStack Query), and what problem does it solve?

    React Query manages server state: fetching, caching, synchronizing, and updating asynchronous data. It handles caching, background refetching, deduplication, and loading/error states declaratively, removing the need to store server data manually in Redux/useState and reducing boilerplate for data fetching.

  26. In React Query, what is the difference between useQuery and useMutation?

    useQuery is for reading/fetching data; it caches by a queryKey and returns data, isLoading, error, and refetch. useMutation is for creating/updating/deleting data (side-effecting writes); it returns a mutate function and can invalidate queries on success to trigger refetches.

  27. In React Query, what do staleTime and cacheTime (gcTime) control?

    staleTime is how long fetched data is considered fresh; while fresh, no background refetch occurs. cacheTime/gcTime is how long inactive (unused) query data stays in cache before garbage collection. Larger staleTime reduces network calls; gcTime governs memory retention of unmounted queries.

  28. In Flutter, what is a Platform Channel and what is its purpose?

    A Platform Channel is the mechanism for communication between Dart code and native platform code (Kotlin/Java on Android, Swift/Objective-C on iOS). It lets Flutter invoke platform-specific APIs not covered by the framework by passing asynchronous messages across the boundary.

  29. In Flutter, what are the differences between MethodChannel, EventChannel, and BasicMessageChannel?

    MethodChannel invokes discrete named methods and returns a single async result (request/response). EventChannel streams a continuous sequence of events from native to Dart (e.g. sensor updates). BasicMessageChannel passes arbitrary structured messages both ways using a codec. All identify by a unique channel name string.

  30. In Flutter Platform Channels, how is data serialized across the boundary?

    Data is serialized using a message codec (default StandardMessageCodec), which supports primitives, strings, byte buffers, lists, and maps. Calls are asynchronous; Dart awaits a Future while the native side handles the call on its main thread and sends back a result, error, or notImplemented.

  31. In React Native, what is a Native Module?

    A Native Module is native code (Java/Kotlin or Objective-C/Swift) exposed to JavaScript, letting JS call platform APIs or reuse existing native libraries. You register methods that JS can invoke; results are returned via callbacks, Promises, or events across the bridge.

  32. In React Native, what is the New Architecture's replacement for the bridge, and what are TurboModules and Fabric?

    The New Architecture replaces the asynchronous JSON bridge with the JSI (JavaScript Interface), allowing synchronous, direct JS-to-native calls. TurboModules are the new lazily-loaded native modules using JSI; Fabric is the new rendering system. Codegen generates type-safe interfaces from JS spec files.

  33. In React Native, how are values returned from a native module method to JavaScript?

    Native module methods can return results via callbacks (success/error functions), via Promises (the JS call awaits, native resolves/rejects), or by emitting events through an event emitter for asynchronous/streaming data. Promises are typical for one-shot async results.

  34. How do cross-platform apps typically access device APIs like camera, GPS, or sensors?

    Through plugins/packages that wrap native platform APIs behind a unified Dart/JS interface (e.g. Flutter's camera, geolocator, sensors_plus; React Native's / Expo's expo-camera, expo-location). These handle the platform channel/native module bridging and expose a cross-platform API.

  35. On mobile, why must sensitive device APIs request runtime permissions, and how is this handled cross-platform?

    APIs like camera, location, and contacts access private data, so iOS and Android require explicit user consent at runtime (and manifest/Info.plist declarations). Cross-platform apps use permission libraries (permission_handler in Flutter, expo-permissions/PermissionsAndroid in RN) to request and check permission status before accessing the API.

  36. For device location, what is the difference between coarse and fine location, and why choose one?

    Coarse location (network/Wi-Fi based) gives approximate position with lower battery cost and a less intrusive permission; fine location (GPS) gives precise coordinates but uses more power. Choose coarse when only general area is needed to save battery and improve privacy; use fine only when precision is essential.

  37. In Flutter, why can excessive or deep widget rebuilds hurt performance, and how do you mitigate them?

    Rebuilding large subtrees on every setState wastes CPU and can cause jank. Mitigations: use const constructors so unchanged widgets are cached, split widgets so setState scopes are small, use keys correctly, and use targeted state (Selector/select, ValueListenableBuilder) to rebuild only what changed.

  38. In Flutter, what is the purpose of const constructors for performance?

    A const widget is instantiated once at compile time and reused; Flutter can skip rebuilding and re-comparing it because its identity never changes. Marking static subtrees const reduces allocations and rebuild work, improving frame times.

  39. In React/React Native, how do React.memo, useMemo, and useCallback improve performance?

    React.memo skips re-rendering a component when its props are shallowly equal. useMemo caches an expensive computed value between renders. useCallback caches a function reference so memoized children don't re-render due to a new function identity each render. All prevent unnecessary work when dependencies are unchanged.

  40. In React Native, why use FlatList/SectionList instead of mapping items in a ScrollView?

    FlatList and SectionList virtualize the list, rendering only items near the viewport and recycling views, which keeps memory and render cost low for large datasets. A ScrollView with .map renders every item at once, causing high memory use and jank for long lists.

  41. What is the target frame rate for smooth mobile UI, and what is the per-frame time budget?

    Smooth UI targets 60 frames per second (or 120fps on high-refresh displays). At 60fps the budget per frame is $\frac{1000\ \text{ms}}{60} \approx 16.7\ \text{ms}$; exceeding it drops frames and causes visible jank. All build, layout, and paint work must fit within that budget.

  42. In React Native's old architecture, why could bridge traffic cause performance problems?

    The old bridge serializes all JS-native communication as batched, asynchronous JSON messages. High-frequency traffic (e.g. per-frame scroll or animation updates) creates serialization overhead and a bottleneck, causing dropped frames. Solutions include using native driver animations (useNativeDriver: true) and the JSI-based New Architecture.

  43. In cross-platform animation, why is running animations on the native/UI thread (e.g. useNativeDriver) important?

    Running animations on the native UI thread lets them continue smoothly even when the JavaScript thread is busy, avoiding jank from blocked JS. useNativeDriver: true in React Native (and Flutter's own native rendering) offloads animation from the JS/business logic thread to keep a steady frame rate.

  44. In cross-platform development, what is the general tradeoff between Flutter's rendering approach and React Native's?

    Flutter draws its own widgets via the Skia/Impeller engine, giving pixel-consistent UI across platforms independent of native controls. React Native renders actual native components, giving a more platform-native look and feel but with potential inconsistencies and bridge overhead. Flutter favors consistency; RN favors native fidelity.

Mobile App Development Cross-Platform Development FAQ

What is in the Mobile App Development Cross-Platform Development syllabus?

Mobile App Development Cross-Platform Development is split into 6 chapters: Flutter Fundamentals, Flutter State Management, React Native Fundamentals, React Native State and Data, Native Modules and Bridges and Cross-Platform Trade-offs. Together they contain 20 topics.

How many chapters are in Mobile App Development Cross-Platform Development?

6 chapters, containing 20 topics. The largest chapter is Flutter Fundamentals, with 4 topics.

Are there flashcards for Mobile App Development Cross-Platform Development?

Yes — a 64-card Cross-Platform Development deck, printed in full in the flashcards section of this page and available in the Examius app with spaced repetition. The free plan covers one exam of your choice, including its flashcards; Examius Pro, a one-time purchase, unlocks every other exam and deck.