Skip to content

Commit b5c912e

Browse files
committed
chores: show font family style when selecting fonts
1 parent 52a0580 commit b5c912e

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

lib/image_builder/layers/text.dart

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ class TextLayer extends ImageLayer {
9898
builder: (context) {
9999
return ValueListenableBuilder(
100100
valueListenable: _fontFamily,
101-
builder: (context, value, child) => _FontFamily(
101+
builder: (context, value, child) => _FontFamilyHandler(
102102
value: value,
103103
onChanged: (value) {
104104
controller.textStyle = controller.textStyle.copyWith(
@@ -162,8 +162,8 @@ class _TextSizeHandler extends StatelessWidget {
162162
}
163163
}
164164

165-
class _FontFamily extends StatelessWidget {
166-
const _FontFamily({
165+
class _FontFamilyHandler extends StatelessWidget {
166+
const _FontFamilyHandler({
167167
required this.value,
168168
required this.onChanged,
169169
});
@@ -196,7 +196,10 @@ class _FontFamily extends StatelessWidget {
196196
)
197197
: BorderSide.none,
198198
),
199-
title: Text(font.displayName),
199+
title: Text(
200+
font.displayName,
201+
style: TextStyle(fontFamily: font.name, fontSize: 25),
202+
),
200203
onTap: () {
201204
onChanged(font);
202205
},

0 commit comments

Comments
 (0)