Keyboard Shortcuts

j / kScroll down / up
ggScroll to top
GScroll to bottom
K / /Open search
?Show this help
EscClose search / help
n / NNext / previous section
hGo to landing
dGo to docs
:Command mode — type section name

Press ? or Esc to close

Systems

Performance

A few deliberate choices keep the app smooth. None are clever — they are just consistent.

Isolate JSON parsing

Large responses parse on a background isolate when the Store is created with shouldIsolate: true. The UI thread never blocks on fromJson.

lib/config/network/base_store.dart
Future<ApiResponse<T, void>> execute<T>({
  required Future<Response> Function() request,
  required T Function(dynamic) parser,
  required T empty,
  bool shouldIsolate = false,
}) async {
  final response = await request();
  final parsed = shouldIsolate
      ? await Isolate.run(() => parser(response.data))
      : parser(response.data);
  return ApiResponse.initial(data: parsed).success(data: parsed);
}

Bottom-nav state retention

StatefulShellRoute.indexedStack keeps every tab's widget tree alive. Switching tabs is instant — no rebuild, no refetch.

Lazy singletons

Most stores and data sources are registerLazySingleton. They are constructed on first use, not at startup, so cold launch stays fast.

Keep-alive wrappers

Inner tabs and heavy lists use KeepAliveWrapper so they are not disposed when scrolled out of an indexed stack or page view.

lib/config/ui/keep_alive_wrapper.dart
KeepAliveWrapper(
  child: const HeavyList(),
)

Image caching

WhereMechanism
TipTap imagesCustom CacheManager
Avatars / feedCachedNetworkImage
Local mediaFile cache via MediaUploadStore
Rule of thumb: if a parse or build is heavy, move it off the UI thread or make it lazy. Measure before optimizing anything else.
sam's arch — A Pragmatic Flutter Architecture