Skip to content

Commit 54a1628

Browse files
committed
feat: update text
1 parent 84cef00 commit 54a1628

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

lib/src/node/text.dart

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,22 @@ class ZKText extends ZKNode {
174174
this.layout();
175175
}
176176

177+
void setColor(Color color) {
178+
_style = _style!.merge(TextStyle(color: color));
179+
}
180+
181+
void setFontFamily(String fontFamily) {
182+
_style = _style!.merge(TextStyle(fontFamily: fontFamily));
183+
}
184+
185+
void setFontSize(double fontSize) {
186+
_style = _style!.merge(TextStyle(fontSize: fontSize));
187+
}
188+
189+
void refresh() {
190+
this.setText(this.text);
191+
}
192+
177193
////////////////////////////////////////////////////////////
178194
///
179195
/// Update, render and other related functions

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ description: Zerker is a flexible and lightweight flutter canvas graphic animati
1111
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
1212
# Read more about iOS versioning at
1313
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
14-
version: 2.2.5
14+
version: 2.2.6
1515
homepage: https://github.com/flutterkit/zerker
1616

1717
environment:

0 commit comments

Comments
 (0)