PandaText / Docs / Flutter

PandaText for Flutter

A Flutter widget that draws the engine’s lines, with Flutter’s input and menus.

Supported platforms

iOS
iOS 18 and later.
macOS
macOS 15 and later.
Android
Android 8 (API 26) and later, on arm64-v8a and x86_64.
Linux
Supported.
Web
Supported.

Get started

Install the package, then load your fonts, create a view and set the text. Package sources come with early access.

Flutter

Requires: Flutter 3.41 or later (Dart 3.10). Text draws in the same frame on Impeller; on Skia a tile shows a frame late.

1 Install

Add the package to pubspec.yaml, and your fonts as assets:

dependencies:
  pandatext:
    git:
      url: <repository URL from your early-access email>

flutter:
  assets:
    - fonts/NotoSans-Regular.ttf
    - fonts/NotoSans-Bold.ttf

Load the bytes with rootBundle.load(…) and pass them to PandaTextFont.fromBytes.

2 Create the view

The same editor as a Flutter widget.

import 'package:pandatext/pandatext.dart';

final fonts = PandaTextFontCollection([
  PandaTextFontFamily([PandaTextFont.fromBytes(regularBytes), PandaTextFont.fromBytes(boldBytes)]),
]);

PandaTextView(fonts: fonts, text: 'Hello PandaText', fontSize: 16)

API

After setup, every call does the same job on every platform. Open the Editor API for Flutter.