session library

Host-independent session implementation. Most apps import their host package.

Classes

FlarkBackendLease
A parser lent to one holder, which calls dispose once it stops parsing.
FlarkCodeState
FlarkEditResult
FlarkHeadingState
FlarkLinkState
FlarkLiveLimits
Shape eligibility for synchronous projection. Hosts qualify these limits together with FlarkEditor.syncLimit on their actual input/paint path.
FlarkReader
Automatic loading for the dedicated read-only path. One current document, no global content cache and no editing session are retained.
FlarkSession
Host-independent ownership, readiness and publication. UI adapters own only their input/focus integration; this object owns its parser lease and editing state.
FlarkState
Immutable publication. Read again after a controller notification.
FlarkStylesState

Mixins

FlarkActions
Shared callable API for Flutter and Fleury controllers.

Properties

flarkDefaultLiveBytes → int
UTF-8 bytes rendered live by default on this platform: 16 KiB on phones, 32 KiB on desktop.
no setter

Functions

flarkSourcePreview(String markdown) → String
The opening of markdown that a reader's source fallback shows, about 1,024 code units and an ellipsis when there is more. The fallback is also where text with an unpaired surrogate ends up, which a host's text layout may refuse (Flutter's) or drop (Fleury's), so the cut never splits a surrogate pair and an unpaired one shows as U+FFFD. Copying still takes the source exactly as written.
loadFlarkBackend() → Future<FlarkBackendLease>
Lease the platform's parser. On the Dart VM each lease owns a native parser of its own. On the web every lease shares one Wasm parser, disposed with the last lease; a lease's backend stops parsing once its lease is disposed, and disposing that backend releases only its lease.