mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
ParagraphBuilder should be able to build a paragraph
This patch start down the road of implementing text layout and painting without the DOM. We can construct a basic paragraph consisting of a single run of text and we can get through layout without crashing.
This commit is contained in:
parent
63101e49bc
commit
403441d2ab
@ -0,0 +1,13 @@
|
||||
import 'dart:sky';
|
||||
|
||||
import 'package:test/test.dart';
|
||||
|
||||
void main() {
|
||||
test("Should be able to build and layout a paragraph", () {
|
||||
ParagraphBuilder builder = new ParagraphBuilder();
|
||||
builder.addText('Hello');
|
||||
Paragraph paragraph = builder.build(new ParagraphStyle());
|
||||
expect(paragraph, isNotNull);
|
||||
paragraph.layout();
|
||||
});
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user