-
-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathtext.example.ts
More file actions
33 lines (26 loc) · 839 Bytes
/
text.example.ts
File metadata and controls
33 lines (26 loc) · 839 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import { RichText, Text, TextSpan, Theme } from "@bridged.xyz/flutter-builder"
const text = new Text("", {
style: Theme.of().textStyle.headline5
})
const textRich = Text.rich(new TextSpan({ text: 'hello', style: Theme.of().textStyle.headline5 }))
const richText = new RichText(
{
text: new TextSpan(
{
text: 'hello',
style: Theme.of().textStyle.headline5,
children: [
new TextSpan(
{
text: 'world',
style: Theme.of().textStyle.headline6,
}
),
]
}
),
}
)
console.log(text.build().finalize())
console.log(textRich.build().finalize())
console.log(richText.build().finalize())