opentui_flutter 0.1.0 copy "opentui_flutter: ^0.1.0" to clipboard
opentui_flutter: ^0.1.0 copied to clipboard

Flutter plugin and widget adapter for rendering OpenTUI frames.

opentui_flutter #

opentui_flutter is a Flutter plugin/widget adapter that renders opentui frames inside Flutter apps.

Features #

  • OpenTuiView for terminal-like rendering.
  • OpenTuiController to attach an engine and push key/text input.
  • Works on Android, iOS, Web, macOS, Linux, and Windows.

Install #

flutter pub add opentui_flutter

Basic Usage #

import 'package:flutter/material.dart';
import 'package:opentui/opentui.dart';
import 'package:opentui_flutter/opentui_flutter.dart';

class Demo extends StatefulWidget {
  const Demo({super.key});

  @override
  State<Demo> createState() => _DemoState();
}

class _DemoState extends State<Demo> {
  final controller = OpenTuiController();

  @override
  Widget build(BuildContext context) {
    final root = TuiBox(id: 'root', layoutDirection: TuiLayoutDirection.column)
      ..add(TuiText(id: 'title', text: 'OpenTUI Flutter'))
      ..add(TuiInput(id: 'input', placeholder: 'Type here...'));

    return OpenTuiView(controller: controller, root: root);
  }
}
0
likes
150
points
26
downloads

Publisher

unverified uploader

Weekly Downloads

Flutter plugin and widget adapter for rendering OpenTUI frames.

Repository (GitHub)
View/report issues

Topics

#flutter #tui #terminal

Documentation

API reference

License

MIT (license)

Dependencies

flutter, flutter_web_plugins, opentui, web

More

Packages that depend on opentui_flutter

Packages that implement opentui_flutter