You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For parsing Org Mode documents, see
org_parser. For an example application
that displays Org Mode documents with org_parser and org_flutter, see
Orgro.
The simplest way to display an Org Mode document in your Flutter application is
to use the Org widget:
Use Org markup to create rich Text-equivalent widgets with OrgText.
OrgText('*This* is a /rich/ text label ([[https://example.com][details]])')
Advanced
For more advanced usage, such as specifying link handling, use OrgController
in concert with OrgRootWidget:
import'package:org_flutter/org_flutter.dart';
Widgetbuild(BuildContext context) {
final doc =OrgDocument.parse(
rawOrgModeDocString,
// Interpret e.g. #+TODO: settings at the cost of a second parsing pass
interpretEmbeddedSettings:true,
);
returnOrgController(
root: doc,
child:OrgLocator( // Include OrgLocator to enable tap-to-jump on footnotes, etc.
child:OrgRootWidget(
style: myTextStyle,
onLinkTap: launch, // e.g. from url_launcher package
child:OrgDocumentWidget(doc),
),
),
);
}
Place OrgController higher up in your widget hierarchy and access via
OrgController.of(context) to dynamically control various properties of the
displayed document: