-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
flutter/engine
#33776Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: error messageError messages from the Flutter frameworkError messages from the Flutter frameworkengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.
Description
For example, the following code should trigger an assert (it currently draws nothing and does not assert/error):
import 'dart:ui';
void main() {
window.onBeginFrame = (_) {
final a = createParagraph('asdf');
final b = createParagraph('fdsa');
final recorder = PictureRecorder();
final canvas = Canvas(recorder);
canvas.drawParagraph(a, const Offset(50, 100));
canvas.drawParagraph(b, const Offset(50, 200));
final picture = recorder.endRecording();
final SceneBuilder builder = SceneBuilder();
builder.addPicture(Offset.zero, picture);
final scene = builder.build();
window.render(scene);
scene.dispose();
};
window.scheduleFrame();
}
Paragraph createParagraph(String text) {
final builder = ParagraphBuilder(ParagraphStyle(fontSize: 36));
builder.pushStyle(TextStyle(color: const Color(0xFFFEDCBA)));
builder.addText(text);
return builder.build(); //..layout(const ParagraphConstraints(width: double.infinity));
}Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: error messageError messages from the Flutter frameworkError messages from the Flutter frameworkengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.
Type
Projects
Status
Done (PR merged)