PandaText for Flutter
A Flutter widget that draws the engine’s lines, with Flutter’s input and menus.
Supported platforms
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.ttfLoad 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.