to select ↑↓ to navigate
mForm Docs

mForm Docs

Open in ChatGPT
Ask ChatGPT about this page
Open in Claude
Ask Claude about this page

Ready-made screens

The SDK ships screens for the parts of an app that look the same everywhere: login, browsing documents, filling forms, and watching sync happen.

Core screens

  • Login: wires up whichever methods LoginConfig enables. See Authentication.
  • Document list / detail: reads through UnifiedResolver, so it works the same whether the deployment is online-only or offline-first.
  • Forms: rendered from doctype metadata. See Dynamic forms from metadata.

Sync surface (2.0)

  • SyncStatusBar: a persistent strip showing sync state. Drop it at the top of your app shell.
  • SyncProgressScreen: a blocking screen for the initial bootstrap pull.
  • SyncErrorsScreen: lists failed pushes with per-row Retry, View error, and Open actions, plus a header Retry-all.
  • DocumentListFilterChip: a tri-state filter (all / unsynced / errors) with live counts, for a document list screen.
  • OfflineTransitionScreen / OfflineTransitionGuard: shown when an admin flips the offline flag and the device has to drain and wipe local data. The guard wraps your app shell and overlays the screen for as long as a transition is running.
  • FrappeAppGuard: checked on every launch. See App status and force-update.

Minimum wiring for the sync surface:

MaterialApp(
  builder: (context, child) {
    return OfflineTransitionGuard(
      service: sdk.offlineTransition,
      child: Column(children: [
        SyncStatusBar(notifier: sdk.syncStateNotifier),
        Expanded(child: child ?? const SizedBox.shrink()),
      ]),
    );
  },
  home: HomeScreen(sdk: sdk),
);

A doctype disappearing mid-session

If the server permanently refuses a pull for a doctype (403, or a non-gateway 5xx), the SDK clears that doctype's mobile-form flag so the request stops repeating. It drops out of the workspace until the next login or initialize() re-promotes it. Nothing re-promotes it mid-session automatically. If your screen renders the workspace from getMobileFormDoctypeNames(), expect it to shrink within a session and come back on relaunch. Call sdk.resyncMobileConfiguration() if you need a mid-session recovery path.

Last updated 1 month ago
Was this helpful?
Thanks!