org_flutter 1.0.0-nullsafety.0 copy "org_flutter: ^1.0.0-nullsafety.0" to clipboard
org_flutter: ^1.0.0-nullsafety.0 copied to clipboard

outdated

Flutter widgets for displaying Emacs org-mode (https://orgmode.org) content

org_flutter #

Org-mode widgets for Flutter.

Usage #

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:

import 'package:org_flutter/org_flutter.dart';

class MyOrgViewWidget extends StatelessWidget {
  Widget build(BuildContext context) {
    return Org('''* TODO [#A] foo bar
baz buzz''');
  }
}

See the example for more.

Advanced #

For more advanced usage, such as specifying link handling, use OrgController in concert with OrgRootWidget:

import 'package:org_flutter/org_flutter.dart';

Widget build(BuildContext context) {
  final doc = OrgDocument.parse(rawOrgModeDocString);
  return OrgController(
    root: doc,
    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:

IconButton(
  icon: const Icon(Icons.repeat),
  onPressed: OrgController.of(context).cycleVisibility,
);
3
likes
0
pub points
65%
popularity

Publisher

verified publishermadlon-kay.com

Flutter widgets for displaying Emacs org-mode (https://orgmode.org) content

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, flutter_highlight, flutter_tex_js, highlight, org_parser

More

Packages that depend on org_flutter